@@ -23,10 +23,25 @@ jobs:
23
23
strategy :
24
24
matrix :
25
25
python-version : ['3.13']
26
+ env :
27
+ CCACHE_DIR : ${{ github.workspace }}/.ccache
26
28
steps :
27
29
- name : Checkout
28
30
uses : actions/checkout@v4
29
31
32
+ # Ccache
33
+ - name : Install ccache
34
+ run : |
35
+ sudo apt-get update
36
+ sudo apt-get install -y ccache
37
+ mkdir -p "${{ env.CCACHE_DIR }}"
38
+ - name : Cache ccache
39
+ uses : actions/cache@v4
40
+ with :
41
+ path : ${{ env.CCACHE_DIR }}
42
+ key : ${{ runner.os }}-wheel-native-ccache-${{ github.run_id }}
43
+ restore-keys : ${{ runner.os }}-wheel-native-ccache
44
+
30
45
- name : Install Python
31
46
uses : actions/setup-python@v5
32
47
with :
72
87
73
88
- name : Build Wheel package
74
89
run : python3 -m build -w -C local="scripts/ci/py-build-cmake.toml"
90
+ env :
91
+ CMAKE_C_COMPILER_LAUNCHER : ccache
92
+ CMAKE_CXX_COMPILER_LAUNCHER : ccache
75
93
- name : Upload Wheel
76
94
uses : actions/upload-artifact@v4
77
95
with :
95
113
done < build/python-debug/install_manifest_python_modules.txt
96
114
while IFS= read -r f || [ -n "$f" ]; do rm -f "$f"
97
115
done < build/python-release/install_manifest_python_modules.txt
116
+ env :
117
+ CMAKE_C_COMPILER_LAUNCHER : ccache
118
+ CMAKE_CXX_COMPILER_LAUNCHER : ccache
98
119
- name : Create sdist
99
120
run : python3 -m build -s
100
121
@@ -142,10 +163,25 @@ jobs:
142
163
python-version :
143
164
- python3.13
144
165
- pypy3.10-v7.3
166
+ env :
167
+ CCACHE_DIR : ${{ github.workspace }}/.ccache
145
168
steps :
146
169
- name : Checkout
147
170
uses : actions/checkout@v4
148
171
172
+ # Ccache
173
+ - name : Install ccache
174
+ run : |
175
+ sudo apt-get update
176
+ sudo apt-get install -y ccache
177
+ mkdir -p "${{ env.CCACHE_DIR }}"
178
+ - name : Cache ccache
179
+ uses : actions/cache@v4
180
+ with :
181
+ path : ${{ env.CCACHE_DIR }}
182
+ key : ${{ runner.os }}-wheel-${{ matrix.host }}-${{ matrix.python-version }}-ccache-${{ github.run_id }}
183
+ restore-keys : ${{ runner.os }}-wheel-${{ matrix.host }}-${{ matrix.python-version }}-ccache
184
+
149
185
- name : Download sdist
150
186
uses : actions/download-artifact@v4
151
187
with :
@@ -160,6 +196,7 @@ jobs:
160
196
source-dir : sdist
161
197
host : ${{ matrix.host }}
162
198
python-version : ${{ matrix.python-version }}
199
+ ccache : ccache
163
200
164
201
- name : Upload package
165
202
uses : actions/upload-artifact@v4
0 commit comments