Skip to content

Commit

Permalink
Fix OCaml-CI (#115)
Browse files Browse the repository at this point in the history
* Add a test command and test dependency to the opam file

* The internal tools only compile in OCaml >= 4.10 (uses compiler-libs)

* opam: Add missing constraint (uses cinaps.runtime)

* Disable dune formatting

* Travis: Disable the tests (can't be run in OCaml < 4.04)

Co-authored-by: Sonja Heinze <[email protected]>
  • Loading branch information
kit-ty-kate and pitag-ha authored Jun 14, 2021
1 parent 4a05cf7 commit 9f5479d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
global:
- PACKAGE="ocaml-migrate-parsetree"
- PRE_INSTALL_HOOK="cd /home/opam/opam-repository && git pull origin master && opam update -u -y"
- TESTS=false
matrix:
- DISTRO=alpine OCAML_VERSION=4.02.3
- DISTRO=alpine OCAML_VERSION=4.03.0
Expand Down
3 changes: 2 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(lang dune 1.11)
(lang dune 2.3)
(name ocaml-migrate-parsetree)
(formatting disabled)
(allow_approximate_merlin)
(using cinaps 1.0)
8 changes: 4 additions & 4 deletions ocaml-migrate-parsetree.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ bug-reports: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues"
dev-repo: "git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git"
doc: "https://ocaml-ppx.github.io/ocaml-migrate-parsetree/"
tags: [ "syntax" "org:ocamllabs" ]
build: [
["dune" "build" "-p" name "-j" jobs]
]
build: ["dune" "build" "-p" name "-j" jobs]
run-test: ["dune" "runtest" "-p" name "-j" jobs]
depends: [
"dune" {>= "1.11"}
"dune" {>= "2.3"}
"ocaml" {>= "4.02.3" & < "4.13"}
"cinaps" {with-test & >= "v0.13.0"}
]
synopsis: "Convert OCaml parsetrees between different versions"
description: """
Expand Down
18 changes: 16 additions & 2 deletions tools/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
(executables
(names add_special_comments pp gencopy)
(executable
(name pp)
(modules pp pp_rewrite)
(flags :standard -w -3))

(executable
(name gencopy)
(enabled_if (>= %{ocaml_version} 4.10))
(modules gencopy)
(libraries compiler-libs.common compiler-libs.bytecomp)
(flags :standard -w -3))

(executable
(name add_special_comments)
(enabled_if (>= %{ocaml_version} 4.10))
(modules add_special_comments)
(libraries compiler-libs.common compiler-libs.bytecomp)
(flags :standard -w -3))

Expand Down

0 comments on commit 9f5479d

Please sign in to comment.