]> xenbits.xensource.com Git - xen-guest-agent.git/commitdiff
ci: new check job for missing Cargo.lock updates.
authorYann Dirson <yann.dirson@vates.fr>
Mon, 5 Feb 2024 09:38:19 +0000 (10:38 +0100)
committerYann Dirson <yann.dirson@vates.fr>
Mon, 5 Feb 2024 09:53:29 +0000 (10:53 +0100)
This could have been a larger check to make sure build introduces no
diffs, but our reliance on a crate patch for FreeBSD makes this too
messy.  At least the common case of forgetting Cargo.lock will fail
the pipeline early.

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
.gitlab-ci.yml

index d48b6498c3f7ab49f77d62856128bba8d74e5b2f..8afe83a74c99d67d52a46c5fd3fc803a249c862e 100644 (file)
@@ -22,6 +22,9 @@ variables:
   stage: check
   script:
     - cargo build ${FEATURES} ${CARGO_FLAGS}
+    # make sure build introduces no diffs
+    # FIXME cannot be set there yet since we need a patch for FreeBSD
+    #- git diff --exit-code
 
 .debian-build-template:
   extends:
@@ -93,6 +96,15 @@ clippy:
   script:
     - cargo clippy
 
+cargo-lock:
+  stage: check
+  extends:
+    - .debian-build-template
+  script:
+    - cargo tree
+    # if Cargo.lock was not commited, this will show here
+    - git diff --exit-code
+
 ## common defs
 
 .featurematrix: