Skip to content

Commit dee8450

Browse files
committed
Fix
1 parent c76670c commit dee8450

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,37 @@ jobs:
5757
C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache
5858
key: cibuildwheel-${{ runner.os }}
5959

60-
- name: Install virtualenv
61-
run: python -m pip install virtualenv
60+
# Pre-download virtualenv for macOS
61+
- name: Pre-download virtualenv (macOS)
62+
if: runner.os == 'macOS'
63+
run: |
64+
mkdir -p ~/Library/Caches/cibuildwheel
65+
curl -L -H "Authorization: Bearer $GITHUB_TOKEN" \
66+
https://github.com/pypa/get-virtualenv/raw/20.26.6/public/virtualenv.pyz \
67+
-o ~/Library/Caches/cibuildwheel/virtualenv-20.26.6.pyz
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
71+
# Pre-download virtualenv for Windows
72+
- name: Pre-download virtualenv (Windows)
73+
if: runner.os == 'Windows'
74+
shell: pwsh
75+
run: |
76+
$cache = "$env:LOCALAPPDATA\pypa\cibuildwheel\Cache"
77+
New-Item -ItemType Directory -Force -Path $cache
78+
Invoke-WebRequest `
79+
-Headers @{Authorization="Bearer $env:GITHUB_TOKEN"} `
80+
-Uri "https://github.com/pypa/get-virtualenv/raw/20.26.6/public/virtualenv.pyz" `
81+
-OutFile "$cache\virtualenv-20.26.6.pyz"
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6284

6385
- name: Build wheels
6486
uses: pypa/cibuildwheel@v2.21
6587
env:
6688
CIBW_SKIP: "pp38-*"
6789
CIBW_BUILD_VERBOSITY: 1
90+
6891
- name: Upload wheels
6992
uses: actions/upload-artifact@v4
7093
with:

0 commit comments

Comments
 (0)