-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28d6e7f
commit b719df3
Showing
1 changed file
with
106 additions
and
164 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,174 +68,116 @@ jobs: | |
maturin develop | ||
pytest | ||
check-build-linux: | ||
runs-on: ubuntu-latest | ||
check-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: | ||
python: [ | ||
{ version: '3.13', abi: 'cp312-cp313' }, | ||
] | ||
target: [x86_64, i686, aarch64, armv7] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pylancelot for Linux (${{ matrix.target }}) | ||
env: | ||
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}/lib | ||
with: | ||
target: ${{ matrix.target }} | ||
manylinux: auto | ||
command: build | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pylancelot/Cargo.toml | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pyflirt for Linux (${{ matrix.target }}) | ||
env: | ||
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}/lib | ||
with: | ||
target: ${{ matrix.target }} | ||
manylinux: auto | ||
command: build | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pyflirt/Cargo.toml | ||
- uses: actions/upload-artifact@v4 | ||
name: upload | ||
with: | ||
name: wheels-linux-${{ matrix.python.version }}-${{ matrix.target }} | ||
path: target/wheels/*.whl | ||
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.8 3.9 3.10 3.11 3.12 3.13 | ||
- os: linux | ||
manylinux: auto | ||
target: ppc64le | ||
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 | ||
- os: linux | ||
manylinux: auto | ||
target: s390x | ||
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 | ||
- os: linux | ||
manylinux: auto | ||
target: x86_64 | ||
interpreter: pypy3.9 pypy3.10 | ||
|
||
check-build-pypy: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [ | ||
{ version: 'pypy3.10' }, | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pylancelot for Linux PyPy (${{ matrix.version }}) | ||
with: | ||
manylinux: auto | ||
command: build | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pylancelot/Cargo.toml | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pyflirt for Linux PyPy (${{ matrix.version }}) | ||
with: | ||
manylinux: auto | ||
command: build | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pyflirt/Cargo.toml | ||
- uses: actions/upload-artifact@v4 | ||
name: upload | ||
with: | ||
name: wheels-linux-${{ matrix.python.version }} | ||
path: target/wheels/*.whl | ||
# 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 | ||
|
||
check-build-windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
target: [x64, x86] | ||
python: [ | ||
{ version: '3.12' }, | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python.version }} | ||
architecture: ${{ matrix.target }} | ||
- name: install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
default: true | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pylancelot for windows (${{ matrix.target }}) | ||
with: | ||
command: build | ||
target: ${{ matrix.target }} | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pylancelot/Cargo.toml | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pyflirt for windows (${{ matrix.target }}) | ||
with: | ||
command: build | ||
target: ${{ matrix.target }} | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pyflirt/Cargo.toml | ||
- uses: actions/upload-artifact@v4 | ||
name: upload | ||
with: | ||
name: wheels-windows-${{ matrix.python.version }}-${{ matrix.target }} | ||
path: target/wheels/*.whl | ||
# 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.8 3.9 pypy3.9 pypy3.10 | ||
|
||
check-build-macos: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
python: [ | ||
{ version: '3.12' }, | ||
] | ||
# windows; | ||
# x86_64 pypy builds are not PGO optimized | ||
# i686 not supported by pypy | ||
# aarch64 only 3.11 and up, also not PGO optimized | ||
- os: windows | ||
target: x86_64 | ||
interpreter: pypy3.9 pypy3.10 | ||
- os: windows | ||
target: i686 | ||
python-architecture: x86 | ||
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 | ||
- os: windows | ||
target: aarch64 | ||
interpreter: 3.11 3.12 3.13 | ||
|
||
exclude: | ||
# See above; disabled for now. | ||
- os: windows | ||
target: aarch64 | ||
|
||
runs-on: ${{ (matrix.os == 'linux' && 'ubuntu') || matrix.os }}-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python.version }} | ||
architecture: x64 | ||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.24.3' | ||
- name: install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
default: true | ||
- 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 | ||
# Limit windows builds to 1.77 to keep Windows 7 support. | ||
# FIXME: Unpin when Python 3.8 support is dropped. (3.9 requires Windows 10) | ||
rust-toolchain: ${{ (matrix.os == 'windows' && '1.77') || 'stable' }} | ||
docker-options: -e CI | ||
|
||
# | ||
# aarch64 build | ||
# | ||
- name: Install aarch64-apple-darwin toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: aarch64-apple-darwin | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pylancelot for macos (universal2) | ||
env: | ||
# needed due to: https://stackoverflow.com/a/56092773/87207 | ||
MACOSX_DEPLOYMENT_TARGET: 10.9 | ||
with: | ||
command: build | ||
args: --interpreter=python${{ matrix.python.version }} --release --target universal2-apple-darwin --strip --manifest-path=./pylancelot/Cargo.toml | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pyflirt for macos (universal2) | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: 10.9 | ||
with: | ||
command: build | ||
args: --interpreter=python${{ matrix.python.version }} --release --target universal2-apple-darwin --strip --manifest-path=./pyflirt/Cargo.toml | ||
# | ||
# x86_64 build | ||
# | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pylancelot for macos (x86_64) | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: 10.9 | ||
with: | ||
command: build | ||
target: x86_64 | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pylancelot/Cargo.toml | ||
- uses: PyO3/maturin-action@v1 | ||
name: build pyflirt for macos (x86_64) | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: 10.9 | ||
with: | ||
command: build | ||
target: x86_64 | ||
args: --interpreter=python${{ matrix.python.version }} --release --strip --manifest-path=./pyflirt/Cargo.toml | ||
- uses: actions/upload-artifact@v4 | ||
name: upload | ||
with: | ||
name: wheels-macos-${{ matrix.python.version }} | ||
path: target/wheels/*.whl | ||
|
||
- 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 | ||
# Limit windows builds to 1.77 to keep Windows 7 support. | ||
# FIXME: Unpin when Python 3.8 support is dropped. (3.9 requires Windows 10) | ||
rust-toolchain: ${{ (matrix.os == 'windows' && '1.77') || 'stable' }} | ||
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 |