-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (77 loc) · 2.69 KB
/
Copy pathci.yml
File metadata and controls
80 lines (77 loc) · 2.69 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
name: ci
on:
push:
branches: [master]
pull_request:
jobs:
test:
name: test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- uses: actions/setup-go@v7
with:
go-version: "1.24" # >=1.24 needed for macOS arm64 (dyld LC_UUID)
cache-dependency-path: bindings/go/go.sum
- name: Build cdylib
run: cargo build --release
- name: Rust tests
run: cargo test --release
- name: Python tests
working-directory: bindings/python
run: |
python -m pip install --quiet pytest
python -m pytest tests -q
- name: Go tests
working-directory: bindings/go
run: go vet ./... && go test ./...
libs:
name: libs (${{ matrix.name }})
strategy:
fail-fast: false
matrix:
include:
- { name: linux-x86_64, os: ubuntu-latest, targets: "" }
- { name: linux-arm64, os: ubuntu-24.04-arm, targets: "" }
- { name: android-arm64, os: ubuntu-latest, targets: aarch64-linux-android }
# Windows arm64 / macOS x86_64 are CROSS-compiled on the x86_64 / arm64
# runners (no Intel-Mac runner needed):
- { name: windows-x86_64, os: windows-latest, targets: aarch64-pc-windows-msvc }
- { name: macos-arm64, os: macos-14, targets: x86_64-apple-darwin }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install cross-compile targets
if: matrix.targets != ''
run: rustup target add ${{ matrix.targets }}
- name: Install Android NDK
if: matrix.name == 'android-arm64'
run: |
# ubuntu-latest ships the NDK under $ANDROID_HOME/ndk/<version>;
# point ANDROID_NDK_HOME at it for scripts/build_platform_libs.py
echo "ANDROID_NDK_HOME=$(ls -d "$ANDROID_HOME"/ndk/* | head -1)" >> "$GITHUB_ENV"
- name: Build bundled cdylib (host + cross targets)
shell: bash
run: |
rm -rf bindings/python/temari/lib bindings/go/lib
python scripts/build_platform_libs.py
- name: Upload platform libs
uses: actions/upload-artifact@v7
with:
name: lib-${{ matrix.name }}
path: |
bindings/go/lib
bindings/python/temari/lib
if-no-files-found: error