Merge pull request #16 from w3ird-tech/dependabot/cargo/versions-2a17… #32
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: CI builds | |
on: | |
push: | |
branches: ["*"] | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
RUSTC_WRAPPER: "sccache" | |
RUSTFLAGS: "-Dwarnings" | |
SCCACHE_GHA_ENABLED: "true" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Check formatting | |
run: cargo fmt --all --check | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features | |
- name: Install tooling | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-machete | |
- name: Check for unused deps | |
run: cargo machete --with-metadata | |
- name: Ensure it builds | |
run: cargo build |