Skip to content

Commit

Permalink
Use OCaml syntax to generate dune file
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragsoni committed Mar 24, 2020
1 parent 889d4ed commit 3217f97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:
ocaml-version: ${{ matrix.ocaml-version }}
- name: Install dependencies
run: |
opam pin add routes.dev -n .
opam depext -yt routes
opam install -t . --deps-only
opam install dune alcotest
- name: Run tests
run: |
opam exec -- dune runtest
17 changes: 12 additions & 5 deletions src/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
(library
(name routes)
(public_name routes)
(preprocess
(pps bisect_ppx --conditional)))
(* -*- tuareg -*- *)

let preprocess =
match Sys.getenv "BISECT_ENABLE" with
| exception _ -> ""
| "yes" -> "(preprocess (pps bisect_ppx))"
| _ -> ""

let () = Jbuild_plugin.V1.send @@ {|
(library
(name routes)
(public_name routes)|} ^ preprocess ^ {|)|}

0 comments on commit 3217f97

Please sign in to comment.