-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (48 loc) · 1.31 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
name: Rust
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-apple-darwin
include:
- target: x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
style: true
test: true
- target: aarch64-apple-darwin
runs-on: macos-latest
test: true
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Rust - Install
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt,clippy
targets: ${{ matrix.target }}
- name: Rust - Version
run: rustc -Vv
- name: Rust - Build
run: cargo build --verbose --target=${{ matrix.target }} --tests --all-features
- name: Rust - Style
if: matrix.style == true
run: cargo fmt --check
- name: Rust - Clippy
if: matrix.style == true
run: cargo clippy -- -D warnings
- name: Rust - Test
if: matrix.test == true
run: cargo test --verbose --target=${{ matrix.target }} --all-features -- --test-threads=1 --nocapture