-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.54 KB
/
rust.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
name: Rust
on:
push:
branches: [ "main" ]
paths-ignore:
- "*.md"
- "LICENSE"
pull_request:
branches: [ "main" ]
paths-ignore:
- "*.md"
- "LICENSE"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- aarch64-linux-android # 64-bit ARM
- armv7-linux-androideabi # 32-bit ARM
- i686-linux-android # 32-bit x86
- x86_64-linux-android # 64-bit x86
- arm-linux-androideabi # 32-bit ARM (older ABI)
- thumbv7neon-linux-androideabi # 32-bit ARM with NEON
name: ${{ matrix.target }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Deps & Bins
uses: Swatinem/rust-cache@v2
- name: Install cross
shell: bash
run: |
if ! command -v cross &> /dev/null; then
echo "cross not found, installing..."
cargo install cross --git https://github.com/cross-rs/cross
else
echo "cross already installed, skipping installation."
fi
- name: Build - ${{ matrix.target }}
shell: bash
run: cross build --target=${{ matrix.target }} --verbose
- name: Test - ${{ matrix.target }}
shell: bash
run: cross test --target=${{ matrix.target }} --verbose