oir is building barkeep wheels #169
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: build-wheels | |
run-name: ${{ github.actor }} is building barkeep wheels | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
release: | |
types: | |
- published | |
jobs: | |
build-wheels: | |
name: Build py${{ matrix.version }} wheels for ${{ matrix.platform[1] }} ${{ matrix.platform[2] }} | |
timeout-minutes: 40 | |
runs-on: ${{ matrix.platform[0] }} | |
strategy: | |
matrix: | |
platform: | |
- [ubuntu-20.04, manylinux, x86_64] | |
- [ubuntu-20.04, manylinux, i686] | |
- [ubuntu-20.04, manylinux, aarch64] | |
- [ubuntu-20.04, manylinux, ppc64le] | |
- [ubuntu-20.04, manylinux, s390x] | |
- [ubuntu-20.04, musllinux, x86_64] | |
- [ubuntu-20.04, musllinux, i686] | |
- [ubuntu-20.04, musllinux, aarch64] | |
- [ubuntu-20.04, musllinux, ppc64le] | |
- [ubuntu-20.04, musllinux, s390x] | |
- [macos-13, macosx, x86_64] | |
- [macos-14, macosx, arm64] | |
version: [39, 310, 311, 312] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.16.2 | |
env: | |
CIBW_BUILD: "cp${{ matrix.version }}-${{ matrix.platform[1] }}*" | |
CIBW_ARCHS: ${{ matrix.platform[2] }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build-sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
upload-pypi: | |
needs: [build-wheels, build-sdist] | |
runs-on: ubuntu-latest | |
environment: pypi | |
permissions: | |
id-token: write | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
# unpacks default artifact into dist/ | |
# if `name: artifact` is omitted, the action will create extra parent dir | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 |