@@ -62,13 +62,11 @@ jobs:
62
62
uses : actions/cache@v4
63
63
with :
64
64
save-always : true
65
- path : .ccache
65
+ path : /home/runner/.cache
66
66
key : ${{ runner.os }}-22.04-make-gcc-${{ github.ref }}-${{ github.sha }}-PR
67
67
restore-keys : ${{ runner.os }}-22.04-make-gcc
68
- - name : ccache environment
69
- run : |
70
- echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
71
- echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
68
+ - name : ccache path
69
+ run : ccache -p | grep cache_dir
72
70
- name : Get minisat
73
71
run : make -C lib/cbmc/src minisat2-download
74
72
- name : Build with make
@@ -213,10 +211,86 @@ jobs:
213
211
asset_name : ${{ steps.create_packages.outputs.rpm_package_name }}
214
212
asset_content_type : application/x-rpm
215
213
214
+ wasm-package :
215
+ name : Package wasm
216
+ runs-on : ubuntu-24.04
217
+ needs : [perform-draft-release]
218
+ outputs :
219
+ wasm_package_name : ${{ steps.create_packages.outputs.wasm_package_name }}
220
+ steps :
221
+ - uses : actions/checkout@v4
222
+ with :
223
+ submodules : recursive
224
+ - name : Fetch dependencies
225
+ env :
226
+ # This is needed in addition to -yq to prevent apt-get from asking for
227
+ # user input
228
+ DEBIAN_FRONTEND : noninteractive
229
+ run : |
230
+ sudo apt-get update
231
+ sudo apt-get install --no-install-recommends -yq flex bison libxml2-utils cpanminus ccache
232
+ - name : Install emscripten
233
+ run : |
234
+ # The emscripten package in Ubuntu is too far behind.
235
+ git clone https://github.com/emscripten-core/emsdk.git
236
+ cd emsdk
237
+ git checkout 3.1.31
238
+ ./emsdk install latest
239
+ ./emsdk activate latest
240
+ source ./emsdk_env.sh
241
+ emcc --version
242
+ - name : Prepare ccache
243
+ uses : actions/cache@v4
244
+ with :
245
+ path : /home/runner/.cache
246
+ save-always : true
247
+ key : ${{ runner.os }}-24.04-make-emcc-${{ github.ref }}-${{ github.sha }}-PR
248
+ restore-keys : |
249
+ ${{ runner.os }}-24.04-make-emcc-${{ github.ref }}
250
+ ${{ runner.os }}-24.04-make-emcc
251
+ - name : Zero ccache stats and limit in size
252
+ run : ccache -z --max-size=500M
253
+ - name : ccache path
254
+ run : ccache -p | grep cache_dir
255
+ - name : Get minisat
256
+ run : make -C lib/cbmc/src minisat2-download
257
+ - name : Build with make
258
+ run : |
259
+ source emsdk/emsdk_env.sh
260
+ make -C src -j4 \
261
+ BUILD_ENV=Unix \
262
+ CXX="ccache emcc -fwasm-exceptions" \
263
+ LINKFLAGS="-sEXPORTED_RUNTIME_METHODS=callMain" \
264
+ LINKLIB="emar rc \$@ \$^" \
265
+ AR="emar" \
266
+ EXEEXT=".html" \
267
+ HOSTCXX="ccache g++" \
268
+ HOSTLINKFLAGS=""
269
+ - name : print version number via node.js
270
+ run : node --no-experimental-fetch src/ebmc/ebmc.js --version
271
+ - name : Create WASM package
272
+ id : create_packages
273
+ run : |
274
+ (cd src/ebmc; tar cvfz ~/ebmc.tgz ebmc.js ebmc.wasm ebmc.html)
275
+ VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2)
276
+ echo "wasm_package_path=${HOME}/ebmc.tgz" >> $GITHUB_OUTPUT
277
+ echo "wasm_package_name=ebmc-${VERSION}-wasm.tgz" >> $GITHUB_OUTPUT
278
+ - name : Print ccache stats
279
+ run : ccache -s
280
+ - name : Upload WASM
281
+ uses : actions/upload-release-asset@v1
282
+ env :
283
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
284
+ with :
285
+ upload_url : ${{ needs.perform-draft-release.outputs.upload_url }}
286
+ asset_path : ${{ steps.create_packages.outputs.wasm_package_path }}
287
+ asset_name : ${{ steps.create_packages.outputs.wasm_package_name }}
288
+ asset_content_type : text/javascript
289
+
216
290
perform-release :
217
291
name : Perform Release
218
292
runs-on : ubuntu-20.04
219
- needs : [ubuntu-22_04-package, centos8-package, get-version-information, perform-draft-release]
293
+ needs : [ubuntu-22_04-package, centos8-package, wasm-package, get-version-information, perform-draft-release]
220
294
steps :
221
295
- name : Publish release
222
296
env :
@@ -236,8 +310,7 @@ jobs:
236
310
237
311
## Red Hat Linux and derivates
238
312
239
- For Red Hat, CentOS, Fedora, Amazon Linux,
240
- install EBMC by downloading the *.rpm package below and then run
313
+ For Red Hat, CentOS, Fedora, Amazon Linux, install EBMC by downloading the *.rpm package below and then run
241
314
242
315
\`\`\`sh
243
316
rpm -i ${{ needs.centos8-package.outputs.rpm_package_name }}
0 commit comments