-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port 1.3 to dune #273
Port 1.3 to dune #273
Changes from all commits
aefe7a3
0bbbaba
dc29df6
beeff90
6bc8735
2671373
542fdb6
e07a087
dd0157f
8ac36ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Main workflow | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
ocaml-compiler: | ||
- 4.04.2 | ||
- 4.13.x | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use OCaml ${{ matrix.ocaml-compiler }} | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
cache-prefix: 1.3.1-${{ matrix.container }} | ||
|
||
- run: opam install . --deps-only --with-test | ||
|
||
- run: opam exec -- dune build | ||
|
||
- run: opam exec -- dune runtest |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,20 @@ | ||
PKGNAME = $(shell oasis query name) | ||
PKGVERSION = $(shell oasis query version) | ||
PKG_TARBALL = $(PKGNAME)-$(PKGVERSION).tar.gz | ||
## | ||
# Omd | ||
# | ||
# @file | ||
|
||
DISTFILES = README.md _oasis setup.ml Makefile \ | ||
$(wildcard $(addprefix src/, *.ml *.mli *.mllib *.mlpack *.ab)) | ||
.PHONY: test build fmt deps | ||
|
||
PREFIX = $(shell opam config var prefix) | ||
ifneq ($(PREFIX),) | ||
PREFIX_FLAG = --prefix $(PREFIX) | ||
endif | ||
build: deps | ||
dune build | ||
|
||
.PHONY: all byte native doc install uninstall reinstall test | ||
deps: | ||
opam install . --deps-only --yes | ||
|
||
all byte native setup.log: configure | ||
ocaml setup.ml -build | ||
test: | ||
dune build @gen --auto-promote | ||
dune runtest | ||
|
||
configure: setup.data | ||
setup.data: setup.ml | ||
ocaml $< -configure --enable-tests $(PREFIX_FLAG) | ||
|
||
setup.ml: _oasis | ||
oasis setup -setup-update dynamic | ||
touch $@ | ||
|
||
doc install uninstall reinstall test: setup.log | ||
ocaml setup.ml -$@ | ||
|
||
|
||
# Make a tarball | ||
.PHONY: dist tar | ||
dist tar: $(DISTFILES) | ||
mkdir $(PKGNAME)-$(PKGVERSION) | ||
cp --parents -r $(DISTFILES) $(PKGNAME)-$(PKGVERSION)/ | ||
# setup.ml independent of oasis: | ||
# and remove test_cow! | ||
test "$(wc -l < _oasis)" == 59 ; echo $? | ||
head -n 36 _oasis > $(PKGNAME)-$(PKGVERSION)/_oasis | ||
sed -e "s/VERSION/$(PKGVERSION) of $$(date -u)/" src/omd_main.ml > $(PKGNAME)-$(PKGVERSION)/src/omd_main.ml | ||
cd $(PKGNAME)-$(PKGVERSION) && oasis setup | ||
tar -zcvf $(PKG_TARBALL) $(PKGNAME)-$(PKGVERSION) | ||
$(RM) -rf $(PKGNAME)-$(PKGVERSION) | ||
|
||
.PHONY: clean distclean dist-clean | ||
clean: | ||
ocaml setup.ml -clean | ||
$(RM) $(PKG_TARBALL) | ||
|
||
distclean dist-clean:: clean | ||
ocaml setup.ml -distclean | ||
$(RM) $(wildcard *.ba[0-9] *.bak *~ *.odocl) | ||
|
||
opam: | ||
test "$(wc -l < _oasis)" == 59 || (echo $?; exit $?) | ||
cp _oasis _oasis_orig | ||
head -n 36 _oasis_orig > _oasis | ||
oasis2opam http://pw374.github.io/distrib/omd/$(PKGNAME)-$(PKGVERSION).tar.gz | ||
mv _oasis_orig _oasis | ||
printf 'tags: [\n "org:ocamllabs"\n "org:mirage"\n]\n' >> $(PKGNAME).$(PKGVERSION)/opam | ||
fmt: | ||
dune build @fmt --auto-promote | ||
# end |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
(lang dune 2.7) | ||
(name omd) | ||
(version 1.3.1) | ||
|
||
(generate_opam_files) | ||
|
||
(license ISC) | ||
(authors "Philippe Wang <philippe.wang@gmail.com>" | ||
"Nicolás Ojeda Bär <n.oje.bar@gmail.com>") | ||
(maintainers "Shon Feder <shon.feder@gmail.com>" | ||
"Raphael Sousa Santos <@sonologico>") | ||
(source (github ocaml/omd)) | ||
|
||
(package | ||
(name omd) | ||
(synopsis "A Markdown frontend in pure OCaml") | ||
(description | ||
"This Markdown library is implemented using only pure OCaml (including | ||
I/O operations provided by the standard OCaml compiler distribution). | ||
OMD is meant to be as faithful as possible to the original Markdown. | ||
Additionally, OMD implements a few Github markdown features, an | ||
extension mechanism, and some other features. Note that the opam | ||
package installs both the OMD library and the command line tool `omd`.") | ||
(tags (org:ocamllabs org:mirage)) | ||
(depends | ||
(ocaml (>= 4.04)) | ||
base-bigarray | ||
base-bytes)) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
version: "1.3.1" | ||
synopsis: "A Markdown frontend in pure OCaml" | ||
description: """ | ||
This Markdown library is implemented using only pure OCaml (including | ||
I/O operations provided by the standard OCaml compiler distribution). | ||
OMD is meant to be as faithful as possible to the original Markdown. | ||
Additionally, OMD implements a few Github markdown features, an | ||
extension mechanism, and some other features. Note that the opam | ||
package installs both the OMD library and the command line tool `omd`.""" | ||
maintainer: [ | ||
"Shon Feder <shon.feder@gmail.com>" "Raphael Sousa Santos <@sonologico>" | ||
] | ||
authors: [ | ||
"Philippe Wang <philippe.wang@gmail.com>" | ||
"Nicolás Ojeda Bär <n.oje.bar@gmail.com>" | ||
] | ||
license: "ISC" | ||
tags: ["org:ocamllabs" "org:mirage"] | ||
homepage: "https://github.com/ocaml/omd" | ||
bug-reports: "https://github.com/ocaml/omd/issues" | ||
depends: [ | ||
"dune" {>= "2.7"} | ||
"ocaml" {>= "4.04"} | ||
"base-bigarray" | ||
"base-bytes" | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/ocaml/omd.git" |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(library | ||
(name omd) | ||
(wrapped false) | ||
(modules :standard \ omd_main) | ||
(flags | ||
(:standard -w -50-6-27-32-39-33-35)) | ||
(public_name omd) | ||
(libraries | ||
bigarray | ||
bytes)) | ||
|
||
(executable | ||
(name omd_main) | ||
(public_name omd) | ||
(modules omd_main) | ||
(libraries omd)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ let to_string html = | |
| (a, Some v) -> | ||
if not (String.contains v '\'') then | ||
pp " %s='%s'" a v | ||
else not (String.contains v '"') then | ||
else if not (String.contains v '"') then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is curious. I'm not sure how this would have been compiling before! |
||
pp " %s=\"%s\"" a v | ||
else | ||
( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean to commit this! Sorry :(
Seems to indicate some inconsistency in our dune builds tho? I'm not sure what accounts for that.