Skip to content

Commit cad24c7

Browse files
committed
Use ccache-ghac-adapter
1 parent 2786111 commit cad24c7

File tree

6 files changed

+40
-72
lines changed

6 files changed

+40
-72
lines changed

.github/workflows/build_linux.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,13 @@ jobs:
164164
echo "DO_PUBLISH=$DO_PUBLISH" | tee -a $GITHUB_ENV
165165
echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME" | tee -a $GITHUB_ENV
166166
167-
echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
168-
169-
- name: Restore ccache files
170-
uses: actions/cache@v4
167+
- name: Set up ccache
168+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
171169
with:
172-
path: ${{ github.workspace }}/.ccache
173-
key: ${{runner.os}}-${{runner.arch}}-ccache-${{ env.CCACHE_TIMESTAMP }}
174-
restore-keys: ${{runner.os}}-${{runner.arch}}-ccache-
175-
- name: Setup ccache
170+
namespace: ccache-${{runner.os}}-${{runner.arch}}
171+
github-token: ${{ secrets.GITHUB_TOKEN }}
172+
- name: Configure ccache
176173
run: |
177-
sudo apt-get update && sudo apt-get install -y ccache
178174
bash ./buildscripts/ci/tools/setup_ccache_config.sh
179175
180176
- name: Install Qt

.github/workflows/build_macos.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,13 @@ jobs:
147147
echo "DO_PUBLISH=$DO_PUBLISH" | tee -a $GITHUB_ENV
148148
echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME" | tee -a $GITHUB_ENV
149149
150-
echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
151-
152-
- name: Restore ccache files
153-
uses: actions/cache@v4
150+
- name: Set up ccache
151+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
154152
with:
155-
path: ${{ github.workspace }}/.ccache
156-
key: ${{runner.os}}-${{runner.arch}}-ccache-${{ env.CCACHE_TIMESTAMP }}
157-
restore-keys: ${{runner.os}}-${{runner.arch}}-ccache-
158-
- name: Setup ccache
153+
namespace: ccache-${{runner.os}}-${{runner.arch}}
154+
github-token: ${{ secrets.GITHUB_TOKEN }}
155+
- name: Configure ccache
159156
run: |
160-
brew install ccache
161157
bash ./buildscripts/ci/tools/setup_ccache_config.sh
162158
163159
- name: Install Qt

.github/workflows/build_wasm.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,13 @@ jobs:
4747
echo "BUILD_NUMBER=$BUILD_NUMBER" | tee -a $GITHUB_ENV
4848
echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME" | tee -a $GITHUB_ENV
4949
50-
echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
51-
52-
- name: Restore ccache files
53-
uses: actions/cache@v4
50+
- name: Set up ccache
51+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
5452
with:
55-
path: ${{ github.workspace }}/.ccache
56-
key: wasm-ccache-${{ env.CCACHE_TIMESTAMP }}
57-
restore-keys: wasm-ccache-
58-
- name: Setup ccache
53+
namespace: ccache-wasm
54+
github-token: ${{ secrets.GITHUB_TOKEN }}
55+
- name: Configure ccache
5956
run: |
60-
sudo apt-get update && sudo apt-get install -y ccache
6157
bash ./buildscripts/ci/tools/setup_ccache_config.sh
6258
6359
- name: Install Qt

.github/workflows/build_windows.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,13 @@ jobs:
141141
echo "DO_PUBLISH=$DO_PUBLISH" | tee -a $GITHUB_ENV
142142
echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME" | tee -a $GITHUB_ENV
143143
144-
echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
145-
146-
- name: Restore ccache files
147-
uses: actions/cache@v4
144+
- name: Set up ccache
145+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
148146
with:
149-
path: ${{ github.workspace }}/.ccache
150-
key: ${{runner.os}}-${{runner.arch}}-ccache-${{ env.CCACHE_TIMESTAMP }}
151-
restore-keys: ${{runner.os}}-${{runner.arch}}-ccache-
152-
- name: Setup ccache
147+
namespace: ccache-${{runner.os}}-${{runner.arch}}
148+
github-token: ${{ secrets.GITHUB_TOKEN }}
149+
- name: Configure ccache
153150
run: |
154-
choco install -y ccache
155151
bash ./buildscripts/ci/tools/setup_ccache_config.sh
156152
157153
- name: Install Qt
@@ -291,17 +287,13 @@ jobs:
291287
echo "DO_PUBLISH=$DO_PUBLISH" | tee -a $GITHUB_ENV
292288
echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME" | tee -a $GITHUB_ENV
293289
294-
echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
295-
296-
- name: Restore ccache files
297-
uses: actions/cache@v4
290+
- name: Set up ccache
291+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
298292
with:
299-
path: ${{ github.workspace }}/.ccache
300-
key: ${{runner.os}}-${{runner.arch}}-ccache-${{ env.CCACHE_TIMESTAMP }}
301-
restore-keys: ${{runner.os}}-${{runner.arch}}-ccache-
302-
- name: Setup ccache
293+
namespace: ccache-${{runner.os}}-${{runner.arch}}
294+
github-token: ${{ secrets.GITHUB_TOKEN }}
295+
- name: Configure ccache
303296
run: |
304-
choco install -y ccache
305297
bash ./buildscripts/ci/tools/setup_ccache_config.sh
306298
307299
- name: Install Qt

.github/workflows/check_unit_tests.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ jobs:
2929
3030
echo "BUILD_NUMBER=$BUILD_NUMBER" | tee -a $GITHUB_ENV
3131
32-
echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
33-
34-
- name: Restore ccache files
35-
uses: actions/cache@v4
32+
- name: Set up ccache
33+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
3634
with:
37-
path: ${{ github.workspace }}/.ccache
38-
key: ${{runner.os}}-${{runner.arch}}-tests-ccache-${{ env.CCACHE_TIMESTAMP }}
39-
restore-keys: ${{runner.os}}-${{runner.arch}}-tests-ccache-
40-
- name: Setup ccache
35+
namespace: ccache-${{runner.os}}-${{runner.arch}}
36+
github-token: ${{ secrets.GITHUB_TOKEN }}
37+
- name: Configure ccache
4138
run: |
42-
sudo apt-get update && sudo apt-get install -y ccache
4339
bash ./buildscripts/ci/tools/setup_ccache_config.sh
4440
4541
- name: Free up disk space

.github/workflows/check_visual_tests.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,13 @@ jobs:
6767
- name: Clone repository
6868
uses: actions/checkout@v6
6969

70-
- name: Get ccache timestamp
71-
run: echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
72-
- name: Restore ccache files
73-
uses: actions/cache@v4
70+
- name: Set up ccache
71+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
7472
with:
75-
path: ${{ github.workspace }}/.ccache
76-
key: ${{runner.os}}-${{runner.arch}}-tests-ccache-${{ env.CCACHE_TIMESTAMP }}
77-
restore-keys: ${{runner.os}}-${{runner.arch}}-tests-ccache-
78-
- name: Setup ccache
73+
namespace: ccache-${{runner.os}}-${{runner.arch}}
74+
github-token: ${{ secrets.GITHUB_TOKEN }}
75+
- name: Configure ccache
7976
run: |
80-
sudo apt-get update && sudo apt-get install -y ccache
8177
bash ./buildscripts/ci/tools/setup_ccache_config.sh
8278
8379
- name: Install Qt
@@ -114,17 +110,13 @@ jobs:
114110
with:
115111
ref: ${{ needs.setup.outputs.reference_sha }}
116112

117-
- name: Get ccache timestamp
118-
run: echo "CCACHE_TIMESTAMP=$(date -u +"%F-%T")" | tee -a $GITHUB_ENV
119-
- name: Restore ccache files
120-
uses: actions/cache@v4
113+
- name: Set up ccache
114+
uses: cbjeukendrup/ccache-ghac-adapter-action@v0.2.0
121115
with:
122-
path: ${{ github.workspace }}/.ccache
123-
key: ${{runner.os}}-${{runner.arch}}-tests-ccache-${{ env.CCACHE_TIMESTAMP }}
124-
restore-keys: ${{runner.os}}-${{runner.arch}}-tests-ccache-
125-
- name: Setup ccache
116+
namespace: ccache-${{runner.os}}-${{runner.arch}}
117+
github-token: ${{ secrets.GITHUB_TOKEN }}
118+
- name: Configure ccache
126119
run: |
127-
sudo apt-get update && sudo apt-get install -y ccache
128120
bash ./buildscripts/ci/tools/setup_ccache_config.sh
129121
130122
- name: Install Qt

0 commit comments

Comments
 (0)