This commit is contained in:
Philipp Schuster 2022-05-02 21:41:13 +02:00
parent 30dcdb395a
commit b0442bffa8
2 changed files with 55 additions and 40 deletions

View File

@ -9,3 +9,6 @@ insert_final_newline = true
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.yml]
indent_size = 2

View File

@ -1,48 +1,60 @@
name: Build name: Build
on: on:
push: push:
branches: [ main ] branches: [ main ]
pull_request: pull_request:
branches: [ main ] branches: [ main ]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
rust: rust:
- stable - stable
- nightly - nightly
- 1.51.0 # MSVR - 1.51.0 # MSVR
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build # Important preparation step: override the latest default Rust version in GitHub CI
run: cargo build --all-targets --verbose --features all # with the current value of the iteration in the "strategy.matrix.rust"-array.
# use some arbitrary no_std target - uses: actions-rs/toolchain@v1
- name: Install no_std target thumbv7em-none-eabihf with:
run: rustup target add thumbv7em-none-eabihf profile: default
- name: Build (no_std) toolchain: ${{ matrix.rust }}
run: cargo build --verbose --target thumbv7em-none-eabihf --features all override: true
- name: Run tests - name: Build
run: cargo test --verbose --features all 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: style_checks:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
rust: rust:
- stable - stable
- nightly steps:
- 1.51.0 # MSVR - uses: actions/checkout@v2
steps: # Important preparation step: override the latest default Rust version in GitHub CI
- uses: actions/checkout@v2 # with the current value of the iteration in the "strategy.matrix.rust"-array.
- name: Rustfmt - uses: actions-rs/toolchain@v1
run: cargo fmt -- --check with:
- name: Clippy profile: default
run: cargo clippy --features all toolchain: ${{ matrix.rust }}
- name: Rustdoc override: true
run: cargo doc --features all - name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --features all
- name: Rustdoc
run: cargo doc --features all