Skip to content

Commit

Permalink
tweak CI bigtime
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Jan 7, 2024
1 parent c64a5db commit e309406
Showing 1 changed file with 147 additions and 10 deletions.
157 changes: 147 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI

on:
workflow_dispatch:
push:
tags: [ 'v*' ]

Expand All @@ -20,15 +21,15 @@ jobs:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - x86_64"
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release --out dist
args: --release -i python${{ matrix.python-version }} --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -43,14 +44,43 @@ jobs:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - universal"
uses: PyO3/maturin-action@v1
with:
args: --release --target universal2-apple-darwin --out dist
args: --release -i python${{ matrix.python-version }} --target universal2-apple-darwin --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
platform:
- target: x86_64-pc-windows-msvc
arch: x64
- target: i686-pc-windows-msvc
arch: x86
- target: aarch64-pc-windows-msvc
arch: x64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.arch }}
- name: "Build wheels - windows"
uses: PyO3/maturin-action@v1
with:
args: --release -i python${{ matrix.python-version }} --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -63,34 +93,141 @@ jobs:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: PyO3/maturin-action@v1.40.2
architecture: x64
- name: "Build wheels - linux"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
command: build
args: --release -o dist
args: --release -i python${{ matrix.python-version }} -o dist
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

linux-cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
platform:
- target: aarch64-unknown-linux-gnu
arch: aarch64
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16
- target: armv7-unknown-linux-gnueabihf
arch: armv7
- target: s390x-unknown-linux-gnu
arch: s390x
- target: powerpc64le-unknown-linux-gnu
arch: ppc64le
- target: powerpc64-unknown-linux-gnu
arch: ppc64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - linux-cross"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release -i python${{ matrix.python-version }} -o dist
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

musllinux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
target:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: "Build wheels - musllinux"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release -i python${{ matrix.python-version }} -o dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

musllinux-cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16
- target: armv7-unknown-linux-musleabihf
arch: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Build wheels - musllinux-cross"
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release -i python${{ matrix.python-version }} -o dist
docker-options: ${{ matrix.platform.maturin_docker_options }}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

release:
name: Release
runs-on: ubuntu-latest
needs: [ linux, macos-x86_64, macos-universal ]
needs:
- linux
- linux-cross
- macos-x86_64
- macos-universal
- musllinux
- musllinux-cross
- windows
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1.40.2
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *
args: --skip-existing *

0 comments on commit e309406

Please sign in to comment.