Skip to content

Commit 759d8fc

Browse files
committed
Add CI
1 parent f2d4510 commit 759d8fc

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/bors.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
status = ["ci"]

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, staging, trying ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 30
12+
continue-on-error: ${{ matrix.rust_version == 'nightly' }}
13+
14+
strategy:
15+
matrix:
16+
include:
17+
- rust_version: stable
18+
target: thumbv7em-none-eabi
19+
rustflags: --deny warnings
20+
- rust_version: stable
21+
target: thumbv7em-none-eabihf
22+
rustflags: --deny warnings
23+
- rust_version: stable
24+
target: thumbv8m.main-none-eabi
25+
rustflags: --deny warnings
26+
- rust_version: beta
27+
target: thumbv7em-none-eabihf
28+
- rust_version: nightly
29+
target: thumbv7em-none-eabihf
30+
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Install Rust
34+
uses: actions-rs/toolchain@v1
35+
with:
36+
toolchain: ${{ matrix.rust_version }}
37+
target: ${{ matrix.target }}
38+
profile: minimal
39+
override: true
40+
- name: Check
41+
run: cargo check --target ${{ matrix.target }}
42+
env:
43+
RUSTFLAGS: ${{ matrix.rustflags }}
44+
45+
fmt:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Install Rust stable
50+
uses: actions-rs/toolchain@v1
51+
with:
52+
toolchain: stable
53+
profile: minimal
54+
components: rustfmt
55+
- name: Check fmt
56+
run: cargo fmt -- --check
57+
58+
ci:
59+
if: ${{ success() }}
60+
# all new jobs must be added to this list
61+
needs: [build, fmt]
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: CI succeeded
65+
run: exit 0

0 commit comments

Comments
 (0)