Apart from other changes this fixes failures with builds on FreeBSD. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- Note that this is based on lcitool with the following MR merged: https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/290 which is necessary to fix FreeBSD12: https://gitlab.com/pipo.sk/libvirt/-/pipelines/584873900 ci/cirrus/freebsd-12.vars | 2 +- ci/cirrus/freebsd-13.vars | 2 +- ci/containers/centos-stream-8.Dockerfile | 1 + ci/containers/centos-stream-9.Dockerfile | 14 ++++-- ci/gitlab.yml | 22 +++++++++ ci/gitlab/build-templates.yml | 12 +++-- ci/gitlab/builds.yml | 60 ++++++++++++------------ ci/gitlab/container-templates.yml | 8 ++-- ci/gitlab/containers.yml | 43 ++++++++++------- 9 files changed, 105 insertions(+), 59 deletions(-) diff --git a/ci/cirrus/freebsd-12.vars b/ci/cirrus/freebsd-12.vars index e8b06b32e1..b3b3d7a187 100644 --- a/ci/cirrus/freebsd-12.vars +++ b/ci/cirrus/freebsd-12.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='augeas bash-completion ca_root_nss ccache codespell cppi curl cyrus-sasl diffutils diskscrub fusefs-libs gettext git glib gmake gnugrep gnutls gsed libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py38-docutils py38-flake8 python3 qemu readline yajl' +PKGS='augeas bash-completion ca_root_nss ccache codespell cppi curl cyrus-sasl diffutils diskscrub fusefs-libs gettext git glib gmake gnugrep gnutls gsed libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py39-docutils py39-flake8 python3 qemu readline yajl' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/ci/cirrus/freebsd-13.vars b/ci/cirrus/freebsd-13.vars index e8b06b32e1..b3b3d7a187 100644 --- a/ci/cirrus/freebsd-13.vars +++ b/ci/cirrus/freebsd-13.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='augeas bash-completion ca_root_nss ccache codespell cppi curl cyrus-sasl diffutils diskscrub fusefs-libs gettext git glib gmake gnugrep gnutls gsed libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py38-docutils py38-flake8 python3 qemu readline yajl' +PKGS='augeas bash-completion ca_root_nss ccache codespell cppi curl cyrus-sasl diffutils diskscrub fusefs-libs gettext git glib gmake gnugrep gnutls gsed libpcap libpciaccess libssh libssh2 libxml2 libxslt meson ninja perl5 pkgconf polkit py39-docutils py39-flake8 python3 qemu readline yajl' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/ci/containers/centos-stream-8.Dockerfile b/ci/containers/centos-stream-8.Dockerfile index 82cbd7cde7..1614cd9b56 100644 --- a/ci/containers/centos-stream-8.Dockerfile +++ b/ci/containers/centos-stream-8.Dockerfile @@ -11,6 +11,7 @@ RUN dnf distro-sync -y && \ dnf config-manager --set-enabled -y powertools && \ dnf install -y centos-release-advanced-virtualization && \ dnf install -y epel-release && \ + dnf install -y epel-next-release && \ dnf install -y \ audit-libs-devel \ augeas \ diff --git a/ci/containers/centos-stream-9.Dockerfile b/ci/containers/centos-stream-9.Dockerfile index 34ff3a06eb..5d0b5ffc6c 100644 --- a/ci/containers/centos-stream-9.Dockerfile +++ b/ci/containers/centos-stream-9.Dockerfile @@ -9,14 +9,14 @@ FROM quay.io/centos/centos:stream9 RUN dnf distro-sync -y && \ dnf install 'dnf-command(config-manager)' -y && \ dnf config-manager --set-enabled -y crb && \ - dnf install -y \ - https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \ - https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm && \ + dnf install -y epel-release && \ + dnf install -y epel-next-release && \ dnf install -y \ audit-libs-devel \ augeas \ bash-completion \ ca-certificates \ + ccache \ clang \ cpp \ cyrus-sasl-devel \ @@ -50,6 +50,7 @@ RUN dnf distro-sync -y && \ librbd-devel \ libselinux-devel \ libssh-devel \ + libssh2-devel \ libtirpc-devel \ libwsman-devel \ libxml2 \ @@ -81,9 +82,14 @@ RUN dnf distro-sync -y && \ yajl-devel && \ dnf autoremove -y && \ dnf clean all -y && \ - rpm -qa | sort > /packages.txt + rpm -qa | sort > /packages.txt && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" ENV PYTHON "/usr/bin/python3" +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" diff --git a/ci/gitlab.yml b/ci/gitlab.yml index cab4e6074c..ea0f847789 100644 --- a/ci/gitlab.yml +++ b/ci/gitlab.yml @@ -4,6 +4,28 @@ # # https://gitlab.com/libvirt/libvirt-ci + +# Variables that can be set to control the behaviour of +# pipelines that are run +# +# - RUN_ALL_CONTAINERS - build all containers +# even if they don't have any changes detected +# +# These can be set as git push options +# +# $ git push -o ci.variable=RUN_ALL_CONTAINERS=1 +# +# Aliases can be set for common usage +# +# $ git config --local alias.push-all-ctr "push -o ci.variable=RUN_ALL_CONTAINERS=1" +# +# Allowing the less verbose invokation +# +# $ git push-all-ctr +# +# Pipeline variables can also be set in the repository +# pipeline config globally, or set against scheduled pipelines + include: - local: '/ci/gitlab/container-templates.yml' - local: '/ci/gitlab/build-templates.yml' diff --git a/ci/gitlab/build-templates.yml b/ci/gitlab/build-templates.yml index 20d22914c2..605788dab9 100644 --- a/ci/gitlab/build-templates.yml +++ b/ci/gitlab/build-templates.yml @@ -9,7 +9,9 @@ image: $CI_REGISTRY_IMAGE/ci-$NAME:latest stage: builds rules: - - if: '$LIBVIRT_JOB_OPTIONAL' + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$JOB_OPTIONAL' when: manual allow_failure: true - when: on_success @@ -19,7 +21,9 @@ image: $CI_REGISTRY_IMAGE/ci-$NAME-cross-$CROSS:latest stage: builds rules: - - if: '$LIBVIRT_JOB_OPTIONAL' + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$JOB_OPTIONAL' when: manual allow_failure: true - when: on_success @@ -52,9 +56,9 @@ - cat ci/cirrus/$NAME.yml - cirrus-run -v --show-build-log always ci/cirrus/$NAME.yml rules: - - if: "$CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null" + - if: '$CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null' when: never - - if: '$LIBVIRT_JOB_OPTIONAL' + - if: '$JOB_OPTIONAL' when: manual allow_failure: true - when: on_success diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml index 3ce110d39e..443c1ac299 100644 --- a/ci/gitlab/builds.yml +++ b/ci/gitlab/builds.yml @@ -14,7 +14,7 @@ x86_64-almalinux-8: optional: true allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: almalinux-8 RPM: skip @@ -48,7 +48,7 @@ x86_64-alpine-315: optional: true allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: alpine-315 @@ -107,7 +107,7 @@ x86_64-debian-11: optional: true allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -223,7 +223,7 @@ x86_64-ubuntu-2204: optional: true allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: ubuntu-2204 @@ -251,7 +251,7 @@ aarch64-debian-10: allow_failure: true variables: CROSS: aarch64 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -263,7 +263,7 @@ armv6l-debian-10: allow_failure: true variables: CROSS: armv6l - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -286,7 +286,7 @@ i686-debian-10: allow_failure: true variables: CROSS: i686 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -298,7 +298,7 @@ mips-debian-10: allow_failure: true variables: CROSS: mips - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -310,7 +310,7 @@ mips64el-debian-10: allow_failure: true variables: CROSS: mips64el - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -322,7 +322,7 @@ mipsel-debian-10: allow_failure: true variables: CROSS: mipsel - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -334,7 +334,7 @@ ppc64le-debian-10: allow_failure: true variables: CROSS: ppc64le - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -346,7 +346,7 @@ s390x-debian-10: allow_failure: true variables: CROSS: s390x - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-10 @@ -358,7 +358,7 @@ aarch64-debian-11: allow_failure: false variables: CROSS: aarch64 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -370,7 +370,7 @@ armv6l-debian-11: allow_failure: false variables: CROSS: armv6l - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -382,7 +382,7 @@ armv7l-debian-11: allow_failure: false variables: CROSS: armv7l - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -394,7 +394,7 @@ i686-debian-11: allow_failure: false variables: CROSS: i686 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -406,7 +406,7 @@ mips64el-debian-11: allow_failure: false variables: CROSS: mips64el - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -418,7 +418,7 @@ mipsel-debian-11: allow_failure: false variables: CROSS: mipsel - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -430,7 +430,7 @@ ppc64le-debian-11: allow_failure: false variables: CROSS: ppc64le - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -442,7 +442,7 @@ s390x-debian-11: allow_failure: false variables: CROSS: s390x - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11 @@ -454,7 +454,7 @@ aarch64-debian-sid: allow_failure: false variables: CROSS: aarch64 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -466,7 +466,7 @@ armv6l-debian-sid: allow_failure: false variables: CROSS: armv6l - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -478,7 +478,7 @@ armv7l-debian-sid: allow_failure: false variables: CROSS: armv7l - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -490,7 +490,7 @@ i686-debian-sid: allow_failure: false variables: CROSS: i686 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -502,7 +502,7 @@ mips64el-debian-sid: allow_failure: false variables: CROSS: mips64el - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -514,7 +514,7 @@ mipsel-debian-sid: allow_failure: false variables: CROSS: mipsel - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -526,7 +526,7 @@ ppc64le-debian-sid: allow_failure: false variables: CROSS: ppc64le - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -538,7 +538,7 @@ s390x-debian-sid: allow_failure: false variables: CROSS: s390x - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid @@ -550,7 +550,7 @@ mingw32-fedora-36: allow_failure: false variables: CROSS: mingw32 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: fedora-36 @@ -584,7 +584,7 @@ mingw64-fedora-rawhide: allow_failure: true variables: CROSS: mingw64 - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: fedora-rawhide diff --git a/ci/gitlab/container-templates.yml b/ci/gitlab/container-templates.yml index c71d03c759..0e52f147bb 100644 --- a/ci/gitlab/container-templates.yml +++ b/ci/gitlab/container-templates.yml @@ -10,7 +10,7 @@ # - Push to default branch: # -> rebuild if dockerfile changed, no cache # - Otherwise -# -> rebuild if LIBVIRT_CI_CONTAINERS=1, no cache, +# -> rebuild if RUN_ALL_CONTAINERS=1, no cache, # to pick up new published distro packages or # recover from deleted tag # @@ -40,16 +40,18 @@ after_script: - docker logout rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never - if: '$CI_PROJECT_NAMESPACE == "libvirt" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' when: on_success changes: - ci/gitlab/container-templates.yml - ci/containers/$NAME.Dockerfile - - if: '$CI_PROJECT_NAMESPACE == "libvirt" && $LIBVIRT_CI_CONTAINERS == "1"' + - if: '$CI_PROJECT_NAMESPACE == "libvirt" && $RUN_ALL_CONTAINERS == "1"' when: on_success - if: '$CI_PROJECT_NAMESPACE == "libvirt"' when: never - - if: '$LIBVIRT_JOB_OPTIONAL' + - if: '$JOB_OPTIONAL' when: manual allow_failure: true - when: on_success diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml index 7cdf3eb9a0..3835a19216 100644 --- a/ci/gitlab/containers.yml +++ b/ci/gitlab/containers.yml @@ -25,6 +25,7 @@ x86_64-alpine-315-container: extends: .container_job allow_failure: false variables: + JOB_OPTIONAL: 1 NAME: alpine-315 @@ -126,6 +127,7 @@ aarch64-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-aarch64 @@ -133,6 +135,7 @@ armv6l-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-armv6l @@ -147,6 +150,7 @@ i686-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-i686 @@ -154,6 +158,7 @@ mips-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-mips @@ -161,6 +166,7 @@ mips64el-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-mips64el @@ -168,6 +174,7 @@ mipsel-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-mipsel @@ -175,6 +182,7 @@ ppc64le-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-ppc64le @@ -182,6 +190,7 @@ s390x-debian-10-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: debian-10-cross-s390x @@ -189,7 +198,7 @@ aarch64-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-aarch64 @@ -197,7 +206,7 @@ armv6l-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-armv6l @@ -205,7 +214,7 @@ armv7l-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-armv7l @@ -213,7 +222,7 @@ i686-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-i686 @@ -221,7 +230,7 @@ mips64el-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-mips64el @@ -229,7 +238,7 @@ mipsel-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-mipsel @@ -237,7 +246,7 @@ ppc64le-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-ppc64le @@ -245,7 +254,7 @@ s390x-debian-11-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-11-cross-s390x @@ -253,7 +262,7 @@ aarch64-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-aarch64 @@ -261,7 +270,7 @@ armv6l-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-armv6l @@ -269,7 +278,7 @@ armv7l-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-armv7l @@ -277,7 +286,7 @@ i686-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-i686 @@ -285,7 +294,7 @@ mips64el-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-mips64el @@ -293,7 +302,7 @@ mipsel-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-mipsel @@ -301,7 +310,7 @@ ppc64le-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-ppc64le @@ -309,7 +318,7 @@ s390x-debian-sid-container: extends: .container_job allow_failure: false variables: - LIBVIRT_JOB_OPTIONAL: 1 + JOB_OPTIONAL: 1 NAME: debian-sid-cross-s390x @@ -317,6 +326,7 @@ mingw32-fedora-36-container: extends: .container_job allow_failure: false variables: + JOB_OPTIONAL: 1 NAME: fedora-36-cross-mingw32 @@ -338,4 +348,5 @@ mingw64-fedora-rawhide-container: extends: .container_job allow_failure: true variables: + JOB_OPTIONAL: 1 NAME: fedora-rawhide-cross-mingw64 -- 2.36.1