Skip to content

Commit 84f7791

Browse files
committed
Enable ccache for the linux*make*clang job.
1 parent 9990fbe commit 84f7791

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

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

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ jobs:
6262
check-ubuntu-20_04-make-clang:
6363
runs-on: ubuntu-20.04
6464
env:
65-
CC: "/usr/bin/clang"
66-
CXX: "/usr/bin/clang++"
65+
CC: "ccache /usr/bin/clang"
66+
CXX: "ccache /usr/bin/clang++"
6767
steps:
6868
- uses: actions/checkout@v2
6969
with:
@@ -75,20 +75,36 @@ jobs:
7575
DEBIAN_FRONTEND: noninteractive
7676
run: |
7777
sudo apt-get update
78-
sudo apt-get install --no-install-recommends -yq clang-10 clang++-10 gdb maven jq flex bison libxml2-utils cpanminus
78+
sudo apt-get install --no-install-recommends -yq clang-10 clang++-10 gdb maven jq flex bison libxml2-utils cpanminus ccache
7979
make -C src minisat2-download
8080
cpanm Thread::Pool::Simple
81+
- name: Prepare ccache
82+
uses: actions/cache@v2
83+
with:
84+
path: .ccache
85+
key: ${{ runner.os }}-20.04-make-clang-${{ github.ref }}-${{ github.sha }}-PR
86+
restore-keys: |
87+
${{ runner.os }}-20.04-make-clang-${{ github.ref }}
88+
${{ runner.os }}-20.04-make-clang
89+
- name: ccache environment
90+
run: |
91+
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
92+
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
93+
- name: Zero ccache stats and limit in size
94+
run: ccache -z --max-size=500M
8195
- name: Build with make
8296
run: |
8397
make -C src -j2
8498
make -C unit -j2
8599
make -C jbmc/src -j2
86100
make -C jbmc/unit -j2
101+
- name: Print ccache stats
102+
run: ccache -s
87103
- name: Run unit tests
88104
run: |
89105
make -C unit test
90106
make -C jbmc/unit test
91-
- name: Running expected failure unit tests
107+
- name: Run expected failure unit tests
92108
run: |
93109
make TAGS="[!shouldfail]" -C unit test
94110
make TAGS="[!shouldfail]" -C jbmc/unit test
@@ -97,7 +113,8 @@ jobs:
97113
make -C regression test-parallel JOBS=2
98114
make -C regression/cbmc test-paths-lifo
99115
env PATH=$PATH:`pwd`/src/solvers make -C regression/cbmc test-cprover-smt2
100-
make -C jbmc/regression test-parallel JOBS=2
116+
make -C jbmc/regression test-parallel JOBS=2
117+
101118
check-ubuntu-20_04-cmake-gcc:
102119
runs-on: ubuntu-20.04
103120
steps:

0 commit comments

Comments
 (0)