@@ -114,12 +114,30 @@ jobs:
114114 - name : Install poetry
115115 run : pip install poetry
116116
117+ - name : Cache Poetry
118+ uses : actions/cache@v3
119+ with :
120+ path : ~/.cache/pypoetry
121+ key : ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
122+ restore-keys : |
123+ ${{ runner.os }}-poetry-${{ matrix.python-version }}-
124+ ${{ runner.os }}-poetry-
125+
117126 # Publish the source distribution with the version that's in
118127 # the repository, otherwise the tests will fail
119128 - name : Compile source distribution
120129 run : python3 -m poetry build --format=sdist
121130 if : startsWith(matrix.os, 'ubuntu')
122131
132+ - name : Set up cache for cibuildwheel output
133+ uses : actions/cache@v3
134+ with :
135+ path : wheelhouse
136+ key : ${{ runner.os }}-cibuildwheel-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
137+ restore-keys : |
138+ ${{ runner.os }}-cibuildwheel-${{ matrix.python-version }}-
139+ ${{ runner.os }}-cibuildwheel-
140+
123141 - name : Build wheels
124142125143 with :
@@ -244,12 +262,30 @@ jobs:
244262 - name : Set version with RC
245263 run : python -m poetry version "${{ env.RELEASE_CANDIDATE }}"
246264
265+ - name : Cache Poetry
266+ uses : actions/cache@v3
267+ with :
268+ path : ~/.cache/pypoetry
269+ key : ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
270+ restore-keys : |
271+ ${{ runner.os }}-poetry-${{ matrix.python-version }}-
272+ ${{ runner.os }}-poetry-
273+
247274 # Publish the source distribution with the version that's in
248275 # the repository, otherwise the tests will fail
249276 - name : Compile source distribution
250277 run : python3 -m poetry build --format=sdist
251278 if : startsWith(matrix.os, 'ubuntu')
252279
280+ - name : Set up cache for cibuildwheel output
281+ uses : actions/cache@v3
282+ with :
283+ path : wheelhouse
284+ key : ${{ runner.os }}-cibuildwheel-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
285+ restore-keys : |
286+ ${{ runner.os }}-cibuildwheel-${{ matrix.python-version }}-
287+ ${{ runner.os }}-cibuildwheel-
288+
253289 - name : Build wheels
254290255291 with :
0 commit comments