-
Notifications
You must be signed in to change notification settings - Fork 31
43 lines (36 loc) · 1.05 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
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run Clippy on generated test code - fail on warnings
run: cargo clippy -p packed_struct_tests --all-targets -- -D warnings
- name: Rust no_std tests
run: cd packed_struct_nostd_tests && cargo test --verbose
build-cross:
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: false
matrix:
target: [aarch64-unknown-linux-gnu, arm-unknown-linux-gnueabihf, mips64-unknown-linux-gnuabi64, riscv64gc-unknown-linux-gnu ]
steps:
- uses: actions/checkout@v2
- name: Install rust-embedded/cross
run: cargo install cross
- name: Cross-build
run: cross build --target ${{ matrix.target }}
- name: Cross-run tests
run: cross test --target ${{ matrix.target }}