@@ -17,15 +17,24 @@ jobs:
17
17
DEBIAN_FRONTEND : noninteractive
18
18
TESTPL_JOBS : 4
19
19
run : |
20
- sudo apt-get install -yq gcc gdb g++ maven jq flex bison libxml2-utils cpanminus
20
+ sudo apt-get install -yq gcc gdb g++ maven jq flex bison libxml2-utils cpanminus ccache
21
21
make -C src minisat2-download
22
22
cpanm Thread::Pool::Simple
23
+ - name : Prepare ccache
24
+ uses : actions/cache@v2
25
+ with :
26
+ path : .ccache
27
+ key : ${{ matrix.os }}-make
28
+ - name : Zero ccache stats and limit in size
29
+ run : ccache -z --max-size=500M
23
30
- name : Build with make
24
31
run : |
25
- make -C src CXX='/usr/bin/g++' -j2
26
- make -C unit CXX='/usr/bin/g++' -j2
27
- make -C jbmc/src CXX='/usr/bin/g++' -j2
28
- make -C jbmc/unit CXX='/usr/bin/g++' -j2
32
+ make -C src CXX='ccache /usr/bin/g++' -j2
33
+ make -C unit CXX='ccache /usr/bin/g++' -j2
34
+ make -C jbmc/src CXX='ccache /usr/bin/g++' -j2
35
+ make -C jbmc/unit CXX='ccache /usr/bin/g++' -j2
36
+ - name : Print ccache stats
37
+ run : ccache -s
29
38
- name : Run unit tests
30
39
run : |
31
40
make -C unit test
@@ -52,15 +61,24 @@ jobs:
52
61
# user input
53
62
DEBIAN_FRONTEND : noninteractive
54
63
run : |
55
- sudo apt-get install -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils cpanminus dpkg-dev
64
+ sudo apt-get install -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils cpanminus dpkg-dev ccache
56
65
cpanm Thread::Pool::Simple
66
+ - name : Prepare ccache
67
+ uses : actions/cache@v2
68
+ with :
69
+ path : .ccache
70
+ key : ${{ matrix.os }}-Release
57
71
- name : Configure using CMake
58
72
run : |
59
73
mkdir build
60
74
cd build
61
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
75
+ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="/usr/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/bin/g++" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
76
+ - name : Zero ccache stats and limit in size
77
+ run : ccache -z --max-size=500M
62
78
- name : Build with Ninja
63
79
run : cd build; ninja
80
+ - name : Print ccache stats
81
+ run : ccache -s
64
82
- name : Check if package building works
65
83
run : |
66
84
cd build
@@ -78,14 +96,23 @@ jobs:
78
96
with :
79
97
submodules : true
80
98
- name : Fetch dependencies
81
- run : brew install maven flex bison
99
+ run : brew install maven flex bison ccache
100
+ - name : Prepare ccache
101
+ uses : actions/cache@v2
102
+ with :
103
+ path : .ccache
104
+ key : ${{ matrix.os }}-Make
105
+ - name : Zero ccache stats and limit in size
106
+ run : ccache -z --max-size=500M
82
107
- name : Build using Make
83
108
run : |
84
109
make -C src minisat2-download
85
- make -C src
86
- make -C jbmc/src
87
- make -C unit
88
- make -C jbmc/unit
110
+ make -C src CXX="ccache clang++"
111
+ make -C jbmc/src CXX="ccache clang++"
112
+ make -C unit "CXX=ccache clang++"
113
+ make -C jbmc/unit "CXX=ccache clang++"
114
+ - name : Print ccache stats
115
+ run : ccache -s
89
116
- name : Run unit tests
90
117
run : cd unit; ./unit_tests
91
118
- name : Run JBMC unit tests
@@ -102,14 +129,23 @@ jobs:
102
129
with :
103
130
submodules : true
104
131
- name : Fetch dependencies
105
- run : brew install cmake ninja maven flex bison
132
+ run : brew install cmake ninja maven flex bison ccache
133
+ - name : Prepare ccache
134
+ uses : actions/cache@v2
135
+ with :
136
+ path : .ccache
137
+ key : ${{ matrix.os }}-Release
138
+ - name : Zero ccache stats and limit in size
139
+ run : ccache -z --max-size=500M
106
140
- name : Configure using CMake
107
141
run : |
108
142
mkdir build
109
143
cd build
110
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
144
+ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=" /usr/bin/clang" -DCMAKE_CXX_COMPILER=" /usr/bin/clang++" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
111
145
- name : Build with Ninja
112
146
run : cd build; ninja
147
+ - name : Print ccache stats
148
+ run : ccache -s
113
149
- name : Run CTest
114
150
run : cd build; ctest -V -L CORE .
115
151
@@ -191,17 +227,26 @@ jobs:
191
227
submodules : recursive
192
228
- name : Fetch dependencies
193
229
run : |
194
- choco install winflexbison3
230
+ choco install winflexbison3 ccache
231
+ - name : Prepare ccache
232
+ uses : actions/cache@v2
233
+ with :
234
+ path : .ccache
235
+ key : ${{ matrix.os }}-Release
236
+ - name : Zero ccache stats and limit in size
237
+ run : ccache -z --max-size=500M
195
238
-
uses :
microsoft/[email protected]
196
239
- name : Configure with cmake
197
240
run : |
198
241
New-Item -ItemType Directory -Path build
199
242
Set-Location build
200
- cmake ..
243
+ cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
201
244
- name : Build Release
202
245
run : |
203
246
Set-Location build
204
247
cmake --build . --config Release
248
+ - name : Print ccache stats
249
+ run : ccache -s
205
250
- name : Create packages
206
251
id : create_packages
207
252
# We need to get the path to cpack because fascinatingly,
@@ -223,16 +268,25 @@ jobs:
223
268
with :
224
269
submodules : recursive
225
270
- name : Fetch dependencies
226
- run : sudo apt install g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev
271
+ run : sudo apt install g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
272
+ - name : Prepare ccache
273
+ uses : actions/cache@v2
274
+ with :
275
+ path : .ccache
276
+ key : ${{ matrix.os }}-Release
277
+ - name : Zero ccache stats and limit in size
278
+ run : ccache -z --max-size=500M
227
279
- name : Configure CMake
228
280
run : |
229
281
mkdir build
230
282
cd build
231
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
283
+ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
232
284
- name : Build using Ninja
233
285
run : |
234
286
cd build
235
287
ninja
288
+ - name : Print ccache stats
289
+ run : ccache -s
236
290
- name : Run CTest
237
291
run : cd build; ctest . -V -L CORE -C Release
238
292
- name : Create packages
0 commit comments