Skip to content

v0.9.0p1

v0.9.0p1 #31

Workflow file for this run

on:
release:
types: [created, edited]
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 on ${{ matrix.os }} (${{ matrix.target }} - ${{ matrix.interpreter || 'all' }}${{ matrix.os == 'linux' && format(' - {0}', matrix.manylinux == 'auto' && 'manylinux' || matrix.manylinux) || '' }})
# only run on push to master and on release
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'Full Build')
strategy:
fail-fast: true
matrix:
os: [linux, macos, windows]
target: [x86_64, aarch64]
manylinux: [auto]
include:
# manylinux for various platforms, plus x86_64 pypy
- os: linux
manylinux: auto
target: i686
- os: linux
manylinux: auto
target: aarch64
- os: linux
manylinux: auto
target: armv7
interpreter: 3.9 3.10 3.11 3.12 3.13
- os: linux
manylinux: auto
target: x86_64
interpreter: pypy3.9 pypy3.10
# not supported by zydis/zycore:
# - os: linux
# manylinux: auto
# target: ppc64le
# interpreter: 3.9 3.10 3.11 3.12 3.13
# - os: linux
# manylinux: auto
# target: s390x
# interpreter: 3.9 3.10 3.11 3.12 3.13
# musllinux
- os: linux
manylinux: musllinux_1_1
target: x86_64
- os: linux
manylinux: musllinux_1_1
target: aarch64
- os: linux
manylinux: musllinux_1_1
target: armv7
# macos
# all versions x86_64
# arm pypy and older pythons which can't be run on the arm hardware for PGO
- os: macos
target: x86_64
- os: macos
target: aarch64
interpreter: 3.9 pypy3.9 pypy3.10
# windows
- os: windows
target: x86_64
# pypy doesn't seem to link today? needs investigation
# https://github.com/williballenthin/lancelot/actions/runs/11592290081/job/32273843597
interpreter: 3.9 3.10 3.11 3.12 3.13
- os: windows
target: i686
python-architecture: x86
# i686 not supported by pypy
interpreter: 3.9 3.10 3.11 3.12 3.13
exclude:
# zydis doesn't seem to build on aarch64
# https://github.com/williballenthin/lancelot/actions/runs/11592290081/job/32273845822
- os: windows
target: aarch64
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 || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }} --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 || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }} --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
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