Skip to content

Commit 5e0382a

Browse files
committed
Fix ccache following recommendations from: stack-of-tasks/pinocchio#2627
Parallel build w/ 2 threads Display ccache stats
1 parent 78b21d4 commit 5e0382a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/macos-linux-windows-pixi.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ jobs:
2929
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
3030
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
3131
CCACHE_COMPRESS: true
32-
CCACHE_COMPRESSLEVEL: 6
32+
CCACHE_COMPRESSLEVEL: 5
33+
# Since pixi will install a compiler, the compiler mtime will be changed.
34+
# This can invalidate the cache (https://ccache.dev/manual/latest.html#config_compiler_check)
35+
CCACHE_COMPILERCHECK: content
36+
BUILD_ADVANCED_TESTING: ${{ matrix.BUILD_ADVANCED_TESTING }}
3337

3438
strategy:
3539
fail-fast: false
@@ -56,13 +60,24 @@ jobs:
5660

5761
- name: Build candlewick [macOS/Linux]
5862
env:
63+
CMAKE_BUILD_PARALLEL_LEVEL: 2
5964
CANDLEWICK_BUILD_TYPE: ${{ matrix.build_type }}
6065
run: |
66+
# Clear ccache statistics
67+
pixi run -e ${{ matrix.environment }} ccache -z
68+
6169
pixi run -e ${{ matrix.environment }} build
6270
6371
- name: Test candlewick [macOS/Linux]
6472
run: |
6573
pixi run -e ${{ matrix.environment }} ctest --test-dir build --output-on-failure
74+
pixi shell -e ${{ matrix.environment }}
75+
python -c "import candlewick"
76+
77+
- name: Display ccache statistics
78+
shell: bash -el {0}
79+
run: |
80+
pixi run -e ${{ matrix.environment }} ccache -sv
6681
6782
check:
6883
if: always()

0 commit comments

Comments
 (0)