Skip to content

Commit 4a8a40a

Browse files
committed
Add ci.yml
1 parent 1bf9748 commit 4a8a40a

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI Checks
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
building:
10+
name: Building
11+
continue-on-error: ${{ matrix.experimental || false }}
12+
strategy:
13+
matrix:
14+
# All generated code should be running on stable now
15+
rust: [nightly, stable]
16+
include:
17+
# Nightly is only for reference and allowed to fail
18+
- rust: nightly
19+
experimental: true
20+
os:
21+
# Check compilation works on common OSes
22+
# (i.e. no path issues)
23+
- ubuntu-latest
24+
- macOS-latest
25+
- windows-latest
26+
runs-on: ${{ matrix.os }}
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: ${{ matrix.rust }}
32+
target: thumbv6m-none-eabi
33+
- run: cargo install flip-link
34+
- run: cargo build --all
35+
- run: cargo build --all --release
36+
linting:
37+
name: Linting
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
with:
42+
submodules: true
43+
- uses: dtolnay/rust-toolchain@stable
44+
with:
45+
components: clippy
46+
target: thumbv6m-none-eabi
47+
- run: cargo clippy --all-features -- --deny=warnings
48+
formatting:
49+
name: Formatting
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v3
53+
with:
54+
submodules: true
55+
- uses: dtolnay/rust-toolchain@stable
56+
with:
57+
components: rustfmt
58+
target: thumbv6m-none-eabi
59+
- run: cargo fmt -- --check

0 commit comments

Comments
 (0)