Skip to content

Commit

Permalink
build and test directly instead of using opam
Browse files Browse the repository at this point in the history
it looks like the cram packages do not work right with opam --with-tests
  • Loading branch information
ivg committed May 11, 2021
1 parent 166c8db commit 311b5b9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ jobs:
with:
ocaml-version: ${{ matrix.ocaml-version }}

- run: opam pin add FrontC.dev . --yes --with-test
- run: opam pin add FrontC . --no-action
- run: opam install FrontC --deps-only
- run: opam exec -- dune build
- run: opam exec -- dune runtest
5 changes: 1 addition & 4 deletions ctoxml/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
(libraries FrontC))

(env
(_ (binaries (./ctoxml_bin.exe as ctoxml))))

(_ (binaries (./ctoxml as ctoxml))))

(cram
(package ctoxml)
(applies_to test)
(deps %{bin:ctoxml}))
2 changes: 0 additions & 2 deletions dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
(cram
(package FrontC)
(applies_to test.t)
(deps printc/printc_bin.exe))
4 changes: 2 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 2.8)
(lang dune 2.7)
(using menhir 2.0)
(cram enable)
(version 4.0.0)
Expand All @@ -18,7 +18,7 @@
(description "FrontC provides a C parser and an OCaml definition \
of an abstract syntax treee for the C language. It also \
includes AST pretty-printers in plain and XML formats.")
(depends (dune (>= 2.8)) menhir)
(depends (dune (>= 2.7)) menhir)
(tags (FrontC C parser XML)))

(package
Expand Down

0 comments on commit 311b5b9

Please sign in to comment.