49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- nightly
|
|
- 1.51.0 # MSVR
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Build
|
|
run: cargo build --all-targets --verbose --features all
|
|
# use some arbitrary no_std target
|
|
- name: Install no_std target thumbv7em-none-eabihf
|
|
run: rustup target add thumbv7em-none-eabihf
|
|
- name: Build (no_std)
|
|
run: cargo build --verbose --target thumbv7em-none-eabihf --features all
|
|
- name: Run tests
|
|
run: cargo test --verbose --features all
|
|
|
|
style_checks:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- nightly
|
|
- 1.51.0 # MSVR
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Rustfmt
|
|
run: cargo fmt -- --check
|
|
- name: Clippy
|
|
run: cargo clippy --features all
|
|
- name: Rustdoc
|
|
run: cargo doc --features all
|