Skip to content

Commit

Permalink
github actions: fixes for trying to build all wheels using cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCzarnecki committed Oct 30, 2024
1 parent a329771 commit 5357bd4
Showing 1 changed file with 41 additions and 9 deletions.
50 changes: 41 additions & 9 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,57 @@ on: [push, pull_request]

jobs:
build_wheels:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
architecture: []
os: [ubuntu-latest, macos-latest]
architecture: [x86_64]
include:
- os: ubuntu-latest
architecture: [x86_64, aarch64]
architecture: aarch64
- os: macos-latest
architecture: [x86_64, arm64]
- os: windows-latest
architecture: [x86_64, arm64]
architecture: arm64

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_LINUX: ${{ matrix.architecture }}
CIBW_ARCHS_MACOS: ${{ matrix.architecture }}
CIBW_SKIP: "cp36-* cp37-*"
run: |
cibuildwheel --output-dir wheelhouse
- name: List wheels
run: |
ls wheelhouse
- name: Upload wheels as artifact
uses: actions/upload-artifact@v3
with:
name: python-wheels
path: wheelhouse/*.whl

build_wheels_windows:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
architecture: [x86, AMD64, ARM64]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python for Windows (Only on Windows)
if: matrix.os == 'windows-latest'
Expand All @@ -35,8 +69,6 @@ jobs:
- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_LINUX: ${{ matrix.architecture }}
CIBW_ARCHS_MACOS: ${{ matrix.architecture }}
CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }}
CIBW_SKIP: "cp36-* cp37-*"
run: |
Expand Down

0 comments on commit 5357bd4

Please sign in to comment.