-
Notifications
You must be signed in to change notification settings - Fork 25
52 lines (42 loc) · 1.26 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- thumbv7em-none-eabi
- thumbv6m-none-eabi # like the Cortex-M0+
- x86_64-unknown-linux-gnu
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
steps:
- name: Install build dependencies
shell: bash
run: |
env && pwd && sudo apt-get update -y -qq && sudo apt-get install -y -qq llvm libc6-dev-i386 libclang-dev
- uses: fiam/arm-none-eabi-gcc@v1
with:
release: "9-2020-q2"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions/checkout@v3
with:
submodules: true
- name: Check
run: |
cargo check
cargo check --all-features
- name: Build
run: cargo build --release --verbose
- name: Run clippy
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo clippy --workspace --all-features --all-targets -- --deny warnings
- name: Check code format
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo fmt --all -- --check