Use mold as default linker in CI in order to speed up the pipeline #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Suite | |
on: [ push, pull_request ] | |
env: | |
# Make sure CI fails on all warnings, including Clippy lints | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: "clippy, rustfmt" | |
targets: "thumbv7em-none-eabihf" | |
- name: Setup Mold as the default linker | |
uses: rui314/setup-mold@v1 | |
- name: Test all features | |
run: cargo test --all-features | |
- name: Clippy (all-features) | |
run: cargo clippy --all-features | |
- name: Test sync SCD30 | |
run: cargo test --features "sync, scd30" | |
- name: Clippy (sync, scd30) | |
run: cargo clippy --features "sync, scd30" | |
- name: Test async SCD30 | |
run: cargo test --features "async, scd30" | |
- name: Clippy (async, scd30) | |
run: cargo clippy --features "async, scd30" | |
- name: Test sync SCD40 | |
run: cargo test --features "sync, scd40" | |
- name: Clippy (sync, scd40) | |
run: cargo clippy --features "sync, scd40" | |
- name: Test async SCD40 | |
run: cargo test --features "async, scd40" | |
- name: Clippy (async, scd40) | |
run: cargo clippy --features "async, scd40" | |
- name: Test sync SCD41 | |
run: cargo test --features "sync, scd41" | |
- name: Clippy (sync, scd41) | |
run: cargo clippy --features "sync, scd41" | |
- name: Test async SCD41 | |
run: cargo test --features "async, scd41" | |
- name: Clippy (async, scd41) | |
run: cargo clippy --features "async, scd41" | |
- name: Build example - Synchronous SCD40 | |
working-directory: ./examples/embassy-scd40 | |
run: cargo check | |
- name: Lint example - Synchronous SCD40 | |
working-directory: ./examples/embassy-scd40 | |
run: cargo clippy | |
- name: Verify code is properly formatted | |
run: cargo fmt --check |