Fixing windows build #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test build wheel | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build_wheels: | |
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
matrix: | |
# From wheel.yml of numpy (https://github.com/numpy/numpy/blob/main/.github/workflows/wheels.yml): | |
# GitHub Actions doesn't support pairing matrix values together, let's improvise | |
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026 | |
buildplat: | |
- [ubuntu-latest, manylinux_x86_64] | |
- [ubuntu-latest, musllinux_x86_64] | |
- [ubuntu-latest, manylinux_aarch64] | |
- [ubuntu-latest, musllinux_aarch64] | |
# macos-13 is an intel runner, macos-14 is apple silicon | |
- [macos-13, macosx_x86_64] | |
- [macos-14, macosx_arm64] | |
# - [windows-latest, win_amd64, ""] | |
# - [windows-2022, win32, ""] | |
python: ["cp38", "cp39", "cp310", "cp311", "cp312", "pp39"] | |
exclude: | |
# - buildplat: [windows-2022, win32] | |
# python: "pp39" | |
- buildplat: [ ubuntu-22.04, musllinux_x86_64 ] | |
python: "pp39" | |
- buildplat: [ ubuntu-22.04, musllinux_aarch64 ] | |
python: "pp39" | |
env: | |
CIBW_ENVIRONMENT_MACOS: > | |
CFLAGS='-s' | |
CXXFLAGS='-s' | |
MACOSX_DEPLOYMENT_TARGET='10.15' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up QEMU | |
if: ${{ contains(matrix.buildplat[1], 'linux_aarch64') }} | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Setup MSVC (32-bit) | |
if: ${{ matrix.buildplat[1] == 'win32' }} | |
uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1 | |
with: | |
architecture: 'x86' | |
- name: Build wheels | |
uses: pypa/cibuildwheel@79b0dd328794e1180a7268444d46cdf12e1abd01 # v2.21.0 | |
env: | |
CIBW_PRERELEASE_PYTHONS: True | |
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz |