From 0672ac67e16f2fb42a7f1305b9e69ad8c73d1f9b Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Wed, 3 Sep 2025 09:39:20 +0200 Subject: [PATCH] Make compilation to fail on warnings Signed-off-by: Sergio Arroutbi --- .github/workflows/compile-no-warnings.yml | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/compile-no-warnings.yml diff --git a/.github/workflows/compile-no-warnings.yml b/.github/workflows/compile-no-warnings.yml new file mode 100644 index 00000000..6f76cee9 --- /dev/null +++ b/.github/workflows/compile-no-warnings.yml @@ -0,0 +1,28 @@ +--- +name: Rust + +"on": + push: + branches: [master] + pull_request: + branches: [master] + +env: + CARGO_TERM_COLOR: always + +jobs: + basic-compilation: + name: Compilation with no warnings + runs-on: ubuntu-latest + container: + image: quay.io/keylime/keylime-ci:latest + steps: + - uses: actions/checkout@v5 + - name: Check compilation (no warnings) + run: RUSTFLAGS="-D warnings" cargo build + - name: Check test compilation (no warnings) + run: RUSTFLAGS="-D warnings" cargo test + - name: Check clippy errors (no warnings included) + run: cargo clippy --all-features --all-targets -- -D clippy::all -D warnings + - name: Check clippy test errors (no warnings included) + run: cargo clippy --all-features --all-targets --tests -- -D clippy::all -D warnings