codemp/.github/workflows/python.yml

191 lines
5.2 KiB
YAML
Raw Permalink Normal View History

# This file is autogenerated by maturin v1.7.1
# To update, run
#
# maturin generate-ci github
#
name: python
on:
push:
tags:
2024-11-17 14:40:39 +01:00
- 'v[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: read
jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
#- runner: ubuntu-latest
# target: x86
#- runner: ubuntu-latest
# target: aarch64
#- runner: ubuntu-latest
# target: armv7
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: dist/py
target: ${{ matrix.platform.target }}
container: 'off'
2024-09-09 23:18:48 +02:00
args: --release --out ./build
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: codemp-py-linux-${{ matrix.platform.target }}
2024-09-09 23:18:48 +02:00
path: dist/py/build
#musllinux:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# #- runner: ubuntu-latest
# # target: x86_64
# #- runner: ubuntu-latest
# # target: x86
# - runner: ubuntu-latest
# target: aarch64
# #- runner: ubuntu-latest
# # target: armv7
# steps:
# - uses: actions/checkout@v4
# - uses: arduino/setup-protoc@v3
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# working-directory: dist/py
# target: ${{ matrix.platform.target }}
2024-09-09 23:18:48 +02:00
# args: --release --out ./build
# sccache: 'true'
# manylinux: musllinux_1_2 # TODO for manylinux it runs in a container without protoc!
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: codemp-py-musllinux-${{ matrix.platform.target }}
2024-09-09 23:18:48 +02:00
# path: dist/py/build
windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
versions:
- python: 3.8
2024-11-17 14:33:47 +01:00
extra: ''
name: 'py'
- python: 3.x
2024-11-17 14:33:47 +01:00
extra: '--no-default-features'
name: 'py-noabi'
platform:
- runner: windows-latest
target: x64
#- runner: windows-latest
# target: x86
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.versions.python }}
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: dist/py
target: ${{ matrix.platform.target }}
container: 'off'
2024-11-17 14:33:47 +01:00
args: --release --out ./build ${{ matrix.versions.extra }} --features py
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
2024-11-17 14:33:47 +01:00
name: codemp-${{ matrix.versions.name }}-windows-${{ matrix.platform.target }}
2024-09-09 23:18:48 +02:00
path: dist/py/build
2024-09-10 00:35:07 +02:00
macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
#- runner: macos-12
# target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
2024-09-10 00:35:07 +02:00
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: dist/py
target: ${{ matrix.platform.target }}
container: 'off'
args: --release --out ./build
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: codemp-py-macos-${{ matrix.platform.target }}
path: dist/py/build
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
working-directory: dist/py
command: sdist
2024-09-09 23:18:48 +02:00
args: --out ./build
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: codemp-py-sdist
2024-09-09 23:18:48 +02:00
path: dist/py/build
release:
runs-on: ubuntu-latest
2024-09-10 00:35:07 +02:00
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
2024-09-09 19:51:17 +02:00
with:
pattern: codemp-py-*
2024-09-09 23:18:48 +02:00
path: dist/py
- run: tree
working-directory: dist/py
- uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
with:
working-directory: dist/py
command: upload
args: --non-interactive --skip-existing codemp-py-*/*