-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Port to dune * Add CI for 1.3 * Update test This test has been failing since at least tag 1.3.1, I think there just wasn't any CI to check. So I'm just updating the expected result to match. Co-authored-by: Shon Feder <[email protected]>
- Loading branch information
Showing
20 changed files
with
161 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]>" | ||
"Nicolás Ojeda Bär <[email protected]>") | ||
(maintainers "Shon Feder <[email protected]>" | ||
"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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]>" "Raphael Sousa Santos <@sonologico>" | ||
] | ||
authors: [ | ||
"Philippe Wang <[email protected]>" | ||
"Nicolás Ojeda Bär <[email protected]>" | ||
] | ||
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.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.