Skip to content

Commit 54a7b5a

Browse files
committed
Test builds using clang-14 in CI
Ubuntu 22.04 ships version 14 of clang by default. Use it in CI (and not just clang-10, as other jobs already do).
1 parent 60d4847 commit 54a7b5a

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

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

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,76 @@ jobs:
242242
- name: Run tests
243243
run: cd build; ctest . -V -L CORE -j2
244244

245+
# This job takes approximately N minutes
246+
check-ubuntu-22_04-make-clang:
247+
runs-on: ubuntu-22.04
248+
env:
249+
CC: "ccache /usr/bin/clang"
250+
CXX: "ccache /usr/bin/clang++"
251+
steps:
252+
- uses: actions/checkout@v3
253+
with:
254+
submodules: recursive
255+
- name: Fetch dependencies
256+
env:
257+
# This is needed in addition to -yq to prevent apt-get from asking for
258+
# user input
259+
DEBIAN_FRONTEND: noninteractive
260+
run: |
261+
sudo apt-get update
262+
sudo apt-get install --no-install-recommends -yq clang clang-14 gdb maven jq flex bison libxml2-utils cpanminus ccache z3
263+
make -C src minisat2-download
264+
cpanm Thread::Pool::Simple
265+
- name: Confirm z3 solver is available and log the version installed
266+
run: z3 --version
267+
- name: Download cvc-5 from the releases page and make sure it can be deployed
268+
run: |
269+
wget -O cvc5 https://github.com/cvc5/cvc5/releases/download/cvc5-${{env.cvc5-version}}/cvc5-Linux
270+
chmod u+x cvc5
271+
mv cvc5 /usr/local/bin
272+
cvc5 --version
273+
- name: Prepare ccache
274+
uses: actions/cache@v3
275+
with:
276+
path: .ccache
277+
key: ${{ runner.os }}-22.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR
278+
restore-keys: |
279+
${{ runner.os }}-22.04-make-clang-${{ github.ref }}
280+
${{ runner.os }}-22.04-make-clang
281+
- name: ccache environment
282+
run: |
283+
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
284+
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
285+
- name: Zero ccache stats and limit in size
286+
run: ccache -z --max-size=500M
287+
- name: Perform C/C++ library syntax check
288+
run: |
289+
make -C src/ansi-c library_check
290+
make -C src/cpp library_check
291+
- name: Build with make
292+
run: |
293+
make -C src -j2
294+
make -C unit -j2
295+
make -C jbmc/src -j2
296+
make -C jbmc/unit -j2
297+
- name: Print ccache stats
298+
run: ccache -s
299+
- name: Run unit tests
300+
run: |
301+
make -C unit test
302+
make -C jbmc/unit test
303+
make TAGS="[z3]" -C unit test
304+
- name: Run expected failure unit tests
305+
run: |
306+
make TAGS="[!shouldfail]" -C unit test
307+
make TAGS="[!shouldfail]" -C jbmc/unit test
308+
- name: Run regression tests
309+
run: |
310+
make -C regression test-parallel JOBS=2
311+
make -C regression/cbmc test-paths-lifo
312+
env PATH=$PATH:`pwd`/src/solvers make -C regression/cbmc test-cprover-smt2
313+
make -C jbmc/regression test-parallel JOBS=2
314+
245315
# This job takes approximately 41 minutes
246316
check-ubuntu-22_04-cmake-gcc:
247317
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)