Merge pull request #692 from ithinuel/improve-i2c-peripheral-document… #1264
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
on: [push, pull_request] | |
name: Build and Test check | |
jobs: | |
rp2040-hal-builds: | |
name: Build rp2040-hal's features | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: thumbv6m-none-eabi | |
- name: Install cargo-hack | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-hack | |
version: "=0.5.28" | |
- name: Build rp2040-hal's workspace (without the examples) | |
run: cargo hack build --optional-deps --each-feature | |
examples-builds: | |
name: Build rp2040-hal's examples | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: thumbv6m-none-eabi | |
- name: Install cargo-hack | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-hack | |
version: "=0.5.28" | |
- name: Build workspace | |
run: cargo hack build --examples --optional-deps --each-feature | |
tests: | |
name: Execute host-runable tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: thumbv6m-none-eabi | |
- name: Install cargo-hack | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-hack | |
version: "=0.5.28" | |
- name: Test | |
run: cargo hack test -p rp2040-hal --tests --target x86_64-unknown-linux-gnu --optional-deps --each-feature --features critical-section-impl | |
- name: Test docs | |
run: cargo hack test -p rp2040-hal --doc --target x86_64-unknown-linux-gnu --optional-deps --each-feature --features critical-section-impl | |
- name: Test macros | |
run: cargo hack test -p rp2040-hal-macros --tests --target x86_64-unknown-linux-gnu --optional-deps --each-feature | |
- name: Test macro docs | |
run: cargo hack test -p rp2040-hal-macros --doc --target x86_64-unknown-linux-gnu --optional-deps --each-feature | |
- name: Clean | |
run: cargo clean | |
udeps: | |
name: Check rp2040-hal for unused dependencies | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2023-06-27 | |
target: thumbv6m-none-eabi | |
- name: Install cargo-hack | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-hack | |
version: "=0.5.28" | |
- name: Install cargo-udeps | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-udeps | |
version: "=0.1.40" | |
- name: Check unused deps | |
run: cargo hack udeps --optional-deps --each-feature | |
msrv: | |
name: Verifiy build on MSRV | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.64 | |
target: thumbv6m-none-eabi | |
- name: Install cargo-hack | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-hack | |
version: "=0.5.28" | |
- name: Verifiy MSRV | |
run: cargo hack build --examples --optional-deps --each-feature | |
on-target-build: | |
name: Build on-target-tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: thumbv6m-none-eabi | |
- name: Build on-target-tests | |
run: | | |
cd on-target-tests | |
cargo test --no-run |