Skip to content

Wheels build updates #77

Wheels build updates

Wheels build updates #77

Workflow file for this run

# SPDX-FileCopyrightText: Daniele Nicolodi <[email protected]>
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
name: build
on:
push:
tags:
- 'v[0-9]*'
pull_request:
workflow_dispatch:
jobs:
wheels:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu
architecture: x86_64
- os: ubuntu
architecture: aarch64
- os: macos
architecture: x86_64
- os: macos
architecture: arm64
- os: windows
architecture: x86
- os: windows
architecture: AMD64
- os: windows
architecture: ARM64
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v2
with:
platforms: arm64
if: runner.os == 'Linux' && matrix.architecture == 'aarch64'
- uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
if: runner.os == 'Windows' && matrix.architecture == 'AMD64'
- uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x86
if: runner.os == 'Windows' && matrix.architecture == 'x86'
- run: pipx run cibuildwheel~=2.21.0
env:
CIBW_SKIP: pp* cp36-* *-musllinux*
CIBW_ARCHS: ${{ matrix.architecture }}
CIBW_TEST_COMMAND: python {project}/test.py
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.architecture }}
path: wheelhouse/*.whl
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: python -m pip install build
- run: python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
upload:
needs:
- wheels
- sdist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- run: python -m pip install twine
- run: python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI }}