Skip to content

ci: update build

ci: update build #51

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
linux:
strategy:
matrix:
target: [x86_64, aarch64]
manylinux: [auto]
include:
- target: x86_64
manylinux: musllinux_1_1
- target: aarch64
manylinux: musllinux_1_1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
manylinux: ${{ matrix.manylinux }}
command: build
target: ${{ matrix.target }}
# https://github.com/PyO3/maturin-action/issues/56
args: --release --sdist -o dist --interpreter 3.9 3.10 3.11 3.12 pypy3.9 pypy3.10
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels_${{ matrix.target }}_${{ matrix.manylinux }}
path: dist
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels_windows
path: dist
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
command: build
target: universal2
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels_macos
path: dist
test-release:
name: Test Release
runs-on: ubuntu-latest
needs: [ macos, windows, linux ]
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels_*
merge-multiple: true
path: dist
- name: Test Archive Download
run: |
echo "Testing archive download"
ls -la dist # List the contents to confirm download
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ macos, windows, linux ]
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels_*
merge-multiple: true
path: dist
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *