Skip to content

ci: update the GitHub actions used where appropriate #304

ci: update the GitHub actions used where appropriate

ci: update the GitHub actions used where appropriate #304

Workflow file for this run

name: tacd
on:
pull_request:
paths-ignore:
- 'web/**'
push:
branches:
- main
schedule:
- cron: '48 20 * * 4'
env:
# Make sure cargo commands not only fail on hard errors but also on warnings
# so we do not accidentally miss newly introduced warnings.
RUSTFLAGS: -D warnings
jobs:
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
strategy:
matrix:
features:
- ""
- "--features=demo_mode --no-default-features"
- "--tests"
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo apt install libsystemd-dev libiio-dev
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: ${{ matrix.features }}
name: Clippy Output
check:
strategy:
fail-fast: false # Run against all versions even if one fails
matrix:
version:
- "1.70" # Yocto nanbield
- "1.75" # Yocto scarthgap
- "nightly"
name: cargo check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo apt install libsystemd-dev libiio-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.version }}
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: check
deny:
name: cargo deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo apt install libsystemd-dev libiio-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: test