Skip to content

Commit

Permalink
Build: dune alias for js and wasm (#1760)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo authored Dec 9, 2024
1 parent e0ec46e commit c0f9035
Show file tree
Hide file tree
Showing 63 changed files with 567 additions and 432 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build-wasm_of_ocaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
env:
OPAMJOBS: 2
OPAMYES: true
WASM_OF_OCAML: true

strategy:
fail-fast: false
Expand All @@ -19,15 +20,15 @@ jobs:
- ubuntu-latest
ocaml-compiler:
- 4.14.x
- 5.00.x
- 5.01.x
- 5.02.x
- 5.0.x
- 5.1.x
- 5.2.x
- ocaml-compiler.5.3.0~beta2
separate_compilation:
- true
include:
- os: macos-latest
ocaml-compiler: 5.02.x
ocaml-compiler: 5.2.x
separate_compilation: true
- os: ubuntu-latest
ocaml-compiler: 4.14.x
Expand Down Expand Up @@ -92,12 +93,12 @@ jobs:
- name: Run tests
if: ${{ matrix.separate_compilation }}
working-directory: ./wasm_of_ocaml
run: opam exec -- dune build @all @runtest --profile wasm
run: opam exec -- dune build @runtest-wasm

- name: Run tests with CPS effects
if: ${{ matrix.ocaml-compiler >= '5.' && matrix.separate_compilation }}
working-directory: ./wasm_of_ocaml
run: opam exec -- dune build @all @runtest --profile wasm-effects
run: opam exec -- dune build @runtest-wasm --profile with-effects

- name: Run Base tests
if: ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
- run: opam exec -- make tests
if: ${{ !matrix.skip-test }}

- run: opam exec -- dune build @all @runtest --profile using-effects
- run: opam exec -- dune build @all @runtest @runtest-js --profile with-effects
if: ${{ !matrix.skip-effects }}

- run: opam exec -- git diff --exit-code
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ all:
dune build @all

tests:
dune runtest
dune build @runtest @runtest-js

tests-wasm:
WASM_OF_OCAML=true dune build @runtest-wasm

test runtest runtests: tests

Expand Down Expand Up @@ -31,4 +34,4 @@ installdoc:
git worktree add _wikidoc origin/wikidoc
rsync -av doc-dev/ _wikidoc/doc/dev/

.PHONY: all tests test runtest runtests doc clean installdoc
.PHONY: all tests tests-wasm test runtest runtests doc clean installdoc
Loading

0 comments on commit c0f9035

Please sign in to comment.