@@ -125,6 +125,22 @@ jobs:
125
125
options : --privileged
126
126
127
127
steps :
128
+ - name : Cache package managers
129
+ uses : actions/cache@v4
130
+ with :
131
+ path : |
132
+ /var/cache/apt
133
+ /var/lib/apt
134
+ /var/cache/dnf
135
+ /var/cache/yum
136
+ /var/cache/zypp
137
+ /var/cache/apk
138
+ ~/.cache/pip
139
+ key : ${{ matrix.os}}-${{ matrix.distro }}-${{ matrix.python_version }}-packages-${{ github.sha }}
140
+ restore-keys : |
141
+ ${{ matrix.os}}-${{ matrix.distro }}-${{ matrix.python_version }}-packages-
142
+ ${{ matrix.os}}-${{ matrix.distro }}-packages-
143
+
128
144
- name : Install tar if needed
129
145
if : contains(matrix.distro, 'opensuse')
130
146
run : |
@@ -182,6 +198,18 @@ jobs:
182
198
python${{ matrix.python_version }} -m ensurepip
183
199
python${{ matrix.python_version }} -m pip install --upgrade pip wheel
184
200
201
+ - name : Cache pyenv
202
+ if : contains(matrix.distro, 'archlinux')
203
+ uses : actions/cache@v4
204
+ with :
205
+ path : |
206
+ ~/.pyenv
207
+ ~/.cache/pyenv
208
+ key : ${{ matrix.os}}-${{ matrix.distro }}-pyenv-${{ matrix.python_version }}-${{ hashFiles('.python-version') }}
209
+ restore-keys : |
210
+ ${{ matrix.os}}-${{ matrix.distro }}-pyenv-${{ matrix.python_version }}-
211
+ ${{ matrix.os}}-${{ matrix.distro }}-pyenv-
212
+
185
213
- name : Install Python and dependencies (Arch Linux)
186
214
if : contains(matrix.distro, 'archlinux')
187
215
run : |
@@ -219,6 +247,14 @@ jobs:
219
247
echo "Available wheel files:"
220
248
find ./wheels/ -name "*.whl" -type f
221
249
250
+ - name : Cache Python virtual environment
251
+ uses : actions/cache@v4
252
+ with :
253
+ path : venv
254
+ key : ${{ matrix.os}}-${{ matrix.distro }}-${{ matrix.python_version }}-venv-${{ hashFiles('./wheels/*.whl') }}
255
+ restore-keys : |
256
+ ${{ matrix.os}}-${{ matrix.distro }}-${{ matrix.python_version }}-venv-
257
+
222
258
- name : Create a Virtual Environment
223
259
shell : bash
224
260
run : |
@@ -324,6 +360,16 @@ jobs:
324
360
# Basic import test
325
361
python3 -c "import libdebug; print('libdebug imported successfully on Alpine/musl')"
326
362
363
+ - name : Cache test dependencies
364
+ uses : actions/cache@v4
365
+ with :
366
+ path : |
367
+ venv/lib/python*/site-packages
368
+ ~/.cache/pip
369
+ key : ${{ matrix.os}}-${{ matrix.distro }}-${{ matrix.python_version }}-test-deps-${{ github.sha }}
370
+ restore-keys : |
371
+ ${{ matrix.os}}-${{ matrix.distro }}-${{ matrix.python_version }}-test-deps-
372
+
327
373
- name : Install Python build tools and test dependencies
328
374
shell : bash
329
375
run : |
0 commit comments