File tree Expand file tree Collapse file tree 2 files changed +27
-12
lines changed Expand file tree Collapse file tree 2 files changed +27
-12
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,6 @@ jobs:
120120 working-directory : ./wasm_of_ocaml
121121 run : opam exec -- dune build @runtest-wasm --profile with-effects
122122
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-
133123 - name : Run Base tests
134124 if : matrix.all_jane_street_tests
135125 working-directory : ./janestreet/lib/base
Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ let dune_workspace =
6060 (flags :standard -warn-error -7-8-27-30-32-34-37-49-52-55 -w -67-69 )))
6161| }
6262
63+ let node_wrapper =
64+ [ ( " node_wrapper/dune"
65+ , {| (executable
66+ (public_name node)
67+ (name node_wrapper)
68+ (libraries unix))| } )
69+ ; " node_wrapper/dune-project" , " (lang dune 3.17)"
70+ ; " node_wrapper/node_wrapper.opam" , " "
71+ ]
72+
6373let patches =
6474 [ ( " sexp_grammar"
6575 , {|
@@ -203,8 +213,23 @@ let clone' delay ?branch ?commit nm src =
203213 (Printf. sprintf " cd janestreet/lib/%s && git checkout -b wasm %s" nm commit)
204214
205215let () =
206- Out_channel. (
207- with_open_bin " janestreet/dune-workspace" @@ fun ch -> output_string ch dune_workspace)
216+ let write f contents =
217+ Out_channel. (
218+ with_open_bin (Filename. concat " janestreet" f)
219+ @@ fun ch -> output_string ch contents)
220+ in
221+ let copy f f' =
222+ let contents =
223+ In_channel. (with_open_bin (Filename. concat " wasm_of_ocaml" f) @@ input_all)
224+ in
225+ Out_channel. (
226+ with_open_bin (Filename. concat " janestreet" f')
227+ @@ fun ch -> output_string ch contents)
228+ in
229+ write " dune-workspace" dune_workspace;
230+ Unix. mkdir " janestreet/node_wrapper" 0o755 ;
231+ List. iter (fun (f , contents ) -> write f contents) node_wrapper;
232+ copy " tools/node_wrapper.ml" " node_wrapper/node_wrapper.ml"
208233
209234let () =
210235 let js, others =
You can’t perform that action at this time.
0 commit comments