Skip to content
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

Use OCaml syntax to generate dune file #102

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ^ {|)|}