Skip to content

Commit bb719d2

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

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

.circleci/config.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,25 @@ 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+
else
247+
echo "ccache not available"
248+
fi
249+
- save_cache:
250+
key: ccache-v1-<<parameters.os>>-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/all-cmake-files.txt" }}
251+
paths:
252+
- ~/.ccache
253+
235254
setup_prerelease_commit_hash:
236255
steps:
237256
- run:
@@ -255,15 +274,8 @@ commands:
255274
- run:
256275
name: Build
257276
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
277+
- finalize_ccache:
278+
os: <<parameters.os>>
267279

268280
run_build_ossfuzz:
269281
steps:
@@ -1290,10 +1302,14 @@ jobs:
12901302
MAKEFLAGS: -j 10
12911303
steps:
12921304
- checkout
1305+
- setup_ccache:
1306+
os: ems
12931307
- run:
12941308
name: Build
12951309
command: |
12961310
scripts/ci/build_emscripten.sh
1311+
- finalize_ccache:
1312+
os: ems
12971313
- store_artifacts:
12981314
path: upload/soljson.js
12991315
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)