73 lines
2.5 KiB
YAML
73 lines
2.5 KiB
YAML
on: [push, pull_request]
|
|
name: Check rp2040-hal-examples
|
|
env:
|
|
PACKAGE: rp2040-hal-examples
|
|
TARGET: thumbv6m-none-eabi
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
target: ${{ env.TARGET }}
|
|
- name: Build
|
|
run: cd ${PACKAGE} && cargo build
|
|
- name: Install picotool
|
|
run: |
|
|
sudo apt-get install -y debian-archive-keyring
|
|
sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian testing main contrib non-free' >/etc/apt/sources.list.d/debian.list"
|
|
sudo apt-get update
|
|
sudo apt-get install -y libxml2-utils picotool
|
|
- name: Test picotool
|
|
run: picotool info ${PACKAGE}/target/${TARGET}/debug/binary_info_demo -t elf -a | tee /dev/stderr | grep -q "rp2040-hal Binary Info Example"
|
|
udeps:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: nightly-2024-11-14
|
|
target: ${{ env.TARGET }}
|
|
- name: Install cargo-udeps
|
|
run: |
|
|
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
|
|
- name: Run cargo-udeps
|
|
run: cd ${PACKAGE} && cargo udeps
|
|
msrv:
|
|
name: Verify build on MSRV
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: 1.79
|
|
target: ${{ env.TARGET }}
|
|
- name: Use older version of regex
|
|
run: cd ${PACKAGE} && cargo update -p regex --precise 1.9.3
|
|
- name: Build on MSRV
|
|
run: cd ${PACKAGE} && cargo build
|
|
fmt:
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
- name: Check format
|
|
run: cd ${PACKAGE} && cargo fmt -- --check
|
|
clippy:
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
target: ${{ env.TARGET }}
|
|
components: clippy
|
|
- name: Run cargo clippy
|
|
run: cd ${PACKAGE} && cargo clippy
|