Skip to content

github actions: fixes for trying to build all wheels using cibuildwheel #259

github actions: fixes for trying to build all wheels using cibuildwheel

github actions: fixes for trying to build all wheels using cibuildwheel #259

Workflow file for this run

name: Build wheels
on: [push, pull_request]
jobs:
build_wheels_linux:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
architecture: [x86_64, aarch64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Setup variables for aarch64
if: matrix.architecture == 'aarch64'
run: |
echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV
echo "CIBW_PLATFORM=linux" >> $GITHUB_ENV
echo "CIBW_EMULATOR=linux/aarch64" >> $GITHUB_ENV
- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_LINUX: ${{ 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_mac:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
architecture: [x86_64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Set macOS Deployment Target
run: |
export MACOSX_DEPLOYMENT_TARGET=11.0
echo "CIBW_PLATFORM=macos" >> $GITHUB_ENV
- 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'
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_WINDOWS: ${{ 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