From b0442bffa8865d4636c2b58c53274c1b08741f8d Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Mon, 2 May 2022 21:41:13 +0200 Subject: [PATCH] CI fix --- .editorconfig | 3 ++ .github/workflows/rust.yml | 92 +++++++++++++++++++++----------------- 2 files changed, 55 insertions(+), 40 deletions(-) diff --git a/.editorconfig b/.editorconfig index 098d9b0..75a88ac 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ insert_final_newline = true indent_style = space indent_size = 4 trim_trailing_whitespace = true + +[*.yml] +indent_size = 2 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 92a18ae..b1894a7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,48 +1,60 @@ name: Build on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + push: + branches: [ main ] + pull_request: + branches: [ main ] env: - CARGO_TERM_COLOR: always + 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 + build: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - nightly + - 1.51.0 # MSVR + steps: + - uses: actions/checkout@v2 + # Important preparation step: override the latest default Rust version in GitHub CI + # with the current value of the iteration in the "strategy.matrix.rust"-array. + - uses: actions-rs/toolchain@v1 + with: + profile: default + toolchain: ${{ matrix.rust }} + override: true + - 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 + style_checks: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + steps: + - uses: actions/checkout@v2 + # Important preparation step: override the latest default Rust version in GitHub CI + # with the current value of the iteration in the "strategy.matrix.rust"-array. + - uses: actions-rs/toolchain@v1 + with: + profile: default + toolchain: ${{ matrix.rust }} + override: true + - name: Rustfmt + run: cargo fmt -- --check + - name: Clippy + run: cargo clippy --features all + - name: Rustdoc + run: cargo doc --features all