-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (56 loc) · 1.6 KB
/
python.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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 }}