-
Notifications
You must be signed in to change notification settings - Fork 140
64 lines (58 loc) · 1.45 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
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches: [ master, staging, trying ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: ${{ matrix.rust_version == 'nightly' }}
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
profile: minimal
override: true
- name: Install Arm targets
run: >
rustup target add
thumbv6m-none-eabi
thumbv7em-none-eabi
thumbv7em-none-eabihf
thumbv8m.main-none-eabi
- name: Build Crates
run: mv Cargo.ci.toml Cargo.toml && cargo test
env:
RUSTFLAGS: ${{ matrix.rustflags }}
strategy:
matrix:
rust_version: [beta, nightly]
include:
- rust_version: stable
rustflags: --deny warnings
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Copy Cargo.toml
run: cp Cargo.ci.toml Cargo.toml
- name: Format Rust code
run: cargo fmt --all -- --check
ci:
if: ${{ success() }}
# all new jobs must be added to this list
needs: [build, format]
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0