Skip to content

Merge pull request #368 from ianthomas23/backports_v1.2.1 #84

Merge pull request #368 from ianthomas23/backports_v1.2.1

Merge pull request #368 from ianthomas23/backports_v1.2.1 #84

Workflow file for this run

name: Build binary wheels and sdist
on:
push:
tags:
- v*
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build_wheels:
name: ${{ matrix.arch }} wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
#env:
#MACOSX_DEPLOYMENT_TARGET: "10.9"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
arch: aarch64
- os: ubuntu-20.04
arch: ppc64le
- os: ubuntu-20.04
arch: s390x
- os: ubuntu-20.04
arch: x86_64
- os: macOS-11
arch: arm64
- os: macOS-11
arch: x86_64
- os: windows-2019
arch: AMD64
- os: windows-2019
arch: x86
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup MSVC (32-bit)
if: ${{ matrix.arch == 'x86' }}
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: 'x86'
- name: Fix PATH on win32
# Avoid this in GHA: "ERROR: Found GNU link.exe instead of MSVC link.exe"
if: ${{ matrix.arch == 'x86' }}
run: |
rm /c/Program\ Files/Git/usr/bin/link.EXE
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS: ${{ matrix.arch }}
- uses: actions/upload-artifact@v4
with:
name: wheels_${{ matrix.os }}_${{ matrix.arch }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install build
- name: Build sdist
run: |
python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
merge:
name: Merge build artifacts
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: build_wheels_artifacts
delete-merged: true