-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (62 loc) · 1.68 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
65
66
67
68
69
name: CI
on:
push:
branches: [ main, staging, trying ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: ${{ matrix.rust_version == 'nightly' }}
strategy:
matrix:
include:
- rust_version: stable
target: thumbv7em-none-eabi
rustflags: --deny warnings
- rust_version: stable
target: thumbv7em-none-eabihf
rustflags: --deny warnings
- rust_version: stable
target: thumbv8m.main-none-eabi
rustflags: --deny warnings
- rust_version: beta
target: thumbv7em-none-eabihf
- rust_version: nightly
target: thumbv7em-none-eabihf
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: |
rustup install --profile=minimal ${{ matrix.rust_version }}
rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --target ${{ matrix.target }}
env:
RUSTFLAGS: ${{ matrix.rustflags }}
example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup target add thumbv7em-none-eabi
- name: Build example
run: cd example && cargo build
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust stable
run: |
rustup install --profile=minimal stable
rustup component add rustfmt
- name: Check fmt
run: cargo fmt -- --check
ci:
if: ${{ success() }}
# all new jobs must be added to this list
needs: [build, fmt]
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0