@@ -25,6 +25,16 @@ build-each-commit-gcc:
tags:
- x86_64
+build-check-generated-files-tools:
+ extends: .test-jobs-common
+ variables:
+ CONTAINER: debian:stable
+ script:
+ - automation/scripts/check-generated-files
+ needs: []
+ tags:
+ - x86_64
+
qemu-alpine-arm64-gcc:
extends: .test-jobs-common
variables:
new file mode 100755
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+# Check that generated files that are commited are actually up to date
+
+check_git_status() {
+ output="$(git status --porcelain --untracked-files=no)"
+ if [ -n "$output" ]; then
+ echo
+ echo "Files potentially needs to be regenerated:"
+ echo "$output"
+ return 1
+ fi
+}
+
+set -e
+set -x
+
+# Try to have recently changed files more recent than generated files if those haven't been regenerated.
+if [[ "$CI_COMMIT_BEFORE_SHA" && "$CI_COMMIT_BEFORE_SHA" != 0000000000000000000000000000000000000000 ]]; then
+ git switch --detach $CI_COMMIT_BEFORE_SHA
+ git switch --detach -
+fi
+
+# Lists of files that generate other commited files:
+touch tools/libs/light/*.idl
+
+
+# Regen autoconf files
+./autogen.sh
+
+# build up our configure options
+cfgargs=()
+
+# Disable non-tools subsystems
+cfgargs+=("--disable-xen")
+cfgargs+=("--disable-stubdom")
+cfgargs+=("--disable-docs")
+
+
+# Disable external trees
+cfgargs+=("--with-system-seabios=/bin/false")
+cfgargs+=("--with-system-qemu=/bin/false")
+cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
+cfgargs+=("--disable-ovmf")
+cfgargs+=("--disable-pvshim")
+cfgargs+=("--disable-qemu-traditional")
+
+
+./configure --quiet "${cfgargs[@]}"
+make -s -j$(nproc) build-tools
+
+if ! check_git_status; then
+ git diff
+ exit 1
+fi
Try to find out whether genereted files that are commited needs to be regenerated. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> --- automation/gitlab-ci/test.yaml | 10 +++++ automation/scripts/check-generated-files | 55 ++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100755 automation/scripts/check-generated-files