2023-02-27 03:20:20 +08: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 22:37:15 +08:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-02-27 03:20:20 +08:00
|
|
|
- name: cargo fmt
|
2023-08-13 21:20:48 +08:00
|
|
|
run: cargo fmt --check --all
|
2023-02-27 03:20:20 +08:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-08-24 22:37:15 +08:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-02-27 03:20:20 +08:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2024-10-15 03:02:26 +08:00
|
|
|
sudo apt install gettext libpcre2-dev
|
2023-02-27 03:20:20 +08:00
|
|
|
- name: cmake
|
|
|
|
run: |
|
|
|
|
cmake -B build
|
|
|
|
- name: cargo clippy
|
2023-10-08 01:32:57 +08: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-13 01:01:01 +08:00
|
|
|
|
|
|
|
cargo-deny:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|