mirror of
https://github.com/emmett-framework/granian.git
synced 2025-12-23 05:36:49 +00:00
Update CI release workflow
This commit is contained in:
parent
4e87e49b42
commit
23ac0bcd94
1 changed files with 64 additions and 158 deletions
222
.github/workflows/release.yml
vendored
222
.github/workflows/release.yml
vendored
|
|
@ -6,6 +6,7 @@ on:
|
|||
|
||||
env:
|
||||
MATURIN_VERSION: 0.14.10
|
||||
PY_ALL: 3.7 3.8 3.9 3.10 3.11 pypy3.7 pypy3.8 pypy3.9
|
||||
|
||||
jobs:
|
||||
sdist:
|
||||
|
|
@ -21,7 +22,7 @@ jobs:
|
|||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --sdist --interpreter python${{ matrix.python-config.version }}
|
||||
args: --release --sdist --interpreter 3.10
|
||||
target: x64
|
||||
manylinux: off
|
||||
container: off
|
||||
|
|
@ -31,172 +32,77 @@ jobs:
|
|||
name: wheels
|
||||
path: target/wheels/*.tar.gz
|
||||
|
||||
linux-gnu:
|
||||
runs-on: ubuntu-latest
|
||||
wheel-unix:
|
||||
name: wheel ${{ matrix.platform || matrix.os }}(${{ matrix.target }})
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-config:
|
||||
- version: 3.7
|
||||
lib: cp37-cp37m
|
||||
- version: 3.8
|
||||
lib: cp38-cp38
|
||||
- version: 3.9
|
||||
lib: cp39-cp39
|
||||
- version: '3.10'
|
||||
lib: cp310-cp310
|
||||
- version: '3.11'
|
||||
lib: cp311-cp311
|
||||
target:
|
||||
- arch: x86_64
|
||||
- arch: aarch64
|
||||
|
||||
os: [ubuntu, macos]
|
||||
target: [x86_64, aarch64]
|
||||
# manylinux: [auto]
|
||||
include:
|
||||
- os: ubuntu
|
||||
platform: linux
|
||||
- os: macos
|
||||
interpreter: 3.7 3.8 3.9 3.10 3.11 pypy3.9
|
||||
- os: ubuntu
|
||||
platform: linux
|
||||
target: aarch64
|
||||
container: messense/manylinux_2_24-cross:aarch64
|
||||
# - os: ubuntu
|
||||
# platform: linux
|
||||
# target: x86_64
|
||||
# manylinux: musllinux_1_1
|
||||
# - os: ubuntu
|
||||
# platform: linux
|
||||
# target: aarch64
|
||||
# manylinux: musllinux_1_1
|
||||
exclude:
|
||||
- os: windows
|
||||
target: aarch64
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pyo3/maturin-action@v1
|
||||
env:
|
||||
PYO3_CROSS_PYTHON_VERSION: '${{ matrix.python-config.version }}'
|
||||
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python-config.lib }}/lib
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --interpreter python${{ matrix.python-config.version }}
|
||||
target: ${{ matrix.target.arch }}
|
||||
manylinux: auto
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: target/wheels
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pyo3/maturin-action@v1
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --interpreter ${{ matrix.interpreter || env.PY_ALL }}
|
||||
target: ${{ matrix.target }}
|
||||
# manylinux: ${{ matrix.manylinux || 'auto' }}
|
||||
manylinux: auto
|
||||
container: ${{ matrix.container }}
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: target/wheels
|
||||
|
||||
linux-gnu-pypy:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
pypy:
|
||||
- pypy3.7
|
||||
- pypy3.8
|
||||
- pypy3.9
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pyo3/maturin-action@v1
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --interpreter ${{ matrix.pypy }}
|
||||
target: x86_64
|
||||
manylinux: auto
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: target/wheels
|
||||
|
||||
linux-musl:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-config:
|
||||
- version: 3.7
|
||||
lib: cp37-cp37m
|
||||
- version: 3.8
|
||||
lib: cp38-cp38
|
||||
- version: 3.9
|
||||
lib: cp39-cp39
|
||||
- version: '3.10'
|
||||
lib: cp310-cp310
|
||||
- version: '3.11'
|
||||
lib: cp311-cp311
|
||||
target:
|
||||
- arch: x86_64
|
||||
- arch: aarch64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pyo3/maturin-action@v1
|
||||
env:
|
||||
PYO3_CROSS_PYTHON_VERSION: '${{ matrix.python-config.version }}'
|
||||
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python-config.lib }}/lib
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --interpreter python${{ matrix.python-config.version }}
|
||||
target: ${{ matrix.target.arch }}
|
||||
manylinux: musllinux_1_1
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: target/wheels
|
||||
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-config:
|
||||
- version: 3.7
|
||||
interpreter: python3.7
|
||||
- version: 3.8
|
||||
interpreter: python3.8
|
||||
- version: 3.9
|
||||
interpreter: python3.9
|
||||
- version: '3.10'
|
||||
interpreter: python3.10
|
||||
- version: '3.11'
|
||||
interpreter: python3.11
|
||||
- version: 'pypy3.9'
|
||||
interpreter: pypy
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-config.version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-config.version }}
|
||||
- uses: pyo3/maturin-action@v1
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --interpreter ${{ matrix.python-config.interpreter }}
|
||||
target: x86_64
|
||||
- uses: pyo3/maturin-action@v1
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --universal2 --interpreter ${{ matrix.python-config.interpreter }}
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: target/wheels
|
||||
|
||||
windows:
|
||||
wheel-win:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8, 3.9, '3.10', '3.11', 'pypy3.9']
|
||||
|
||||
env:
|
||||
PY_ALL: 3.8 3.9 3.10 3.11 C:\hostedtoolcache\windows\PyPy\3.9.16\x86\python3.exe
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: pyo3/maturin-action@v1
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release
|
||||
target: x86_64
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: target/wheels
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: pypy3.9
|
||||
- uses: pyo3/maturin-action@v1
|
||||
with:
|
||||
maturin-version: v${{ env.MATURIN_VERSION }}
|
||||
command: build
|
||||
args: --release --interpreter ${{ env.PY_ALL }}
|
||||
target: x86_64
|
||||
manylinux: auto
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: target/wheels
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ sdist, linux-gnu, linux-musl, macos, windows ]
|
||||
needs: [ sdist, wheel-unix, wheel-win ]
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue