ci: build more whls #35
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
on: | |
release: | |
types: [created, edited] | |
pull_request: | |
types: [opened, reopened] | |
name: publish pypi | |
jobs: | |
# derived from pydantic-core build: | |
# https://github.com/pydantic/pydantic-core/blob/8568136ee9abdca8a1c8b631750a4896bb25522e/.github/workflows/ci.yml#L399 | |
build: | |
name: build for ${{ matrix.os }} / ${{ matrix.target }} / ${{ matrix.interpreter }} | |
# only run on release or if PR has label "Full Build" | |
if: startsWith(github.ref, 'refs/tags/') || contains(github.event.pull_request.labels.*.name, 'Full Build') | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [foo] | |
target: [foo] | |
manylinux: [foo] | |
include: | |
- os: linux | |
manylinux: auto | |
interpreter: 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 | |
target: x86_64 | |
- os: linux | |
manylinux: auto | |
interpreter: 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 | |
target: aarch64 | |
- os: linux | |
manylinux: auto | |
interpreter: 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 | |
target: i686 | |
- os: linux | |
manylinux: auto | |
interpreter: 3.9 3.10 3.11 3.12 3.13 # no pypy | |
target: armv7 | |
# not supported by zydis/zycore: | |
# target: ppc64le | |
# target: s390x | |
- os: macos | |
interpreter: 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 | |
target: x86_64 | |
- os: macos | |
interpreter: 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 | |
target: aarch64 | |
- os: windows | |
interpreter: 3.9 3.10 3.11 3.12 3.13 # missing pypy | |
# pypy doesn't seem to link today? needs investigation | |
# https://github.com/williballenthin/lancelot/actions/runs/11592290081/job/32273843597 | |
target: x86_64 | |
- os: windows | |
interpreter: 3.9 3.10 3.11 3.12 3.13 # missing pypy | |
target: i686 | |
python-architecture: x86 | |
exclude: | |
- os: foo | |
target: foo | |
manylinux: foo | |
runs-on: ${{ (matrix.os == 'linux' && 'ubuntu') || matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
architecture: ${{ matrix.python-architecture || 'x64' }} | |
- name: build pylancelot wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
manylinux: ${{ matrix.manylinux }} | |
args: --release --out dist --interpreter ${{ matrix.interpreter }} --manifest-path=./pylancelot/Cargo.toml | |
rust-toolchain: nightly | |
docker-options: -e CI | |
- name: build pyflirt wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
manylinux: ${{ matrix.manylinux }} | |
args: --release --out dist --interpreter ${{ matrix.interpreter }} --manifest-path=./pyflirt/Cargo.toml | |
rust-toolchain: nightly | |
docker-options: -e CI | |
- run: ${{ (matrix.os == 'windows' && 'dir') || 'ls -lh' }} dist/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pypi_files_${{ matrix.os }}_${{ matrix.target }}_${{ matrix.interpreter || 'all' }}_${{ matrix.manylinux }} | |
path: dist | |
pypi-publish: | |
runs-on: ubuntu-latest | |
# only run on release, not on any PR | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [ build ] | |
environment: | |
name: release | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts/ | |
- name: move files to dist/ | |
run: | | |
shopt -s globstar # Enable recursive globbing (**) | |
rm -rf dist/ | |
mkdir dist/ | |
cp -r artifacts/**/*.whl dist/ | |
- name: publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |
verbose: true | |
print-hash: true |