Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add Clippy check workflow #100

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/actions/rust-info/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json

name: rust info
description: get rust info

outputs:
host:
description: host "x86_64-unknown-linux-gnu"
value: ${{steps.rustc.outputs.host}}

runs:
using: composite
steps:
- id: rustc
run: |
echo "host=$(rustc -vV | awk '/host/ { print $2 }')" >> $GITHUB_OUTPUT
shell: bash
27 changes: 27 additions & 0 deletions .github/workflows/clippy-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Clippy check

on:
push:
branches: ["**"]

env:
RUSTFLAGS: "-Dwarnings"

permissions: {}

jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master
with:
toolchain: stable
components: clippy
- id: rustc
uses: ./.github/actions/rust-info
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
key: ${{ steps.rustc.outputs.host }}
- name: Run Clippy
run: cargo clippy --all-targets --all-features
Loading