43
43
make -C lib/cbmc/src minisat2-download
44
44
- name : Build with make
45
45
run : make -C src -j4 CXX="ccache g++"
46
+ - name : Run unit tests
47
+ run : make -C unit -j4 CXX="ccache g++"
46
48
- name : Run the ebmc tests with SAT
47
49
run : make -C regression/ebmc test
48
50
- name : Run the ebmc tests with Z3
@@ -101,6 +103,8 @@ jobs:
101
103
make -C lib/cbmc/src minisat2-download
102
104
- name : Build with make
103
105
run : make CXX="ccache clang++" -C src -j4
106
+ - name : Run unit tests
107
+ run : make -C unit -j4 CXX="ccache clang++"
104
108
- name : Run the ebmc tests with SAT
105
109
run : make -C regression/ebmc test
106
110
- name : Run the ebmc tests with Z3
@@ -203,6 +207,8 @@ jobs:
203
207
run : make -C lib/cbmc/src minisat2-download
204
208
- name : Build with make
205
209
run : make CXX="ccache g++ -Wno-class-memaccess" LIBS="-lstdc++fs" -C src -j4
210
+ - name : Run unit tests
211
+ run : make -C unit -j4 CXX="ccache g++ -Wno-class-memaccess" LIBS="-lstdc++fs"
206
212
- name : Run the ebmc tests with SAT
207
213
run : |
208
214
rm regression/ebmc/neural-liveness/counter1.desc
@@ -246,6 +252,8 @@ jobs:
246
252
run : make -C lib/cbmc/src minisat2-download
247
253
- name : Build with make
248
254
run : make YACC="/opt/homebrew/opt/bison/bin/bison" CXX="ccache clang++" -C src -j3
255
+ - name : Run unit tests
256
+ run : make -C unit -j3 CXX="ccache g++"
249
257
- name : Run the ebmc tests with SAT
250
258
run : make -C regression/ebmc test
251
259
- name : Run the ebmc tests with Z3
@@ -279,6 +287,20 @@ jobs:
279
287
run : |
280
288
sudo apt-get update
281
289
sudo apt-get install --no-install-recommends -yq emscripten flex bison libxml2-utils cpanminus ccache
290
+ - name : Install node.js 23
291
+ uses : actions/setup-node@v4
292
+ with :
293
+ node-version : 23
294
+ - name : Install emscripten
295
+ run : |
296
+ # The emscripten package in Ubuntu is too far behind.
297
+ git clone https://github.com/emscripten-core/emsdk.git
298
+ cd emsdk
299
+ git checkout 3.1.31
300
+ ./emsdk install latest
301
+ ./emsdk activate latest
302
+ source ./emsdk_env.sh
303
+ emcc --version
282
304
- name : Prepare ccache
283
305
uses : actions/cache@v4
284
306
with :
@@ -297,9 +319,33 @@ jobs:
297
319
- name : Get minisat
298
320
run : make -C lib/cbmc/src minisat2-download
299
321
- name : Build with make
300
- run : make -C src -j4 CXX="ccache emcc" HOSTCXX="ccache g++" BUILD_ENV=Unix LINKLIB="emar rc \$@ \$^" AR="emar" EXEEXT=".html"
322
+ run : |
323
+ source emsdk/emsdk_env.sh
324
+ make -C src -j4 \
325
+ BUILD_ENV=Unix \
326
+ CXX="ccache emcc -fwasm-exceptions" \
327
+ LINKFLAGS="-sEXPORTED_RUNTIME_METHODS=callMain" \
328
+ LINKLIB="emar rc \$@ \$^" \
329
+ AR="emar" \
330
+ EXEEXT=".html" \
331
+ HOSTCXX="ccache g++" \
332
+ HOSTLINKFLAGS=""
301
333
- name : print version number via node.js
302
- run : node --no-experimental-fetch src/ebmc/ebmc.js --version
334
+ run : node --experimental-wasm-exnref src/ebmc/ebmc.js --version
335
+ - name : Compile unit tests
336
+ run : |
337
+ source emsdk/emsdk_env.sh
338
+ make -C unit unit_tests.html -j4 \
339
+ BUILD_ENV=Unix \
340
+ CXX="ccache emcc -fwasm-exceptions" \
341
+ LINKFLAGS="-sEXPORTED_RUNTIME_METHODS=callMain" \
342
+ LINKLIB="emar rc \$@ \$^" \
343
+ AR="emar" \
344
+ EXEEXT=".html" \
345
+ HOSTCXX="ccache g++" \
346
+ HOSTLINKFLAGS=""
347
+ - name : Run unit tests
348
+ run : node --experimental-wasm-exnref unit/unit_tests.js
303
349
- name : Print ccache stats
304
350
run : ccache -s
305
351
@@ -358,5 +404,10 @@ jobs:
358
404
# disable MSYS file-name mangling
359
405
MSYS2_ARG_CONV_EXCL : " *"
360
406
run : make CXX=clcache BUILD_ENV=MSVC -j4 -C src
407
+ - name : Run unit tests
408
+ env :
409
+ # disable MSYS file-name mangling
410
+ MSYS2_ARG_CONV_EXCL : " *"
411
+ run : make CXX=clcache BUILD_ENV=MSVC -j4 -C unit
361
412
- name : Print ccache stats
362
413
run : clcache -s
0 commit comments