Skip to content

Wheel builder

Wheel builder #48

Workflow file for this run

---
# Workflow to build wheels.
name: Wheel builder
on: workflow_dispatch
jobs:
build_wheels:
name: Build wheel for ${{ matrix.python }}-${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# manylinux builds
- os: ubuntu-20.04
python: "cp38"
platform: manylinux_x86_64
- os: ubuntu-20.04
python: "cp39"
platform: manylinux_x86_64
- os: ubuntu-20.04
python: "cp310"
platform: manylinux_x86_64
- os: ubuntu-20.04
python: "cp311"
platform: manylinux_x86_64
- os: ubuntu-20.04
python: "cp312"
platform: manylinux_x86_64
# manylinux pypy builds
- os: ubuntu-20.04
python: "pp38"
platform: manylinux_x86_64
- os: ubuntu-20.04
python: "pp39"
platform: manylinux_x86_64
- os: ubuntu-20.04
python: "pp310"
platform: manylinux_x86_64
# MacOS builds
- os: macos-11
python: "cp38"
platform: macosx_*
- os: macos-11
python: "cp39"
platform: macosx_*
- os: macos-11
python: "cp310"
platform: macosx_*
- os: macos-11
python: "cp311"
platform: macosx_*
- os: macos-11
python: "cp312"
platform: macosx_*
# MacOS PyPy builds
- os: macos-11
python: "pp38"
platform: macosx_x86_64
- os: macos-11
python: "pp39"
platform: macosx_x86_64
- os: macos-11
python: "pp310"
platform: macosx_x86_64
# Windows builds
- os: windows-2019
python: "cp38"
platform: win_amd64
- os: windows-2019
python: "cp39"
platform: win_amd64
- os: windows-2019
python: "cp310"
platform: win_amd64
- os: windows-2019
python: "cp311"
platform: win_amd64
- os: windows-2019
python: "cp312"
platform: win_amd64
# Windows PyPy builds
- os: windows-2019
python: "pp38"
platform: win_amd64
- os: windows-2019
python: "pp39"
platform: win_amd64
- os: windows-2019
python: "pp310"
platform: win_amd64
steps:
- name: Checkout xcsf
uses: actions/checkout@v4
with:
submodules: true
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL_MACOS: CC=gcc-11 CXX=g++-11
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY: 3
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout xcsf
uses: actions/checkout@v4
with:
submodules: true
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
...