Skip to content

fix workflow warning #31

fix workflow warning

fix workflow warning #31

on: [push, pull_request]
name: Build and Test check
jobs:
builds:
name: Build checks
runs-on: ubuntu-20.04
strategy:
matrix:
mode: ["", "--release"]
feature_pio: ["", "pio"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
toolchain: nightly
- name: Construct feature arg
if: matrix.feature_pio != ''
run: |
echo "features=--features ${{ matrix.feature_pio }}" >> $GITHUB_ENV
- name: Build workspace
run: cargo build ${{ matrix.mode }} --workspace ${{ env.features }}
- name: Build workspace and examples
run: cargo build ${{ matrix.mode }} --workspace --examples ${{ env.features }}
- name: List built examples and clean
run: rm -vrf target/thumbv6m-none-eabi/*/examples/* | sed -e "s/removed '\(.*\)'/\1/" | xargs -l basename | grep -Ev '(-|\.d)'
- name: Test
run: cargo test --tests --target x86_64-unknown-linux-gnu ${{ env.features }}
- name: Test docs
run: cargo test --doc --target x86_64-unknown-linux-gnu ${{ env.features }}
- name: Clean
run: cargo clean
- name: Check unused deps
uses: ithinuel/[email protected]
with:
version: latest
args: ${{ matrix.mode }} --workspace ${{ env.features }}