Skip to content

Commit

Permalink
CI: build using cibuildwheel for Python 3.8 and 3.12 on all relevant …
Browse files Browse the repository at this point in the history
…architectures
  • Loading branch information
valgur committed Oct 26, 2023
1 parent 0b6c855 commit 5f6a0c5
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build Python
on:
push:
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
- 'resources/**'
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
- 'resources/**'
workflow_dispatch:
jobs:
build_wheels:
name: ${{ matrix.platform[0] }} - ${{ matrix.platform[2] }}
runs-on: ${{ matrix.platform[1] }}
strategy:
fail-fast: false
matrix:
platform:
- [Linux, ubuntu-latest, x86_64]
- [Linux, ubuntu-latest, i686]
- [Linux, ubuntu-latest, aarch64]
- [Windows, windows-latest, AMD64]
- [Windows, windows-latest, x86]
- [Windows, windows-latest, ARM64]
- [MacOS, macos-latest, x86_64]
- [MacOS, macos-latest, arm64]
# spdlog fails to build with the correct architecture on universal2
# - [MacOS, macos-latest, universal2]
# ppc64le is too obscure and slow to build due to emulation
# - [Linux, ubuntu-latest, ppc64le]
# s390x is too obscure is not compatible due to being big-endian
# - [Linux, ubuntu-latest, s390x]
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install cibuildwheel
run: python -m pip install --upgrade cibuildwheel

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS: ${{ matrix.platform[2] }}
CIBW_BUILD: cp38* cp312*
CIBW_SKIP: "*-musllinux*"

- name: Inspect
run: ls wheelhouse/
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ archs = "auto"

# Needed for full C++17 support
[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.14"
MACOSX_DEPLOYMENT_TARGET = "10.15"

0 comments on commit 5f6a0c5

Please sign in to comment.