Skip to content

Commit 24c85e2

Browse files
committed
gh actions: use ccache action to store and speed up build times
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent c29c246 commit 24c85e2

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

.github/workflows/test.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ jobs:
2727
submodules: recursive
2828
- run: ./.github/scripts/install_dependencies.sh
2929

30+
- uses: hendrikmuhs/ccache-action@v1
31+
3032
- name: Test
3133
env:
3234
BUILD_TYPE: release
33-
run: ./.github/scripts/build.sh
35+
run: |
36+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
37+
./.github/scripts/build.sh
3438
3539
3640
Format:
@@ -89,12 +93,16 @@ jobs:
8993
submodules: recursive
9094
- run: ./.github/scripts/install_dependencies.sh
9195

96+
- uses: hendrikmuhs/ccache-action@v1
97+
9298
- name: Test
9399
env:
94100
#In order to get compilation warnings produced per source file, we must do a non-IPO build
95101
#We also turn warnings into errors for this target by doing a strict compile
96102
CMAKE_PARAMS: "-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_STRICT_COMPILE=on -DVTR_IPO_BUILD=off"
97-
run: ./.github/scripts/build.sh
103+
run: |
104+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
105+
./.github/scripts/build.sh
98106
99107
100108
Regression:
@@ -140,10 +148,13 @@ jobs:
140148
submodules: recursive
141149
- run: ./.github/scripts/install_dependencies.sh
142150

151+
- uses: hendrikmuhs/ccache-action@v1
152+
143153
- name: Test
144154
env:
145155
CMAKE_PARAMS: ${{ matrix.params }}
146156
run: |
157+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
147158
./.github/scripts/build.sh
148159
./run_reg_test.py ${{ matrix.suite }} -show_failures -j2
149160
@@ -178,12 +189,15 @@ jobs:
178189
submodules: recursive
179190
- run: ./.github/scripts/install_dependencies.sh
180191

192+
- uses: hendrikmuhs/ccache-action@v1
193+
181194
- name: Test
182195
env:
183196
CMAKE_PARAMS: '-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=on -DVTR_IPO_BUILD=off -DWITH_BLIFEXPLORER=on'
184197
BUILD_TYPE: debug
185198
LSAN_OPTIONS: 'exitcode=42' #Use a non-standard exit code to ensure LSAN errors are detected
186199
run: |
200+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
187201
./.github/scripts/build.sh
188202
# We skip QoR since we are only checking for errors in sanitizer runs
189203
./run_reg_test.py ${{ matrix.suite }} -show_failures -j2 -skip_qor
@@ -202,11 +216,14 @@ jobs:
202216
submodules: recursive
203217
- run: ./.github/scripts/install_dependencies.sh
204218

219+
- uses: hendrikmuhs/ccache-action@v1
220+
205221
- name: Test
206222
env:
207223
CMAKE_PARAMS: '-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=on -DVTR_IPO_BUILD=off -DWITH_BLIFEXPLORER=on'
208224
BUILD_TYPE: debug
209225
run: |
226+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
210227
./.github/scripts/build.sh
211228
./run_reg_test.py odin_reg_basic -show_failures -j2
212229
@@ -224,10 +241,13 @@ jobs:
224241
submodules: recursive
225242
- run: ./.github/scripts/install_dependencies.sh
226243

244+
- uses: hendrikmuhs/ccache-action@v1
245+
227246
- name: Test
228247
env:
229248
BUILD_TYPE: release
230249
run: |
250+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
231251
./.github/scripts/build.sh
232252
./utils/vqm2blif/test/scripts/test_vqm2blif.sh
233253
@@ -254,11 +274,14 @@ jobs:
254274
submodules: recursive
255275
- run: ./.github/scripts/install_dependencies.sh
256276

277+
- uses: hendrikmuhs/ccache-action@v1
278+
257279
- name: Test
258280
env:
259281
CMAKE_PARAMS: '-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=on -DVTR_IPO_BUILD=off -DWITH_BLIFEXPLORER=on -DODIN_USE_YOSYS=ON'
260282
BUILD_TYPE: debug
261283
run: |
284+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
262285
./.github/scripts/build.sh
263286
./run_reg_test.py ${{ matrix.suite }} -show_failures -j2
264287
@@ -288,12 +311,16 @@ jobs:
288311
submodules: recursive
289312
- run: ./.github/scripts/install_dependencies.sh
290313

314+
- uses: hendrikmuhs/ccache-action@v1
315+
291316
- name: Test
292317
env:
293318
CMAKE_PARAMS: "-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on"
294319
MATRIX_EVAL: ${{ matrix.eval }}
295320
BUILD_TYPE: ${{ matrix.build }}
296-
run: ./.github/scripts/build.sh
321+
run: |
322+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
323+
./.github/scripts/build.sh
297324
298325
299326
Coverity:
@@ -320,9 +347,13 @@ jobs:
320347
submodules: recursive
321348
- run: ./.github/scripts/install_dependencies.sh
322349

350+
- uses: hendrikmuhs/ccache-action@v1
351+
323352
- name: Test
324353
env:
325354
CMAKE_PARAMS: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on'
326355
_COVERITY_URL: 'https://scan.coverity.com/download/linux64'
327356
_COVERITY_MD5: 'd0d7d7df9d6609e578f85096a755fb8f'
328-
run: ./.github/scripts/build.sh
357+
run: |
358+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
359+
./.github/scripts/build.sh

0 commit comments

Comments
 (0)