docs: add Windows NuGet cache guidance#2839
Conversation
agriyakhetarpal
left a comment
There was a problem hiding this comment.
This looks neat, thanks! Could you please move these changes to after the "Windows ARM64 builds" section? Also, inline comments below.
I will leave it open in case anyone else has comments about the wording.
| ```yaml | ||
| env: | ||
| CIBW_CACHE_PATH: ${{ runner.temp }}\cibw-cache | ||
|
|
||
| steps: | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ env.CIBW_CACHE_PATH }}\nuget-cpython | ||
| key: cibw-nuget-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/workflows/*', 'pyproject.toml') }} | ||
|
|
||
| - uses: pypa/cibuildwheel@v3.4.1 | ||
| ``` |
There was a problem hiding this comment.
Since we are caching the nuget-cpython directory, which only exists on Windows, can we remove runner.os from the cache key?
joerick
left a comment
There was a problem hiding this comment.
I wonder if this advice could be broadened to caching the whole CIBW_CACHE_DIR? I believe it would also benefit macOS by preventing the redownload of CPython installers there too. Curious if anyone's had experience with doing that.
|
Hmm, it looks like #2842 would be such a PR, it looks like it's more general! |
Adds a short Windows docs section for caching cibuildwheel's NuGet CPython installs between CI runs. I kept the example GitHub Actions-specific and included the cache poisoning warning called out in the issue.
Closes #1527.
Checks run locally: