Skip to content

Commit 39f46ae

Browse files
authored
Fix ccache for macos (#3992)
Need to ignore time macros.
1 parent 815151e commit 39f46ae

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/macos.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set Up Cache
1919
uses: actions/cache@v4
2020
with:
21-
path: /Users/runner/Library/Caches/ccache
21+
path: ~/Library/Caches/ccache
2222
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
2323
restore-keys: |
2424
ccache-${{ github.workflow }}-${{ github.job }}-git-
@@ -31,8 +31,10 @@ jobs:
3131
run: |
3232
export CCACHE_COMPRESS=1
3333
export CCACHE_COMPRESSLEVEL=10
34-
export CCACHE_MAXSIZE=30M
34+
export CCACHE_MAXSIZE=50M
35+
export CCACHE_SLOPPINESS=time_macros
3536
ccache -z
37+
ccache --version
3638
3739
cmake -S . -B build \
3840
-DBUILD_SHARED_LIBS=ON \
@@ -46,6 +48,7 @@ jobs:
4648
4749
ctest --test-dir build --output-on-failure
4850
51+
du -hs ~/Library/Caches/ccache
4952
ccache -s
5053
5154
# Build libamrex and all tests
@@ -59,7 +62,7 @@ jobs:
5962
- name: Set Up Cache
6063
uses: actions/cache@v4
6164
with:
62-
path: /Users/runner/Library/Caches/ccache
65+
path: ~/Library/Caches/ccache
6366
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
6467
restore-keys: |
6568
ccache-${{ github.workflow }}-${{ github.job }}-git-
@@ -71,7 +74,9 @@ jobs:
7174
export CCACHE_COMPRESS=1
7275
export CCACHE_COMPRESSLEVEL=10
7376
export CCACHE_MAXSIZE=160M
77+
export CCACHE_SLOPPINESS=time_macros
7478
ccache -z
79+
ccache --version
7580
7681
cmake -S . -B build \
7782
-DCMAKE_BUILD_TYPE=Debug \
@@ -84,6 +89,7 @@ jobs:
8489
8590
ctest --test-dir build --output-on-failure
8691
92+
du -hs ~/Library/Caches/ccache
8793
ccache -s
8894
8995
save_pr_number:

0 commit comments

Comments
 (0)