2024-09-09 17:08:24 +02:00
|
|
|
# This file is autogenerated by maturin v1.7.1
|
|
|
|
# To update, run
|
|
|
|
#
|
|
|
|
# maturin generate-ci github
|
|
|
|
#
|
|
|
|
name: python
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-11-17 14:33:57 +01:00
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
2024-09-09 17:08:24 +02:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
linux:
|
|
|
|
runs-on: ${{ matrix.platform.runner }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
platform:
|
|
|
|
- runner: ubuntu-latest
|
|
|
|
target: x86_64
|
2024-09-09 17:36:53 +02:00
|
|
|
#- runner: ubuntu-latest
|
|
|
|
# target: x86
|
|
|
|
#- runner: ubuntu-latest
|
|
|
|
# target: aarch64
|
|
|
|
#- runner: ubuntu-latest
|
|
|
|
# target: armv7
|
2024-09-09 17:08:24 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-09-09 17:30:23 +02:00
|
|
|
- uses: arduino/setup-protoc@v3
|
2024-09-10 14:51:58 +02:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2024-09-09 17:08:24 +02:00
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
- name: Build wheels
|
|
|
|
uses: PyO3/maturin-action@v1
|
|
|
|
with:
|
2024-09-09 17:36:53 +02:00
|
|
|
working-directory: dist/py
|
2024-09-09 17:08:24 +02:00
|
|
|
target: ${{ matrix.platform.target }}
|
2024-09-09 17:49:03 +02:00
|
|
|
container: 'off'
|
2024-09-09 23:18:48 +02:00
|
|
|
args: --release --out ./build
|
2024-09-09 17:08:24 +02:00
|
|
|
sccache: 'true'
|
|
|
|
manylinux: auto
|
|
|
|
- name: Upload wheels
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-09-09 19:47:42 +02:00
|
|
|
name: codemp-py-linux-${{ matrix.platform.target }}
|
2024-09-09 23:18:48 +02:00
|
|
|
path: dist/py/build
|
2024-09-09 17:08:24 +02:00
|
|
|
|
2024-09-09 19:47:42 +02:00
|
|
|
#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
|
2024-09-10 14:51:58 +02:00
|
|
|
# with:
|
|
|
|
# repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2024-09-09 19:47:42 +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 }}
|
2024-09-09 23:18:48 +02:00
|
|
|
# args: --release --out ./build
|
2024-09-09 19:47:42 +02:00
|
|
|
# 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
|
2024-09-09 17:08:24 +02:00
|
|
|
|
|
|
|
windows:
|
|
|
|
runs-on: ${{ matrix.platform.runner }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-19 21:34:06 +02:00
|
|
|
versions:
|
|
|
|
- python: 3.8
|
2024-11-17 14:33:47 +01:00
|
|
|
extra: ''
|
|
|
|
name: 'py'
|
2024-09-19 21:34:06 +02:00
|
|
|
- python: 3.x
|
2024-11-17 14:33:47 +01:00
|
|
|
extra: '--no-default-features'
|
|
|
|
name: 'py-noabi'
|
2024-09-09 17:08:24 +02:00
|
|
|
platform:
|
|
|
|
- runner: windows-latest
|
|
|
|
target: x64
|
2024-09-09 17:36:53 +02:00
|
|
|
#- runner: windows-latest
|
|
|
|
# target: x86
|
2024-09-09 17:08:24 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-09-09 17:30:23 +02:00
|
|
|
- uses: arduino/setup-protoc@v3
|
2024-09-10 14:51:58 +02:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2024-09-09 17:08:24 +02:00
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
with:
|
2024-09-19 21:34:06 +02:00
|
|
|
python-version: ${{ matrix.versions.python }}
|
2024-09-09 17:08:24 +02:00
|
|
|
architecture: ${{ matrix.platform.target }}
|
|
|
|
- name: Build wheels
|
|
|
|
uses: PyO3/maturin-action@v1
|
|
|
|
with:
|
2024-09-09 17:36:53 +02:00
|
|
|
working-directory: dist/py
|
2024-09-09 17:08:24 +02:00
|
|
|
target: ${{ matrix.platform.target }}
|
2024-09-09 17:49:03 +02:00
|
|
|
container: 'off'
|
2024-11-17 14:33:47 +01:00
|
|
|
args: --release --out ./build ${{ matrix.versions.extra }} --features py
|
2024-09-09 17:08:24 +02:00
|
|
|
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-09 17:08:24 +02:00
|
|
|
|
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
|
2024-09-10 14:51:58 +02:00
|
|
|
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
|
2024-09-09 17:08:24 +02:00
|
|
|
|
|
|
|
sdist:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build sdist
|
|
|
|
uses: PyO3/maturin-action@v1
|
|
|
|
with:
|
2024-09-09 17:36:53 +02:00
|
|
|
working-directory: dist/py
|
2024-09-09 17:08:24 +02:00
|
|
|
command: sdist
|
2024-09-09 23:18:48 +02:00
|
|
|
args: --out ./build
|
2024-09-09 17:08:24 +02:00
|
|
|
- name: Upload sdist
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-09-09 19:47:42 +02:00
|
|
|
name: codemp-py-sdist
|
2024-09-09 23:18:48 +02:00
|
|
|
path: dist/py/build
|
2024-09-09 17:08:24 +02:00
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2024-09-10 00:35:07 +02:00
|
|
|
needs: [linux, windows, macos, sdist]
|
2024-09-09 17:08:24 +02:00
|
|
|
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
|
2024-09-09 22:57:26 +02:00
|
|
|
- run: tree
|
|
|
|
working-directory: dist/py
|
2024-09-09 21:11:31 +02:00
|
|
|
- uses: PyO3/maturin-action@v1
|
2024-09-09 17:08:24 +02:00
|
|
|
env:
|
2024-09-09 21:11:31 +02:00
|
|
|
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
2024-09-09 17:08:24 +02:00
|
|
|
with:
|
2024-09-09 22:57:26 +02:00
|
|
|
working-directory: dist/py
|
2024-09-09 17:08:24 +02:00
|
|
|
command: upload
|
2024-09-09 19:47:42 +02:00
|
|
|
args: --non-interactive --skip-existing codemp-py-*/*
|