Skip to content

chore(deps): bump clap from 4.2.4 to 4.3.0 #178

chore(deps): bump clap from 4.2.4 to 4.3.0

chore(deps): bump clap from 4.2.4 to 4.3.0 #178

Workflow file for this run

name: rust
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- main
- dev
jobs:
fmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Add Rustfmt
run: rustup component add rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
build:
name: Build
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Stable rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: arm-unknown-linux-gnueabihf
- name: Install dependencies for rs_ws281x
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libclang-dev gcc-arm-linux-gnueabihf
version: 1.0
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --target arm-unknown-linux-gnueabihf
test:
name: Run tests
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
clippy:
name: Clippy
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Add Clippy
run: rustup component add clippy
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-binstall
run: wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-gnu.tgz -O - | tar -xz -C $HOME/.cargo/bin
- name: Install sarif-fmt & clippy-sarif
run: cargo binstall --no-confirm --force sarif-fmt clippy-sarif
- name: Run Clippy
run: cargo clippy --message-format=json -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used -W clippy::expect_used |
clippy-sarif | tee results.sarif | sarif-fmt
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif