2022-09-08 08:40:58 +02:00
|
|
|
---
|
2024-08-21 02:32:56 +02:00
|
|
|
name: Linting checks
|
2020-04-25 13:46:05 +02:00
|
|
|
|
2024-08-21 02:32:56 +02:00
|
|
|
# Trigger the workflow on push
|
2022-09-28 02:31:19 +02:00
|
|
|
"on":
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
2023-04-27 14:35:24 +02:00
|
|
|
env:
|
|
|
|
SCCACHE_GHA_ENABLED: "true"
|
|
|
|
RUSTC_WRAPPER: "sccache"
|
2020-04-25 13:46:05 +02:00
|
|
|
|
2022-11-13 23:57:05 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2020-04-25 13:46:05 +02:00
|
|
|
jobs:
|
2022-04-27 05:02:54 +02:00
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
2020-04-25 13:46:05 +02:00
|
|
|
steps:
|
2023-09-06 02:25:30 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-27 14:35:24 +02:00
|
|
|
- name: Setup sccache
|
2024-12-15 22:50:01 +01:00
|
|
|
uses: mozilla-actions/sccache-action@v0.0.7
|
2023-05-04 10:40:00 +02:00
|
|
|
with:
|
|
|
|
version: "v0.4.2"
|
2022-09-08 08:40:58 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-04-27 14:35:24 +02:00
|
|
|
sudo apt-get update && \
|
2022-09-08 08:40:58 +02:00
|
|
|
sudo apt-get install -y \
|
|
|
|
libpam0g-dev \
|
2025-01-17 06:17:58 +01:00
|
|
|
libselinux1-dev \
|
2022-09-08 08:40:58 +02:00
|
|
|
libssl-dev \
|
2025-01-17 06:17:58 +01:00
|
|
|
libsystemd-dev \
|
|
|
|
libtss2-dev \
|
|
|
|
libudev-dev \
|
2024-02-20 09:21:33 +01:00
|
|
|
pkg-config \
|
2025-01-17 06:17:58 +01:00
|
|
|
tpm-udev
|
2024-08-21 02:32:56 +02:00
|
|
|
- name: "Run clippy"
|
|
|
|
run: cargo clippy --lib --bins --examples --all-features
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup sccache
|
2024-12-15 22:50:01 +01:00
|
|
|
uses: mozilla-actions/sccache-action@v0.0.7
|
2024-08-21 02:32:56 +02:00
|
|
|
with:
|
|
|
|
version: "v0.4.2"
|
|
|
|
- name: "Run cargo fmt"
|
|
|
|
run: cargo fmt --check
|