2023-02-26 19:20:20 +00:00
|
|
|
name: Rust checks
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rustfmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-08-24 14:37:15 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-02-26 19:20:20 +00:00
|
|
|
- name: cargo fmt
|
2023-08-13 13:20:48 +00:00
|
|
|
run: cargo fmt --check --all
|
2023-02-26 19:20:20 +00:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-08-24 14:37:15 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-02-26 19:20:20 +00:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2024-10-14 19:02:26 +00:00
|
|
|
sudo apt install gettext libpcre2-dev
|
2023-02-26 19:20:20 +00:00
|
|
|
- name: cmake
|
|
|
|
run: |
|
|
|
|
cmake -B build
|
|
|
|
- name: cargo clippy
|
2023-10-07 17:32:57 +00:00
|
|
|
# This used to have --deny=warnings, but that turns rust release day
|
|
|
|
# into automatic CI failure day, so we don't do that.
|
|
|
|
run: cargo clippy --workspace --all-targets
|
2024-01-12 17:01:01 +00:00
|
|
|
|
2024-12-04 17:42:20 +00:00
|
|
|
# Disabling for now because it also checks "advisories",
|
|
|
|
# making CI fail for reasons unrelated to the patch
|
|
|
|
# cargo-deny:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v3
|
|
|
|
# - uses: EmbarkStudios/cargo-deny-action@v1
|