Skip to content

Commit e7eab71

Browse files
committed
Setup ccache on CI
1 parent a1a32dd commit e7eab71

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

.github/workflows/check.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ jobs:
2828
- uses: actions/setup-node@v6
2929
with:
3030
node-version: lts/krypton
31-
- name: Setup clang-format
31+
- name: Setup clang-format and ccache
3232
uses: aminya/setup-cpp@v1
3333
with:
3434
clang-format: true
35+
- name: ccache
36+
uses: hendrikmuhs/ccache-action@v1.2
37+
with:
38+
key: ${{ github.job }}-${{ runner.os }}
3539
# Set up JDK and Android SDK only because we need weak-node-api, to build ferric-example and to run the linting
3640
# TODO: Remove this once we have a way to run linting without building the native code
3741
- name: Set up JDK 17
@@ -71,10 +75,14 @@ jobs:
7175
- uses: actions/setup-node@v6
7276
with:
7377
node-version: lts/krypton
74-
- name: Setup clang-format
78+
- name: Setup clang-format and ccache
7579
uses: aminya/setup-cpp@v1
7680
with:
7781
clang-format: true
82+
- name: ccache
83+
uses: hendrikmuhs/ccache-action@v1.2
84+
with:
85+
key: ${{ github.job }}-${{ runner.os }}
7886
- name: Set up JDK 17
7987
uses: actions/setup-java@v4
8088
with:
@@ -104,10 +112,14 @@ jobs:
104112
- uses: actions/setup-node@v6
105113
with:
106114
node-version: lts/krypton
107-
- name: Setup clang-format
115+
- name: Setup clang-format and ccache
108116
uses: aminya/setup-cpp@v1
109117
with:
110118
clang-format: true
119+
- name: ccache
120+
uses: hendrikmuhs/ccache-action@v1.2
121+
with:
122+
key: ${{ github.job }}-${{ runner.os }}
111123
- run: npm ci
112124
- run: npm run build
113125
- name: Prepare weak-node-api
@@ -127,10 +139,14 @@ jobs:
127139
- uses: actions/setup-node@v6
128140
with:
129141
node-version: lts/krypton
130-
- name: Setup clang-format
142+
- name: Setup clang-format and ccache
131143
uses: aminya/setup-cpp@v1
132144
with:
133145
clang-format: true
146+
- name: ccache
147+
uses: hendrikmuhs/ccache-action@v1.2
148+
with:
149+
key: ${{ github.job }}-${{ runner.os }}
134150
- name: Set up JDK 17
135151
uses: actions/setup-java@v3
136152
with:
@@ -164,10 +180,14 @@ jobs:
164180
- uses: actions/setup-node@v6
165181
with:
166182
node-version: lts/krypton
167-
- name: Setup clang-format
183+
- name: Setup clang-format and ccache
168184
uses: aminya/setup-cpp@v1
169185
with:
170186
clang-format: true
187+
- name: ccache
188+
uses: hendrikmuhs/ccache-action@v1.2
189+
with:
190+
key: ${{ github.job }}-${{ runner.os }}
171191
- name: Set up JDK 17
172192
uses: actions/setup-java@v3
173193
with:
@@ -199,10 +219,14 @@ jobs:
199219
- uses: actions/setup-node@v6
200220
with:
201221
node-version: lts/krypton
202-
- name: Setup clang-format
222+
- name: Setup clang-format and ccache
203223
uses: aminya/setup-cpp@v1
204224
with:
205225
clang-format: true
226+
- name: ccache
227+
uses: hendrikmuhs/ccache-action@v1.2
228+
with:
229+
key: ${{ github.job }}-${{ runner.os }}
206230
- name: Set up JDK 17
207231
uses: actions/setup-java@v4
208232
with:
@@ -283,10 +307,14 @@ jobs:
283307
- uses: actions/setup-node@v6
284308
with:
285309
node-version: lts/krypton
286-
- name: Setup clang-format
310+
- name: Setup clang-format and ccache
287311
uses: aminya/setup-cpp@v1
288312
with:
289313
clang-format: true
314+
- name: ccache
315+
uses: hendrikmuhs/ccache-action@v1.2
316+
with:
317+
key: ${{ github.job }}-${{ runner.os }}
290318
- name: Set up JDK 17
291319
uses: actions/setup-java@v3
292320
with:

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ jobs:
2121
- uses: actions/setup-node@v6
2222
with:
2323
node-version: lts/krypton
24-
- name: Setup clang-format
24+
- name: Setup clang-format and ccache
2525
uses: aminya/setup-cpp@v1
2626
with:
2727
clang-format: true
28+
- name: ccache
29+
uses: hendrikmuhs/ccache-action@v1.2
30+
with:
31+
key: ${{ github.job }}-${{ runner.os }}
2832
- name: Set up JDK 17
2933
uses: actions/setup-java@v3
3034
with:

0 commit comments

Comments
 (0)