Skip to content

Commit ccdf903

Browse files
committed
CI: install a version on Binaryen with stack-switching support
1 parent ec248d8 commit ccdf903

File tree

1 file changed

+47
-10
lines changed

1 file changed

+47
-10
lines changed

.github/workflows/build-wasm_of_ocaml.yml

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333
separate_compilation: true
3434
jane_street_tests: false
3535
all_jane_street_tests: false
36-
- os: windows-latest
37-
ocaml-compiler: "5.2"
38-
separate_compilation: true
39-
jane_street_tests: true
40-
all_jane_street_tests: true
36+
# - os: windows-latest
37+
# ocaml-compiler: "5.2"
38+
# separate_compilation: true
39+
# jane_street_tests: true
40+
# all_jane_street_tests: true
4141
- os: ubuntu-latest
4242
ocaml-compiler: "5.2"
4343
separate_compilation: true
@@ -77,16 +77,53 @@ jobs:
7777
with:
7878
node-version: latest
7979

80+
- name: Restore cached binaryen
81+
id: cache-binaryen
82+
uses: actions/cache/restore@v4
83+
with:
84+
path: binaryen
85+
key: ${{ runner.os }}-binaryen-stack-switching
86+
87+
- name: Checkout binaryen
88+
if: steps.cache-binaryen.outputs.cache-hit != 'true'
89+
uses: actions/checkout@v4
90+
with:
91+
repository: vouillon/binaryen
92+
path: binaryen
93+
submodules: true
94+
ref: stack-switching-fixes
95+
96+
- name: Install ninja (Ubuntu)
97+
if: matrix.os == 'ubuntu-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
98+
run: sudo apt-get install ninja-build
99+
100+
- name: Install ninja (MacOS)
101+
if: matrix.os == 'macos-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
102+
run: brew install ninja
103+
104+
- name: Build binaryen
105+
if: steps.cache-binaryen.outputs.cache-hit != 'true'
106+
working-directory: ./binaryen
107+
run: |
108+
cmake -G Ninja .
109+
ninja
110+
111+
- name: Cache binaryen
112+
if: steps.cache-binaryen.outputs.cache-hit != 'true'
113+
uses: actions/cache/save@v4
114+
with:
115+
path: binaryen
116+
key: ${{ runner.os }}-binaryen-stack-switching
117+
118+
- name: Set binaryen's path
119+
run: |
120+
echo "$GITHUB_WORKSPACE/binaryen/bin" >> $GITHUB_PATH
121+
80122
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
81123
uses: ocaml/setup-ocaml@v3
82124
with:
83125
ocaml-compiler: ${{ matrix.ocaml-compiler }}
84126

85-
- name: Set-up Binaryen
86-
uses: Aandreba/setup-binaryen@v1.0.0
87-
with:
88-
token: ${{ github.token }}
89-
90127
- name: Pin faked binaryen-bin package
91128
# It's faster to use a cached version
92129
run: opam install --fake binaryen-bin

0 commit comments

Comments
 (0)