@@ -114,12 +114,28 @@ 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-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
122+ restore-keys : |
123+ ${{ runner.os }}-poetry-
124+
117125 # Publish the source distribution with the version that's in
118126 # the repository, otherwise the tests will fail
119127 - name : Compile source distribution
120128 run : python3 -m poetry build --format=sdist
121129 if : startsWith(matrix.os, 'ubuntu')
122130
131+ - name : Set up cache for cibuildwheel output
132+ uses : actions/cache@v3
133+ with :
134+ path : wheelhouse
135+ key : ${{ runner.os }}-cibuildwheel-${{ hashFiles('pyproject.toml') }}
136+ restore-keys : |
137+ ${{ runner.os }}-cibuildwheel-
138+
123139 - name : Build wheels
124140125141 with :
@@ -244,12 +260,28 @@ jobs:
244260 - name : Set version with RC
245261 run : python -m poetry version "${{ env.RELEASE_CANDIDATE }}"
246262
263+ - name : Cache Poetry
264+ uses : actions/cache@v3
265+ with :
266+ path : ~/.cache/pypoetry
267+ key : ${{ runner.os }}-poetry-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
268+ restore-keys : |
269+ ${{ runner.os }}-poetry-
270+
247271 # Publish the source distribution with the version that's in
248272 # the repository, otherwise the tests will fail
249273 - name : Compile source distribution
250274 run : python3 -m poetry build --format=sdist
251275 if : startsWith(matrix.os, 'ubuntu')
252276
277+ - name : Set up cache for cibuildwheel output
278+ uses : actions/cache@v3
279+ with :
280+ path : wheelhouse
281+ key : ${{ runner.os }}-cibuildwheel-${{ hashFiles('pyproject.toml') }}
282+ restore-keys : |
283+ ${{ runner.os }}-cibuildwheel-
284+
253285 - name : Build wheels
254286255287 with :
0 commit comments