summaryrefslogtreecommitdiffstats
path: root/.gitlab/ci
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitlab/ci/annocheck.yml4
-rwxr-xr-x.gitlab/ci/cibuild-setup-ubuntu.sh4
-rwxr-xr-x.gitlab/ci/clang-Wall3
-rw-r--r--.gitlab/ci/compilation-clang.gitlab-ci.yml3
-rw-r--r--.gitlab/ci/compilation-gcc.gitlab-ci.yml3
-rw-r--r--.gitlab/ci/compilation-various-disables.yml31
-rw-r--r--.gitlab/ci/csmock.yml10
-rw-r--r--.gitlab/ci/debian.yml50
-rwxr-xr-x.gitlab/ci/gcc-Wall2
-rw-r--r--.gitlab/ci/gitlab-shared-docker.yml5
10 files changed, 88 insertions, 27 deletions
diff --git a/.gitlab/ci/annocheck.yml b/.gitlab/ci/annocheck.yml
index 5b3a715..7501180 100644
--- a/.gitlab/ci/annocheck.yml
+++ b/.gitlab/ci/annocheck.yml
@@ -14,6 +14,4 @@ test-main-commit-job-annocheck:
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /v2\..\.x$/
script:
- - /opt/build-rpm-script.sh > /dev/null 2>&1
- - annocheck /var/lib/mock/rhel-9.0.0-candidate-x86_64/result/*.rpm --profile=el9
- - annocheck /var/lib/mock/rhel-9.0.0-candidate-x86_64/result/*.rpm --profile=el8
+ - sudo /opt/run-annocheck.sh
diff --git a/.gitlab/ci/cibuild-setup-ubuntu.sh b/.gitlab/ci/cibuild-setup-ubuntu.sh
index 07b0990..00e37eb 100755
--- a/.gitlab/ci/cibuild-setup-ubuntu.sh
+++ b/.gitlab/ci/cibuild-setup-ubuntu.sh
@@ -6,8 +6,8 @@ PACKAGES=(
git make autoconf automake autopoint pkg-config libtool libtool-bin
gettext libssl-dev libdevmapper-dev libpopt-dev uuid-dev libsepol-dev
libjson-c-dev libssh-dev libblkid-dev tar libargon2-0-dev libpwquality-dev
- sharutils dmsetup jq xxd expect keyutils netcat passwd openssh-client sshpass
- asciidoctor
+ sharutils dmsetup jq xxd expect keyutils netcat-openbsd passwd openssh-client
+ sshpass asciidoctor
)
COMPILER="${COMPILER:?}"
diff --git a/.gitlab/ci/clang-Wall b/.gitlab/ci/clang-Wall
index d09e154..52c2dad 100755
--- a/.gitlab/ci/clang-Wall
+++ b/.gitlab/ci/clang-Wall
@@ -25,10 +25,9 @@ EXTRA="\
-Wswitch \
-Wmissing-format-attribute \
-Winit-self \
- -Wdeclaration-after-statement \
-Wold-style-definition \
-Wno-missing-field-initializers \
- -Wno-unused-parameter \
+ -Wunused-parameter \
-Wno-long-long"
exec $CLANG $PEDANTIC $CONVERSION \
diff --git a/.gitlab/ci/compilation-clang.gitlab-ci.yml b/.gitlab/ci/compilation-clang.gitlab-ci.yml
index 6f5cd42..cf54b8b 100644
--- a/.gitlab/ci/compilation-clang.gitlab-ci.yml
+++ b/.gitlab/ci/compilation-clang.gitlab-ci.yml
@@ -3,6 +3,7 @@ test-clang-compilation:
- .gitlab-shared-clang
script:
- export CFLAGS="-Wall -Werror"
+ - ./autogen.sh
- ./configure
- make -j
- make -j check-programs
@@ -13,6 +14,7 @@ test-clang-Wall-script:
script:
- export CFLAGS="-g -O0"
- export CC="$CI_PROJECT_DIR/.gitlab/ci/clang-Wall"
+ - ./autogen.sh
- ./configure
- make -j CFLAGS="-g -O0 -Werror"
- make -j CFLAGS="-g -O0 -Werror" check-programs
@@ -21,6 +23,7 @@ test-scan-build:
extends:
- .gitlab-shared-clang
script:
+ - ./autogen.sh
- scan-build${COMPILER_VERSION:+-$COMPILER_VERSION} -V ./configure CFLAGS="-g -O0"
- make clean
- scan-build${COMPILER_VERSION:+-$COMPILER_VERSION} --status-bugs -maxloop 10 make -j
diff --git a/.gitlab/ci/compilation-gcc.gitlab-ci.yml b/.gitlab/ci/compilation-gcc.gitlab-ci.yml
index 00fae36..c4a10c3 100644
--- a/.gitlab/ci/compilation-gcc.gitlab-ci.yml
+++ b/.gitlab/ci/compilation-gcc.gitlab-ci.yml
@@ -3,6 +3,7 @@ test-gcc-compilation:
- .gitlab-shared-gcc
script:
- export CFLAGS="-Wall -Werror"
+ - ./autogen.sh
- ./configure
- make -j
- make -j check-programs
@@ -13,6 +14,7 @@ test-gcc-Wall-script:
script:
- export CFLAGS="-g -O0"
- export CC="$CI_PROJECT_DIR/.gitlab/ci/gcc-Wall"
+ - ./autogen.sh
- ./configure
- make -j CFLAGS="-g -O0 -Werror"
- make -j CFLAGS="-g -O0 -Werror" check-programs
@@ -22,6 +24,7 @@ test-gcc-fanalyzer:
- .gitlab-shared-gcc
script:
- export CFLAGS="-Wall -Werror -g -O0 -fanalyzer -fdiagnostics-path-format=separate-events"
+ - ./autogen.sh
- ./configure
- make -j
- make -j check-programs
diff --git a/.gitlab/ci/compilation-various-disables.yml b/.gitlab/ci/compilation-various-disables.yml
index 1414f9e..1c9fb3d 100644
--- a/.gitlab/ci/compilation-various-disables.yml
+++ b/.gitlab/ci/compilation-various-disables.yml
@@ -4,18 +4,29 @@ test-gcc-disable-compiles:
parallel:
matrix:
- DISABLE_FLAGS: [
- "--disable-keyring",
- "--disable-external-tokens --disable-ssh-token",
- "--disable-luks2-reencryption",
- "--disable-cryptsetup --disable-veritysetup --disable-integritysetup",
- "--disable-kernel_crypto",
- "--disable-selinux",
- "--disable-udev",
- "--disable-internal-argon2",
- "--disable-blkid"
+ "keyring",
+ "external-tokens ssh-token",
+ "luks2-reencryption",
+ "cryptsetup veritysetup integritysetup",
+ "kernel_crypto",
+ "udev",
+ "internal-argon2",
+ "blkid"
]
+ artifacts:
+ name: "meson-build-logs-$CI_COMMIT_REF_NAME"
+ paths:
+ - meson_builddir/meson-logs
script:
+ - DEBIAN_FRONTEND=noninteractive apt-get -yq install meson ninja-build
- export CFLAGS="-Wall -Werror"
- - ./configure $DISABLE_FLAGS
+ - ./autogen.sh
+ - echo "Configuring with --disable-$DISABLE_FLAGS"
+ - ./configure $(for i in $DISABLE_FLAGS; do echo "--disable-$i"; done)
- make -j
- make -j check-programs
+ - git checkout -f && git clean -xdf
+ - meson -v
+ - echo "Configuring with -D$DISABLE_FLAGS=false"
+ - meson setup meson_builddir $(for i in $DISABLE_FLAGS; do [ "$i" == "internal-argon2" ] && echo "-Dargon-implementation=internal" || echo "-D$i=false"; done)
+ - ninja -C meson_builddir
diff --git a/.gitlab/ci/csmock.yml b/.gitlab/ci/csmock.yml
index 72b53ed..a1cd985 100644
--- a/.gitlab/ci/csmock.yml
+++ b/.gitlab/ci/csmock.yml
@@ -3,7 +3,7 @@ test-commit-job-csmock:
- .dump_kernel_log
tags:
- libvirt
- - rhel7-csmock
+ - rhel9-csmock
stage: test
interruptible: true
allow_failure: true
@@ -14,4 +14,10 @@ test-commit-job-csmock:
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /v2\..\.x$/ || $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- - /opt/csmock-run-script.sh
+ - sudo /opt/run-csmock.sh
+ artifacts:
+ # Upload artifacts when a crash makes the job fail.
+ when: always
+ paths:
+ - cryptsetup-csmock-results.tar.xz
+ - cryptsetup-csmock-results
diff --git a/.gitlab/ci/debian.yml b/.gitlab/ci/debian.yml
index fad9d97..6a17533 100644
--- a/.gitlab/ci/debian.yml
+++ b/.gitlab/ci/debian.yml
@@ -2,16 +2,17 @@
extends:
- .dump_kernel_log
before_script:
+ - sudo apt-get -y update
- >
[ -z "$RUN_SYSTEMD_PLUGIN_TEST" ] ||
sudo apt-get -y install -y -qq swtpm meson ninja-build python3-jinja2
- gperf libcap-dev tpm2-tss-engine-dev libmount-dev swtpm-tools
+ gperf libcap-dev libtss2-dev libmount-dev swtpm-tools
- >
sudo apt-get -y install -y -qq git gcc make autoconf automake autopoint
pkgconf libtool libtool-bin gettext libssl-dev libdevmapper-dev
libpopt-dev uuid-dev libsepol-dev libjson-c-dev libssh-dev libblkid-dev
tar libargon2-0-dev libpwquality-dev sharutils dmsetup jq xxd expect
- keyutils netcat passwd openssh-client sshpass asciidoctor
+ keyutils netcat-openbsd passwd openssh-client sshpass asciidoctor
- sudo apt-get -y build-dep cryptsetup
- sudo -E git clean -xdf
- ./autogen.sh
@@ -22,7 +23,7 @@ test-mergerq-job-debian:
- .debian-prep
tags:
- libvirt
- - debian11
+ - debian12
stage: test
interruptible: true
variables:
@@ -41,7 +42,7 @@ test-main-commit-job-debian:
- .debian-prep
tags:
- libvirt
- - debian11
+ - debian12
stage: test
interruptible: true
variables:
@@ -54,3 +55,44 @@ test-main-commit-job-debian:
- make -j
- make -j -C tests check-programs
- sudo -E make check
+
+# meson tests
+test-mergerq-job-debian-meson:
+ extends:
+ - .debian-prep
+ tags:
+ - libvirt
+ - debian12
+ stage: test
+ interruptible: true
+ variables:
+ RUN_SSH_PLUGIN_TEST: "1"
+ rules:
+ - if: $CI_PROJECT_PATH != "cryptsetup/cryptsetup"
+ when: never
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+ script:
+ - sudo apt-get -y install -y -qq meson ninja-build
+ - meson setup build
+ - ninja -C build
+ - cd build && sudo -E meson test --verbose --print-errorlogs
+
+test-main-commit-job-debian-meson:
+ extends:
+ - .debian-prep
+ tags:
+ - libvirt
+ - debian12
+ stage: test
+ interruptible: true
+ variables:
+ RUN_SSH_PLUGIN_TEST: "1"
+ rules:
+ - if: $CI_PROJECT_PATH != "cryptsetup/cryptsetup"
+ when: never
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /v2\..\.x$/
+ script:
+ - sudo apt-get -y install -y -qq meson ninja-build
+ - meson setup build
+ - ninja -C build
+ - cd build && sudo -E meson test --verbose --print-errorlogs
diff --git a/.gitlab/ci/gcc-Wall b/.gitlab/ci/gcc-Wall
index 6669504..860a8fb 100755
--- a/.gitlab/ci/gcc-Wall
+++ b/.gitlab/ci/gcc-Wall
@@ -31,7 +31,7 @@ EXTRA="-Wextra \
-Wunsafe-loop-optimizations \
-Wold-style-definition \
-Wno-missing-field-initializers \
- -Wno-unused-parameter \
+ -Wunused-parameter \
-Wno-long-long \
-Wmaybe-uninitialized \
-Wvla \
diff --git a/.gitlab/ci/gitlab-shared-docker.yml b/.gitlab/ci/gitlab-shared-docker.yml
index 1edacc8..b625ee0 100644
--- a/.gitlab/ci/gitlab-shared-docker.yml
+++ b/.gitlab/ci/gitlab-shared-docker.yml
@@ -1,5 +1,5 @@
.gitlab-shared-docker:
- image: ubuntu:focal
+ image: ubuntu:lunar
tags:
- gitlab-org-docker
stage: test
@@ -12,7 +12,6 @@
- .gitlab/ci/cibuild-setup-ubuntu.sh
- export CC="${COMPILER}${COMPILER_VERSION:+-$COMPILER_VERSION}"
- export CXX="${COMPILER}++${COMPILER_VERSION:+-$COMPILER_VERSION}"
- - ./autogen.sh
.gitlab-shared-gcc:
extends:
@@ -27,5 +26,5 @@
- .gitlab-shared-docker
variables:
COMPILER: "clang"
- COMPILER_VERSION: "13"
+ COMPILER_VERSION: "17"
RUN_SSH_PLUGIN_TEST: "1"