mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 07:14:50 +01:00
ci: auto build py wheels and lua module
This commit is contained in:
parent
7d6b14fe7a
commit
ba3eeca205
4 changed files with 260 additions and 7 deletions
88
.github/workflows/lua.yml
vendored
Normal file
88
.github/workflows/lua.yml
vendored
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
name: lua
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- ci
|
||||||
|
- stable
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux:
|
||||||
|
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
|
||||||
|
- 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: 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:
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x64
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x86
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- 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
|
||||||
|
- runner: macos-14
|
||||||
|
target: aarch64
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- 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
|
165
.github/workflows/python.yml
vendored
Normal file
165
.github/workflows/python.yml
vendored
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
# This file is autogenerated by maturin v1.7.1
|
||||||
|
# To update, run
|
||||||
|
#
|
||||||
|
# maturin generate-ci github
|
||||||
|
#
|
||||||
|
name: python
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- ci
|
||||||
|
- stable
|
||||||
|
|
||||||
|
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
|
||||||
|
- runner: ubuntu-latest
|
||||||
|
target: s390x
|
||||||
|
- runner: ubuntu-latest
|
||||||
|
target: ppc64le
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Build wheels
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
target: ${{ matrix.platform.target }}
|
||||||
|
args: --release --out dist/py
|
||||||
|
sccache: 'true'
|
||||||
|
manylinux: auto
|
||||||
|
- name: Upload wheels
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-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: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Build wheels
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
target: ${{ matrix.platform.target }}
|
||||||
|
args: --release --out dist/py
|
||||||
|
sccache: 'true'
|
||||||
|
manylinux: musllinux_1_2
|
||||||
|
- name: Upload wheels
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-musllinux-${{ matrix.platform.target }}
|
||||||
|
path: dist/py
|
||||||
|
|
||||||
|
windows:
|
||||||
|
runs-on: ${{ matrix.platform.runner }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x64
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x86
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
architecture: ${{ matrix.platform.target }}
|
||||||
|
- name: Build wheels
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
target: ${{ matrix.platform.target }}
|
||||||
|
args: --release --out dist/py
|
||||||
|
sccache: 'true'
|
||||||
|
- name: Upload wheels
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-windows-${{ matrix.platform.target }}
|
||||||
|
path: dist/py
|
||||||
|
|
||||||
|
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: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Build wheels
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
target: ${{ matrix.platform.target }}
|
||||||
|
args: --release --out dist/py
|
||||||
|
sccache: 'true'
|
||||||
|
- name: Upload wheels
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-macos-${{ matrix.platform.target }}
|
||||||
|
path: dist/py
|
||||||
|
|
||||||
|
sdist:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build sdist
|
||||||
|
uses: PyO3/maturin-action@v1
|
||||||
|
with:
|
||||||
|
command: sdist
|
||||||
|
args: --out dist/py
|
||||||
|
- name: Upload sdist
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wheels-sdist
|
||||||
|
path: dist/py
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "startsWith(github.ref, 'refs/tags/')"
|
||||||
|
needs: [linux, musllinux, windows, macos, sdist]
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
- 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-*/*
|
|
@ -1,16 +1,19 @@
|
||||||
name: build+test
|
name: test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- ci
|
||||||
- dev
|
- dev
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
test:
|
||||||
name: Rust project - latest
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -29,9 +32,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: arduino/setup-protoc@v2
|
- uses: arduino/setup-protoc@v2
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: webfactory/ssh-agent@v0.7.0
|
|
||||||
with:
|
|
||||||
ssh-private-key: ${{ secrets.ACTIONS_SSH_DEPLOY_KEY }}
|
|
||||||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||||
- run: cargo build --verbose --features=${{ matrix.features }}
|
- run: cargo build --verbose --features=${{ matrix.features }}
|
||||||
- run: cargo test --verbose --features=${{ matrix.features }}
|
- run: cargo test --verbose --features=${{ matrix.features }}
|
|
@ -1,6 +1,6 @@
|
||||||
[![codemp](https://code.mp/static/banner.png)](https://code.mp)
|
[![codemp](https://code.mp/static/banner.png)](https://code.mp)
|
||||||
|
|
||||||
[![Actions Status](https://github.com/hexedtech/codemp/actions/workflows/ci.yml/badge.svg)](https://github.com/hexedtech/codemp/actions)
|
[![Actions Status](https://github.com/hexedtech/codemp/actions/workflows/test.yml/badge.svg)](https://github.com/hexedtech/codemp/actions)
|
||||||
[![docs.rs](https://img.shields.io/docsrs/codemp)](https://docs.rs/codemp/0.7.0-beta.2/codemp/)
|
[![docs.rs](https://img.shields.io/docsrs/codemp)](https://docs.rs/codemp/0.7.0-beta.2/codemp/)
|
||||||
[![Crates.io Version](https://img.shields.io/crates/v/codemp)](https://crates.io/crates/codemp)
|
[![Crates.io Version](https://img.shields.io/crates/v/codemp)](https://crates.io/crates/codemp)
|
||||||
[![NPM Version](https://img.shields.io/npm/v/codemp)](https://npmjs.org/package/codemp)
|
[![NPM Version](https://img.shields.io/npm/v/codemp)](https://npmjs.org/package/codemp)
|
||||||
|
|
Loading…
Reference in a new issue