Skip to content

Commit e4ef0f5

Browse files
committed
Clean up github workflow.
- Runs clippy - Checks it builds on multiple OSes - Checks stable and nightly - Doesn't install GCC
1 parent 7b4df58 commit e4ef0f5

1 file changed

Lines changed: 37 additions & 15 deletions

File tree

.github/workflows/rust.yml

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,43 @@ name: Build
22

33
on: [push, pull_request]
44

5+
env:
6+
CARGO_TERM_COLOR: always
7+
58
jobs:
69
build:
7-
8-
runs-on: ubuntu-latest
9-
10+
continue-on-error: ${{ matrix.experimental || false }}
11+
strategy:
12+
matrix:
13+
# All generated code should be running on stable now
14+
rust: [nightly, stable]
15+
include:
16+
# Nightly is only for reference and allowed to fail
17+
- rust: nightly
18+
experimental: true
19+
os:
20+
- ubuntu-latest
21+
- macOS-latest
22+
- windows-latest
23+
runs-on: ${{ matrix.os }}
1024
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v1
13-
with:
14-
submodules: true
15-
- name: Install GCC ARM
16-
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi
17-
- name: Add Target
18-
run: rustup target add thumbv6m-none-eabi
19-
- name: Build
20-
run: cargo build --verbose
21-
- name: Build Release
22-
run: cargo build --release --verbose
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
with:
28+
submodules: true
29+
- name: Build
30+
uses: actions-rs/toolchain@v1
31+
with:
32+
profile: minimal
33+
toolchain: ${{ matrix.rust }}
34+
override: true
35+
- name: Install Rust targets for ${{ matrix.rust }}
36+
run: rustup target install --toolchain=${{ matrix.rust }} thumbv6m-none-eabi
37+
- name: Build
38+
run: cargo build --verbose
39+
- name: Build Release
40+
run: cargo build --release --verbose
41+
- name: Clippy
42+
uses: actions-rs/clippy-check@v1
43+
with:
44+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)