mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-30 15:34:33 +01:00
Merge #669
669: CI: Run rustup and cargo directly r=korken89 a=AfoHT actions-rs seems abandoned: See [link](https://github.com/actions-rs/toolchain/issues/216) As GHA bundles rustup using it directly is trivial Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
This commit is contained in:
commit
d3dcb66511
2 changed files with 56 additions and 101 deletions
156
.github/workflows/build.yml
vendored
156
.github/workflows/build.yml
vendored
|
@ -21,22 +21,12 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Fail on warnings
|
- name: Fail on warnings
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||||
|
|
||||||
|
|
||||||
- name: cargo fmt --check
|
- name: cargo fmt --check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo fmt --all -- --check
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
|
|
||||||
# Compilation check
|
# Compilation check
|
||||||
check:
|
check:
|
||||||
|
@ -54,25 +44,22 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
|
- name: Install Rust ${{ matrix.toolchain }}
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: ${{ matrix.toolchain }}
|
rustup override set ${{ matrix.toolchain }}
|
||||||
target: ${{ matrix.target }}
|
|
||||||
override: true
|
- name: Configure Rust target (${{ matrix.target }})
|
||||||
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Fail on warnings
|
- name: Fail on warnings
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: cargo check
|
- name: cargo check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo check --target=${{ matrix.target }}
|
||||||
with:
|
|
||||||
use-cross: false
|
|
||||||
command: check
|
|
||||||
args: --target=${{ matrix.target }}
|
|
||||||
|
|
||||||
# Clippy
|
# Clippy
|
||||||
clippy:
|
clippy:
|
||||||
|
@ -82,24 +69,17 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Fail on warnings
|
- name: Fail on warnings
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||||
|
|
||||||
|
- name: Add Rust component clippy
|
||||||
|
run: rustup component add clippy
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: cargo clippy
|
- name: cargo clippy
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo clippy
|
||||||
with:
|
|
||||||
use-cross: false
|
|
||||||
command: clippy
|
|
||||||
|
|
||||||
# Verify all examples, checks
|
# Verify all examples, checks
|
||||||
checkexamples:
|
checkexamples:
|
||||||
|
@ -116,23 +96,22 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
|
- name: Install Rust ${{ matrix.toolchain }}
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: ${{ matrix.toolchain }}
|
rustup override set ${{ matrix.toolchain }}
|
||||||
target: ${{ matrix.target }}
|
|
||||||
override: true
|
- name: Configure Rust target (${{ matrix.target }})
|
||||||
components: llvm-tools-preview
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Add Rust component llvm-tools-preview
|
||||||
|
run: rustup component add llvm-tools-preview
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Check the examples
|
- name: Check the examples
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo check --examples --target=${{ matrix.target }}
|
||||||
with:
|
|
||||||
use-cross: false
|
|
||||||
command: check
|
|
||||||
args: --examples --target=${{ matrix.target }}
|
|
||||||
|
|
||||||
# Verify the example output with run-pass tests
|
# Verify the example output with run-pass tests
|
||||||
testexamples:
|
testexamples:
|
||||||
|
@ -149,23 +128,23 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
|
- name: Install Rust ${{ matrix.toolchain }}
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: ${{ matrix.toolchain }}
|
rustup override set ${{ matrix.toolchain }}
|
||||||
target: ${{ matrix.target }}
|
|
||||||
override: true
|
- name: Configure Rust target (${{ matrix.target }})
|
||||||
components: llvm-tools-preview
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Add Rust component llvm-tools-preview
|
||||||
|
run: rustup component add llvm-tools-preview
|
||||||
|
|
||||||
# Use precompiled binutils
|
# Use precompiled binutils
|
||||||
- name: cargo install cargo-binutils
|
- name: cargo install cargo-binutils
|
||||||
uses: actions-rs/install@v0.1
|
run: cargo install cargo-binutils
|
||||||
with:
|
|
||||||
crate: cargo-binutils
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Install QEMU
|
- name: Install QEMU
|
||||||
run: |
|
run: |
|
||||||
|
@ -176,8 +155,7 @@ jobs:
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||||
|
|
||||||
- name: Run-pass tests
|
- name: Run-pass tests
|
||||||
run:
|
run: cargo xtask --target ${{ matrix.target }}
|
||||||
cargo xtask --target ${{ matrix.target }}
|
|
||||||
|
|
||||||
# Check the correctness of macros/ crate
|
# Check the correctness of macros/ crate
|
||||||
checkmacros:
|
checkmacros:
|
||||||
|
@ -193,25 +171,22 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
|
- name: Install Rust ${{ matrix.toolchain }}
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: ${{ matrix.toolchain }}
|
rustup override set ${{ matrix.toolchain }}
|
||||||
target: ${{ matrix.target }}
|
|
||||||
override: true
|
- name: Configure Rust target (${{ matrix.target }})
|
||||||
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Fail on warnings
|
- name: Fail on warnings
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||||
|
|
||||||
- name: cargo check
|
- name: cargo check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo check --manifest-path macros/Cargo.toml --target=${{ matrix.target }}
|
||||||
with:
|
|
||||||
use-cross: false
|
|
||||||
command: check
|
|
||||||
args: --manifest-path macros/Cargo.toml --target=${{ matrix.target }}
|
|
||||||
|
|
||||||
# Run the macros test-suite
|
# Run the macros test-suite
|
||||||
testmacros:
|
testmacros:
|
||||||
|
@ -221,25 +196,14 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Fail on warnings
|
- name: Fail on warnings
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||||
|
|
||||||
- name: cargo check
|
- name: cargo check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --manifest-path macros/Cargo.toml
|
||||||
with:
|
|
||||||
use-cross: false
|
|
||||||
command: test
|
|
||||||
args: --manifest-path macros/Cargo.toml
|
|
||||||
|
|
||||||
# Run test suite
|
# Run test suite
|
||||||
tests:
|
tests:
|
||||||
|
@ -249,24 +213,14 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Fail on warnings
|
- name: Fail on warnings
|
||||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- name: Run cargo test
|
||||||
with:
|
run: cargo test --test tests
|
||||||
use-cross: false
|
|
||||||
command: test
|
|
||||||
args: --test tests
|
|
||||||
|
|
||||||
# Build documentation, check links
|
# Build documentation, check links
|
||||||
docs:
|
docs:
|
||||||
|
|
|
@ -13,6 +13,7 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Use native GHA rustup and cargo
|
||||||
- Distinguish between thumbv8m.base and thumbv8m.main for basepri usage.
|
- Distinguish between thumbv8m.base and thumbv8m.main for basepri usage.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
Loading…
Reference in a new issue