Skip to content

Commit 1c50f70

Browse files
committed
Setup MSVC for cibuildwheel
1 parent 84dd8c1 commit 1c50f70

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

.github/workflows/python-wheels.yaml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@ jobs:
9595
strategy:
9696
matrix:
9797
config:
98-
- {os: "ubuntu-20.04", label: "pyodide", platform: "pyodide"}
99-
- {os: "ubuntu-20.04", label: "linux", platform: "auto"}
100-
- {os: "windows-2019", label: "windows", platform: "auto"}
101-
- {os: "macOS-13", label: "macOS", platform: "auto"}
102-
- {os: "macOS-14", label: "macOS-arm64", platform: "auto"}
103-
- {os: ["self-hosted", "arm"], label: "linux-arm64", platform: "auto"}
98+
- {os: "ubuntu-20.04", label: "pyodide", platform: "pyodide", arch: "auto"}
99+
- {os: "ubuntu-20.04", label: "linux", platform: "auto", arch: "auto"}
100+
- {os: "windows-2019", label: "windows-x86", platform: "auto", arch: "x86"}
101+
- {os: "windows-2019", label: "windows-amd64", platform: "auto", arch: "AMD64"}
102+
- {os: "macOS-13", label: "macOS", platform: "auto", arch: "auto"}
103+
- {os: "macOS-14", label: "macOS-arm64", platform: "auto", arch: "auto"}
104+
- {os: ["self-hosted", "arm"], label: "linux-arm64", platform: "auto", arch: "auto"}
104105

105106
steps:
106107
- uses: actions/checkout@v4
@@ -109,9 +110,28 @@ jobs:
109110
fetch-tags: true
110111

111112
- uses: actions/setup-python@v5
113+
if: matrix.config.arch != 'x86'
112114
with:
113115
python-version: "3.12"
114116

117+
- name: Setup MSVC (64-bit)
118+
if: matrix.config.arch == 'AMD64'
119+
uses: ilammy/msvc-dev-cmd@v1
120+
with:
121+
arch: x64
122+
123+
- uses: actions/setup-python@v5
124+
if: matrix.config.arch == 'x86'
125+
with:
126+
python-version: "3.12"
127+
architecture: x86
128+
129+
- name: Setup MSVC (32-bit)
130+
if: matrix.config.arch == 'x86'
131+
uses: ilammy/msvc-dev-cmd@v1
132+
with:
133+
arch: x86
134+
115135
- name: Install cibuildwheel
116136
run: python -m pip install cibuildwheel==2.21.1
117137

@@ -127,6 +147,7 @@ jobs:
127147
CIBW_TEST_REQUIRES: pytest
128148
CIBW_TEST_COMMAND: pytest {package}/tests -vv
129149
CIBW_PLATFORM: ${{ matrix.config.platform }}
150+
CIBW_ARCHS: ${{ matrix.config.arch }}
130151

131152
- uses: actions/upload-artifact@v4
132153
with:

0 commit comments

Comments
 (0)