Skip to content

Commit

Permalink
Setup MSVC for cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Oct 29, 2024
1 parent 84dd8c1 commit 5a1794c
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/python-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ jobs:
strategy:
matrix:
config:
- {os: "ubuntu-20.04", label: "pyodide", platform: "pyodide"}
- {os: "ubuntu-20.04", label: "linux", platform: "auto"}
- {os: "windows-2019", label: "windows", platform: "auto"}
- {os: "macOS-13", label: "macOS", platform: "auto"}
- {os: "macOS-14", label: "macOS-arm64", platform: "auto"}
- {os: ["self-hosted", "arm"], label: "linux-arm64", platform: "auto"}
- {os: "ubuntu-20.04", label: "pyodide", platform: "pyodide", arch: "auto"}
- {os: "ubuntu-20.04", label: "linux", platform: "auto", arch: "auto"}
- {os: "windows-2019", label: "windows-x86", platform: "auto", arch: "x86"}
- {os: "windows-2019", label: "windows-amd64", platform: "auto", arch: "AMD64"}
- {os: "macOS-13", label: "macOS", platform: "auto", arch: "auto"}
- {os: "macOS-14", label: "macOS-arm64", platform: "auto", arch: "auto"}
- {os: ["self-hosted", "arm"], label: "linux-arm64", platform: "auto", arch: "auto"}

steps:
- uses: actions/checkout@v4
Expand All @@ -112,6 +113,18 @@ jobs:
with:
python-version: "3.12"

- name: Setup MSVC (32-bit)
if: matrix.config.arch == 'x86'
uses: ilammy/msvc-dev-cmd@v1
with:
architecture: x86

- name: Setup MSVC (64-bit)
if: matrix.config.arch == 'AMD64'
uses: ilammy/msvc-dev-cmd@v1
with:
architecture: x64

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.1

Expand All @@ -127,6 +140,7 @@ jobs:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {package}/tests -vv
CIBW_PLATFORM: ${{ matrix.config.platform }}
CIBW_ARCHS: ${{ matrix.config.arch }}

- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 5a1794c

Please sign in to comment.