@@ -115,65 +115,11 @@ jobs:
115115 - run : opam install conf-pkg-config
116116 if : runner.os == 'Windows'
117117
118- - name : Restore cached binaryen
119- id : cache-binaryen
120- uses : actions/cache/restore@v4
118+ - name : Set-up Binaryen
119+ 121120 with :
122- path : binaryen
123- key : ${{ runner.os }}-binaryen-version_118
124-
125- - name : Checkout binaryen
126- if : steps.cache-binaryen.outputs.cache-hit != 'true'
127- uses : actions/checkout@v4
128- with :
129- repository : WebAssembly/binaryen
130- path : binaryen
131- submodules : true
132- ref : version_118
133-
134- - name : Install ninja (Ubuntu)
135- if : matrix.os == 'ubuntu-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
136- run : sudo apt-get install ninja-build
137-
138- - name : Install ninja (MacOS)
139- if : matrix.os == 'macos-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
140- run : brew install ninja
141-
142- - name : Build binaryen
143- if : matrix.os != 'windows-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
144- working-directory : ./binaryen
145- run : |
146- cmake -G Ninja .
147- ninja
148-
149- - name : Install binaryen build dependencies (Windows)
150- if : matrix.os == 'windows-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
151- working-directory : ./binaryen
152- run : opam install conf-cmake conf-c++
153-
154- - name : Build binaryen (Windows)
155- if : matrix.os == 'windows-latest' && steps.cache-binaryen.outputs.cache-hit != 'true'
156- working-directory : ./binaryen
157- run : |
158- opam exec -- cmake . -DBUILD_STATIC_LIB=ON -DBUILD_TESTS=off -DINSTALL_LIBS=off -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc
159- make -j 4
160-
161- - name : Cache binaryen
162- if : steps.cache-binaryen.outputs.cache-hit != 'true'
163- uses : actions/cache/save@v4
164- with :
165- path : binaryen
166- key : ${{ runner.os }}-binaryen-version_118
167-
168- - name : Set binaryen's path
169- shell : bash
170- run : echo "$GITHUB_WORKSPACE/binaryen/bin" >> $GITHUB_PATH
171-
172- - name : Copy binaryen's tools (Windows)
173- if : matrix.os == 'windows-latest'
174- shell : bash
175- # Somehow, setting the path above does not work
176- run : cp $GITHUB_WORKSPACE/binaryen/bin/wasm-{merge,opt}.exe _opam/bin
121+ version : 118
122+ token : ${{ secrets.GITHUB_TOKEN }}
177123
178124 - name : Install faked binaryen-bin package
179125 # It's faster to use a cached version
@@ -182,15 +128,10 @@ jobs:
182128 - run : opam install . --best-effort
183129 if : ${{ matrix.skip-test }}
184130
185- - run : cat VERSION | xargs opam pin . -n --with-version
131+ - run : cat VERSION | xargs opam pin . -n --with-version
186132 if : ${{ !matrix.skip-test }}
187133 shell : bash
188134
189- - run : opam install conf-c++
190- # Otherwise, the next step fails reinstalling gcc while compiling
191- # other packages
192- if : ${{ !matrix.skip-test && runner.os == 'Windows' }}
193-
194135 - run : opam install . --with-test --deps-only
195136 # Install the test dependencies
196137 if : ${{ !matrix.skip-test }}
0 commit comments