Skip to content

Commit ac10f80

Browse files
committed
ci: Improve ccache in CI
1 parent 460c5f1 commit ac10f80

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
3535
CCACHE_COMPRESS: true
3636
CCACHE_COMPRESSLEVEL: 6
37+
# Since pixi will install a compiler, the compiler mtime will be changed.
38+
# This can invalidate the cache (https://ccache.dev/manual/latest.html#config_compiler_check)
39+
CCACHE_COMPILERCHECK: content
3740

3841
strategy:
3942
fail-fast: false
@@ -75,6 +78,10 @@ jobs:
7578
cache: true
7679
environments: ${{ matrix.environment }}
7780

81+
- name: Clear ccache statistics [MacOS/Linux/Windows]
82+
run: |
83+
pixi run -e ${{ matrix.environment }} ccache -z
84+
7885
- name: Build EigenPy [MacOS/Linux/Windows]
7986
env:
8087
CMAKE_BUILD_PARALLEL_LEVEL: 2
@@ -83,6 +90,10 @@ jobs:
8390
run: |
8491
pixi run -e ${{ matrix.environment }} test
8592
93+
- name: Show ccache statistics [MacOS/Linux/Windows]
94+
run: |
95+
pixi run -e ${{ matrix.environment }} ccache -sv
96+
8697
check:
8798
if: always()
8899
name: check-macos-linux-windows-pixi

0 commit comments

Comments
 (0)