Net/manual import #7
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: Task - Linters Cargo | |
on: | |
pull_request: | |
branches: | |
- net/prod | |
- net/dev | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
# FIXME: check why this is rebuilding the project every time | |
cargo-lint: | |
runs-on: ubuntu-latest-32-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Retrieve cached build | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: | |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ | |
github.run_id }} | |
fail-on-cache-miss: true | |
restore-keys: | | |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ | |
github.run_id }} | |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
${{ runner.os }}-cargo | |
- name: Setup build deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler | |
- name: Format and clippy | |
run: | | |
cargo fmt -- --check | |
cargo clippy --no-deps -- -D warnings | |
cargo clippy --tests --no-deps -- -D warnings |