Skip to content

Commit 648f64f

Browse files
committed
chore: use caching
1 parent e411643 commit 648f64f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/build-upload.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,23 @@ jobs:
132132
with:
133133
python-version: 3.8
134134

135+
- name: CIBW_CACHE_PATH
136+
if: ${{ github.ref_type != 'tag' }}
137+
uses: actions/cache@v5 # zizmor: ignore[cache-poisoning]
138+
with:
139+
path: "${{ runner.temp }}/cibw_cache"
140+
key: cibw-${{ matrix.build || matrix.platform }}-${{ matrix.archs }}-${{ hashFiles('.github/workflows/build-upload.yml') }}
141+
restore-keys: |
142+
cibw-${{ matrix.build || matrix.platform }}-${{ matrix.archs }}-
143+
135144
- name: Build wheels
136145
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
137146
env:
138147
CIBW_ARCHS: "${{ matrix.archs }}"
139148
CIBW_BUILD: "${{ matrix.build && '*-' || ''}}${{ matrix.build }}*"
140149
CIBW_ENABLE: "${{ startsWith(github.ref, 'refs/tags/v') && '' || 'cpython-prerelease'}}"
141150
CIBW_PLATFORM: "${{ matrix.platform }}"
151+
CIBW_CACHE_PATH: "${{ runner.temp }}/cibw_cache"
142152

143153
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
144154
with:

0 commit comments

Comments
 (0)