-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (46 loc) · 1.39 KB
/
rust_matrix.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
on: push
name: Rust Matrix CI
jobs:
test-matrix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-24.04, macos-14, macos-15 ]
toolchain:
- stable
- beta
- nightly
- 1.84.0 # MSRV
steps:
- name: Install dependencies
run: sudo apt -y update && sudo apt -y install flex bison
if: ${{ startsWith(matrix.os, 'ubuntu') }}
- name: Install Rust ${{ matrix.toolchain }}
run: |
rustup toolchain install ${{ matrix.toolchain }} --profile minimal
rustup override set ${{ matrix.toolchain }}
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.toolchain }}-${{ matrix.os }}
- run: cargo check -v
- run: cargo test -v
test-cross:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- armv7-unknown-linux-musleabi
- x86_64-unknown-linux-musl
steps:
- name: Install Rust
run: rustup toolchain install stable --profile minimal
- name: Install cross
run: cargo install cross
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- run: cross build --target=${{ matrix.target }}