]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: add check for update to date Cargo.lock.in
authorJason Ish <jason.ish@oisf.net>
Mon, 10 Feb 2025 19:47:57 +0000 (13:47 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 27 Feb 2025 05:57:45 +0000 (06:57 +0100)
After a build, check if Cargo.lock.in and Cargo.lock differ, if so,
Cargo.lock.in needs an update as part of a depedency update.

.github/workflows/rust.yml

index 3571edd6a45247815745977e97233447f5046821..5c05ccadb1f3f1d4c2ff272f48e43e01a901a558 100644 (file)
@@ -95,3 +95,12 @@ jobs:
       # especially without debug feature
       - run: cargo clippy
         working-directory: rust
+      - name: Check if Cargo.lock.in is up to date
+        run: |
+          cp rust/Cargo.lock rust/Cargo.lock.in
+          diff=$(git diff rust/Cargo.lock.in)
+          if [ "${diff}" ]; then
+              echo "${diff}"
+              echo "::error ::Cargo.lock.in needs to be updated"
+              exit 1
+          fi