Skip to content

Commit 5fd6d7b

Browse files
committed
ci: ccache emscripten build
1 parent 6ddd561 commit 5fd6d7b

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

.circleci/config.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,26 @@ commands:
232232
echo "ccache not available, skipping configuration"
233233
fi
234234
235+
finalize_ccache:
236+
parameters:
237+
os:
238+
type: string
239+
steps:
240+
- run:
241+
name: Show ccache stats
242+
command: |
243+
if command -v ccache &> /dev/null; then
244+
echo "ccache final stats:"
245+
ccache --show-stats
246+
ccache --show-compression-stats
247+
else
248+
echo "ccache not available"
249+
fi
250+
- save_cache:
251+
key: ccache-v1-<<parameters.os>>-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/all-cmake-files.txt" }}
252+
paths:
253+
- ~/.ccache
254+
235255
setup_prerelease_commit_hash:
236256
steps:
237257
- run:
@@ -255,15 +275,8 @@ commands:
255275
- run:
256276
name: Build
257277
command: scripts/ci/build.sh
258-
- run:
259-
name: Show ccache stats
260-
command: |
261-
echo "ccache final stats:"
262-
ccache --show-stats
263-
- save_cache:
264-
key: ccache-v1-<<parameters.os>>-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/all-cmake-files.txt" }}
265-
paths:
266-
- ~/.ccache
278+
- finalize_ccache:
279+
os: <<parameters.os>>
267280

268281
run_build_ossfuzz:
269282
steps:
@@ -1290,10 +1303,14 @@ jobs:
12901303
MAKEFLAGS: -j 10
12911304
steps:
12921305
- checkout
1306+
- setup_ccache:
1307+
os: ems
12931308
- run:
12941309
name: Build
12951310
command: |
12961311
scripts/ci/build_emscripten.sh
1312+
- finalize_ccache:
1313+
os: ems
12971314
- store_artifacts:
12981315
path: upload/soljson.js
12991316
destination: soljson.js

scripts/ci/build_emscripten.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ function build() {
7474
-DBoost_USE_STATIC_LIBS=1 \
7575
-DBoost_USE_STATIC_RUNTIME=1 \
7676
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" \
77+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
78+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
7779
-DTESTS=0 \
7880
..
7981
make soljson

0 commit comments

Comments
 (0)