@@ -20,17 +20,29 @@ jobs:
2020 - " 4.14"
2121 - " 5.0"
2222 - " 5.1"
23- - " 5.2"
2423 - " 5.3"
2524 separate_compilation :
2625 - true
26+ jane_street_tests :
27+ - false
28+ all_jane_street_tests :
29+ - false
2730 include :
2831 - os : macos-latest
2932 ocaml-compiler : " 5.3"
3033 separate_compilation : true
34+ jane_street_tests : false
35+ all_jane_street_tests : false
3136 - os : ubuntu-latest
32- ocaml-compiler : " 4.14"
37+ ocaml-compiler : " 5.2"
38+ separate_compilation : true
39+ jane_street_tests : true
40+ all_jane_street_tests : true
41+ - os : ubuntu-latest
42+ ocaml-compiler : " 5.2"
3343 separate_compilation : false
44+ jane_street_tests : true
45+ all_jane_street_tests : false
3446
3547 runs-on : ${{ matrix.os }}
3648
@@ -48,10 +60,11 @@ jobs:
4860 path : wasm_of_ocaml
4961
5062 - name : Checkout Jane Street opam repository
63+ if : matrix.jane_street_tests
5164 uses : actions/checkout@v4
5265 with :
5366 repository : janestreet/opam-repository
54- ref : feaf8f831051fd5f316963b28efd728cf0b0eca1
67+ ref : 41c89c7824533f6b63cc5b6d75e6ddb1441d1520
5568 path : janestreet/opam-repository
5669
5770 - name : Set-up Node.js
@@ -78,10 +91,20 @@ jobs:
7891 run : opam pin -n --with-version `< VERSION` .
7992
8093 - name : Checkout Jane Street packages
94+ if : matrix.jane_street_tests
8195 run : |
82- opam install opam-format ocamlfind dune graphics cmdliner sexplib0.v0.16.0
96+ opam repo add js janestreet/opam-repository
97+ opam install opam-format ocamlfind dune graphics cmdliner
8398 opam exec -- ocaml wasm_of_ocaml/tools/ci_setup.ml
8499
100+ - name : Pin Jane Street packages
101+ if : ${{ ! matrix.jane_street_tests }}
102+ run : |
103+ opam pin add -n base.v0.16.1 https://github.com/ocaml-wasm/base.git#wasm
104+ opam pin add -n time_now.v0.16.1 https://github.com/ocaml-wasm/time_now.git#wasm
105+ opam pin add -n ppx_inline_test.v0.16.1 https://github.com/ocaml-wasm/ppx_inline_test.git#wasm
106+ opam pin add -n ppx_expect.v0.16.1 https://github.com/ocaml-wasm/ppx_expect.git#wasm
107+
85108 - name : Install wasm_of_ocaml and its test dependencies
86109 working-directory : ./wasm_of_ocaml
87110 run : |
@@ -97,52 +120,82 @@ jobs:
97120 working-directory : ./wasm_of_ocaml
98121 run : opam exec -- dune build @runtest-wasm --profile with-effects
99122
123+ - name : Create node wrapper for Jane Street tests
124+ run : |
125+ mkdir -p ~/.local/bin
126+ cat > ~/.local/bin/node <<EOF
127+ #!/bin/sh
128+ exec `which node` --experimental-wasm-jspi "\$@"
129+ EOF
130+ chmod +x ~/.local/bin/node
131+ echo ~/.local/bin >> "$GITHUB_PATH"
132+
100133 - name : Run Base tests
101- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
134+ if : matrix.all_jane_street_tests
102135 working-directory : ./janestreet/lib/base
103136 run : opam exec -- dune runtest
104137
105138 - name : Run Base bigstring tests
106- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
139+ if : matrix.all_jane_street_tests
107140 working-directory : ./janestreet/lib/base_bigstring
108141 run : opam exec -- dune runtest
109142
110143 - name : Run Core tests
111- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
144+ if : matrix.all_jane_street_tests
112145 working-directory : ./janestreet/lib/core
113146 run : opam exec -- dune runtest
114147
115148 - name : Run Bignum tests
116- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
149+ if : matrix.all_jane_street_tests
117150 working-directory : ./janestreet/lib/bignum
118151 run : opam exec -- dune runtest
119152
120153 - name : Run Bin_prot tests
121- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
154+ if : matrix.all_jane_street_tests
122155 working-directory : ./janestreet/lib/bin_prot
123156 run : opam exec -- dune runtest
124157
125158 - name : Run String_dict tests
126- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
159+ if : matrix.all_jane_street_tests
127160 working-directory : ./janestreet/lib/string_dict
128161 run : opam exec -- dune runtest
129162
130163 - name : Run Zarith tests
131- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
164+ if : matrix.all_jane_street_tests
132165 working-directory : ./janestreet/lib/zarith_stubs_js
133166 run : opam exec -- dune runtest
134167
135168 - name : Run Virtual_dom tests
136- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
169+ if : matrix.all_jane_street_tests
137170 working-directory : ./janestreet/lib/virtual_dom
138171 run : opam exec -- dune runtest
139172
140173 - name : Run Bonsai tests
141- if : ${{ matrix.ocaml-compiler < '5.' && matrix.separate_compilation }}
142- working-directory : ./janestreet/lib/bonsai
174+ if : matrix.all_jane_street_tests
175+ working-directory : ./janestreet/lib/bonsai_test
176+ run : opam exec -- dune runtest
177+
178+ - name : Run Bonsai web tests
179+ if : matrix.all_jane_street_tests
180+ working-directory : ./janestreet/lib/bonsai_web_test
181+ run : opam exec -- dune runtest
182+
183+ - name : Run Bonsai web components' tests
184+ if : matrix.all_jane_street_tests
185+ working-directory : ./janestreet/lib/bonsai_web_components
143186 run : opam exec -- dune runtest
144187
145188 - name : Run Bonsai tests (release profile)
146189 if : ${{ ! matrix.separate_compilation }}
147- working-directory : ./janestreet/lib/bonsai
190+ working-directory : ./janestreet/lib/bonsai_test
191+ run : opam exec -- dune runtest --profile release
192+
193+ - name : Run Bonsai web tests (release profile)
194+ if : ${{ ! matrix.separate_compilation }}
195+ working-directory : ./janestreet/lib/bonsai_web_test
196+ run : opam exec -- dune runtest --profile release
197+
198+ - name : Run Bonsai web components' tests (release profile)
199+ if : ${{ ! matrix.separate_compilation }}
200+ working-directory : ./janestreet/lib/bonsai_web_components
148201 run : opam exec -- dune runtest --profile release
0 commit comments