Skip to content

Commit f3bb3ba

Browse files
committed
CI: install Wizard engine
1 parent ccdf903 commit f3bb3ba

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed

.github/workflows/build-wasm_of_ocaml.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,31 @@ jobs:
119119
run: |
120120
echo "$GITHUB_WORKSPACE/binaryen/bin" >> $GITHUB_PATH
121121
122+
- name: Checkout Virgil
123+
uses: actions/checkout@v4
124+
with:
125+
repository: titzer/virgil
126+
path: virgil
127+
128+
- name: Build Virgil
129+
working-directory: ./virgil
130+
run: |
131+
export PATH=$PATH:`pwd`/bin
132+
echo `pwd`/bin >> "$GITHUB_PATH"
133+
make
134+
135+
- name: Checkout Wizard engine
136+
uses: actions/checkout@v4
137+
with:
138+
repository: titzer/wizard-engine
139+
path: wizard-engine
140+
141+
- name: Build Wizard engine
142+
working-directory: ./wizard-engine
143+
run: |
144+
make -j 4
145+
echo `pwd`/bin >> "$GITHUB_PATH"
146+
122147
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
123148
uses: ocaml/setup-ocaml@v3
124149
with:
@@ -179,8 +204,10 @@ jobs:
179204
run: opam exec -- dune build @runtest-wasm --profile with-effects
180205

181206
- name: Run tests (WASI runtime)
182-
if: ${{ matrix.separate_compilation }}
207+
if: ${{ runner.os == 'Linux' && matrix.separate_compilation }}
183208
working-directory: ./wasm_of_ocaml
209+
env:
210+
WASM_ENGINE: wizard-fast
184211
run: opam exec -- dune build @runtest-wasm --profile wasi
185212

186213
- name: Run Base tests

compiler/lib-wasm/binaryen.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ let dead_code_elimination
113113
filter_unused_primitives primitives usage_file
114114

115115
let optimization_options =
116-
[| [ "-O2"; "--skip-pass=inlining-optimizing" ]
117-
; [ "-O2"; "--skip-pass=inlining-optimizing" ]
118-
; [ "-O3"; "--skip-pass=inlining-optimizing" ]
116+
[| [ "-O2"; "--skip-pass=inlining-optimizing"; "--translate-to-new-eh" ]
117+
; [ "-O2"; "--skip-pass=inlining-optimizing"; "--translate-to-new-eh" ]
118+
; [ "-O3"; "--skip-pass=inlining-optimizing"; "--translate-to-new-eh" ]
119119
|]
120120

121121
let optimize

dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
(wasi
3434
(wasm_of_ocaml
3535
(flags
36-
(:standard --pretty --enable wasi --enable trap-on-exception))
36+
(:standard --pretty --enable wasi))
3737
(compilation_mode whole_program))
3838
(binaries
3939
(tools/node_wrapper.exe as node)

tools/node_wrapper.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ let wasmedge_args =
1818
let extra_args_for_wasoo =
1919
[ "--experimental-wasm-imported-strings"
2020
; "--experimental-wasm-stack-switching"
21+
; "--experimental-wasm-exnref"
2122
; "--stack-size=10000"
2223
]
2324

@@ -59,8 +60,7 @@ let exe, args =
5960
( "/home/jerome/sources/wizard-engine/bin/wizeng.x86-linux"
6061
, wizard_args @ (find_wasm file :: List.tl argv) )
6162
| Some "wizard-fast" ->
62-
( "/home/jerome/sources/wizard-engine/bin/wizeng.x86-64-linux"
63-
, wizard_args @ (find_wasm file :: List.tl argv) )
63+
"wizeng.x86-64-linux", wizard_args @ (find_wasm file :: List.tl argv)
6464
| Some "wasmfxtime" ->
6565
( "/home/jerome/sources/wasmfxtime/target/debug/wasmtime"
6666
, wasmfxtime_args @ (find_wasm file :: List.tl argv) )

0 commit comments

Comments
 (0)