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 03122c0
Show file tree
Hide file tree
Showing 2 changed files with 12 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
16 changes: 11 additions & 5 deletions src/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
(library
(name routes)
(public_name routes)
(preprocess
(pps bisect_ppx --conditional)))
(* -*- tuareg -*- *)

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

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

0 comments on commit 03122c0

Please sign in to comment.