Skip to content

Commit e90054e

Browse files
committed
CI: add emscripten job
This adds a build with emcc as a CI PR job.
1 parent 32c465a commit e90054e

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,43 @@ jobs:
190190
run: make -C regression/verilog test-z3
191191
- name: Print ccache stats
192192
run: ccache -s
193+
194+
# This job takes approximately 17 minutes
195+
check-ubuntu-24_04-make-emcc:
196+
name: Emscripten build
197+
runs-on: ubuntu-24.04
198+
steps:
199+
- uses: actions/checkout@v4
200+
with:
201+
submodules: recursive
202+
- name: Fetch dependencies
203+
env:
204+
# This is needed in addition to -yq to prevent apt-get from asking for
205+
# user input
206+
DEBIAN_FRONTEND: noninteractive
207+
run: |
208+
sudo apt-get update
209+
sudo apt-get install --no-install-recommends -yq emscripten flex bison libxml2-utils cpanminus ccache
210+
- name: Prepare ccache
211+
uses: actions/cache@v4
212+
with:
213+
path: .ccache
214+
save-always: true
215+
key: ${{ runner.os }}-24.04-make-emcc-${{ github.ref }}-${{ github.sha }}-PR
216+
restore-keys: |
217+
${{ runner.os }}-24.04-make-emcc-${{ github.ref }}
218+
${{ runner.os }}-24.04-make-emcc
219+
- name: ccache environment
220+
run: |
221+
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
222+
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
223+
- name: Zero ccache stats and limit in size
224+
run: ccache -z --max-size=500M
225+
- name: Get minisat
226+
run: make -C lib/cbmc/src minisat2-download
227+
- name: Build with make
228+
run: make -C src -j4 CXX="ccache emcc" HOSTCXX="ccache g++" BUILD_ENV=Unix LINKLIB="emar rc \$@ \$^" AR="emar" EXEEXT=".html"
229+
- name: print version number via node.js
230+
run: node --no-experimental-fetch src/ebmc/ebmc.js --version
231+
- name: Print ccache stats
232+
run: ccache -s

src/ic3/minisat/minisat/utils/System.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ double IctMinisat::memUsedPeak(bool) { return memUsed(); }
9191

9292
#else
9393
double IctMinisat::memUsed() { return 0; }
94-
double IctMinisat::memUsedPeak() { return 0; }
94+
double IctMinisat::memUsedPeak(bool) { return 0; }
9595
#endif
9696

9797

0 commit comments

Comments
 (0)