Skip to content

build(algo_models_ffi): add maturin CI for building/testing python package #1

build(algo_models_ffi): add maturin CI for building/testing python package

build(algo_models_ffi): add maturin CI for building/testing python package #1

Workflow file for this run

name: Python CI
on:
push:
paths:
- crates/algo_models_ffi/**
- creates/algo_models/**
branches:
- main
- master
tags:
- '*'
pull_request:
paths:
- crates/algo_models_ffi/**
- creates/algo_models/**
workflow_dispatch:
permissions:
contents: read
env:
CRATE_PATH: crates/algo_models_ffi
jobs:
build:
defaults:
run:
shell: bash
runs-on: ${{ matrix.target.runner }}
container:
image: ${{ matrix.target.container }}
env:
MISE_DATA_DIR: /mise
MISE_CONFIG_DIR: /mise
MISE_CACHE_DIR: /mise/cache
MISE_INSTALL_PATH: /usr/local/bin/mise
CARGO_HOME: /usr/local
strategy:
matrix:
target:
- name: aarch64-unknown-linux-musl
runner: ubuntu-22.04
arch: aarch64
distro: ubuntu22.04
container: ghcr.io/cross-rs/aarch64-unknown-linux-musl:0.2.5
steps:
- uses: actions/checkout@v4
- name: Install Rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
- name: rustup target add
run: rustup target add ${{ matrix.target.name }}
- name: Install mise
run: curl https://mise.run | sh
- name: Install python (mise)
run: mise settings set python.compile false && mise use -g python
- name: Install maturin
run: mise x -- pip install maturin[patchelf]
- name: maturin build
run: cd ${{ env.CRATE_PATH }} && mise x -- maturin build --release --target ${{ matrix.target.name }}