Reach for the arcs #618
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: Pip build | |
# Run on the main branch and on tags (note conditional below) | |
on: | |
push: | |
branches: | |
- main | |
# tags: | |
# - v* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_sdist: | |
name: Build SDist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build SDist | |
run: pipx run build --sdist | |
- name: Check metadata | |
run: pipx run twine check dist/* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
build_wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
# Launch separate job for each python. The build is so much longer than | |
# machine configuration/setup, so parallel builds will be faster. More | |
# importantly, github times out after 6 hours _per job_. | |
cpversion: ["cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "cp312"] | |
os: [ { runs-on: ubuntu-latest, cibw-arch: manylinux_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_arm64}, { runs-on: windows-latest, cibw-arch: win_amd64} ] | |
exclude: | |
- os: { runs-on: macos-latest, cibw-arch: macosx_arm64} | |
cpversion: "cp36" | |
- os: { runs-on: macos-latest, cibw-arch: macosx_arm64} | |
cpversion: "cp37" | |
name: Build wheels ${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }} | |
runs-on: ${{ matrix.os.runs-on }} | |
env: | |
CIBW_BUILD_VERBOSITY: 3 | |
CIBW_BEFORE_BUILD_LINUX : "yum install -y libXrandr libXrandr-devel libXinerama libXinerama-devel libXcursor libXcursor-devel libXi libXi-devel" | |
# Build using the latest manylinux2014 release, instead of the cibuildwheel | |
# pinned version | |
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest | |
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest | |
CIBW_BUILD: "${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }}" | |
# CIBW_TEST_SKIP: "*-macosx_arm64" | |
CIBW_ENVIRONMENT: "MAX_JOBS=2" | |
# Why universal2 here? It's not included above in CIBW_BUILD | |
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" | |
CIBW_ENVIRONMENT_MACOS: "CMAKE_OSX_ARCHITECTURES=\"${{ matrix.os.cibw-arch == 'macosx_x86_64' && 'x86_64' || matrix.os.cibw-arch == 'macosx_arm64' && 'arm64' || matrix.os.cibw-arch == 'macosx_universal2' && 'arm64;x86_64' || '' }}\"" | |
MACOSX_DEPLOYMENT_TARGET: 10.16 | |
# CIBW_PRERELEASE_PYTHONS: True | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Build wheels | |
uses: pypa/[email protected] | |
# Upload binaries to github | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: | | |
./wheelhouse/*.whl | |
./wheelhouse/*.tar.gz |