ci: simplified workflows, disabled targets

This commit is contained in:
əlemi 2024-09-09 19:47:42 +02:00
parent 1541ede699
commit 05e8343641
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 56 additions and 111 deletions

View file

@ -10,86 +10,29 @@ permissions:
contents: read
jobs:
linux:
build:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x64
#- runner: ubuntu-latest
# target: x86
#- runner: ubuntu-latest
# target: aarch64
#- runner: ubuntu-latest
# target: armv7
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- uses: arduino/setup-protoc@v3
- run: cargo build --release --features=lua
- uses: actions/upload-artifact@v4
with:
name: codemp_native-lua-linux-${{ matrix.platform.target }}-gnu.so # will this rename????
path: target/release/libcodemp.so
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
- run: rustup update stable && rustup default stable
- uses: arduino/setup-protoc@v3
- run: cargo build --release --features=lua
- uses: actions/upload-artifact@v4
with:
name: codemp_native-lua-linux-${{ matrix.platform.target }}-musl.so # will this rename????
path: target/release/libcodemp.so
windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
target: linux-x64-gnu
filename: libcodemp.so
- runner: windows-latest
target: x64
#- runner: windows-latest
# target: x86
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- uses: arduino/setup-protoc@v3
- run: cargo build --release --features=lua
- uses: actions/upload-artifact@v4
with:
name: codemp_native-lua-windows-${{ matrix.platform.target }}.dll # will this rename????
path: target/release/codemp.dll
macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
#- runner: macos-12
# target: x64
target: win32-x64
filename: codemp.dll
- runner: macos-14
target: aarch64
target: darwin-arm64
filename: codemp.dylib
#- runner: macos-12
# target: darwin-x64
# filename: codemp.dylib
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v3
- run: cargo build --release --features=lua
- uses: actions/upload-artifact@v4
with:
name: codemp_native-lua-macos-${{ matrix.platform.target }}.dylib # will this rename????
path: target/release/codemp.dylib
name: codemp-lua-${{ matrix.platform.target }}
path: target/release/libcodemp.so

View file

@ -46,42 +46,41 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
name: codemp-py-linux-${{ matrix.platform.target }}
path: dist/py
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
- 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 .
sccache: 'true'
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist/py
#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
# - 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 }}
# args: --release --out .
# 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 }}
# path: dist/py
windows:
runs-on: ${{ matrix.platform.runner }}
@ -110,7 +109,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
name: codemp-py-windows-${{ matrix.platform.target }}
path: dist/py
macos:
@ -139,7 +138,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
name: codemp-py-macos-${{ matrix.platform.target }}
path: dist/py
sdist:
@ -155,20 +154,21 @@ jobs:
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
name: codemp-py-sdist
path: dist/py
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, musllinux, windows, macos, sdist]
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
pattern: codemp-py-*
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
args: --non-interactive --skip-existing codemp-py-*/*

View file

@ -31,7 +31,9 @@ jobs:
# TODO should re-enable future toolchains so we get warnings on breaking changes
steps:
- uses: arduino/setup-protoc@v3
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: cargo build --verbose --features=${{ matrix.features }}
- run: cargo test --verbose --features=${{ matrix.features }}