diff options
36 files changed, 1790 insertions, 576 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c9dcd2..147230f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,6 @@ stages: export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig" .native_build_job: - extends: .gitlab_native_build_job cache: paths: - ccache @@ -61,8 +60,17 @@ stages: rpmbuild --nodeps --define '_without_mingw 1' -ta meson-dist/*.tar.xz; fi +.native_build_job_prebuilt_env: + extends: + - .native_build_job + - .gitlab_native_build_job_prebuilt_env + +.native_build_job_local_env: + extends: + - .native_build_job + - .gitlab_native_build_job_local_env + .cross_build_job: - extends: .gitlab_cross_build_job cache: paths: - ccache @@ -77,4 +85,14 @@ stages: - $NINJA - $NINJA install +.cross_build_job_prebuilt_env: + extends: + - .cross_build_job + - .gitlab_cross_build_job_prebuilt_env + +.cross_build_job_local_env: + extends: + - .cross_build_job + - .gitlab_cross_build_job_local_env + include: '/ci/gitlab.yml' diff --git a/ci/buildenv/centos-stream-8.sh b/ci/buildenv/centos-stream-8.sh new file mode 100644 index 0000000..d6694a1 --- /dev/null +++ b/ci/buildenv/centos-stream-8.sh @@ -0,0 +1,53 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf distro-sync -y + dnf install 'dnf-command(config-manager)' -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 \ + ca-certificates \ + ccache \ + check-devel \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + 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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/centos-stream-9.sh b/ci/buildenv/centos-stream-9.sh new file mode 100644 index 0000000..0164360 --- /dev/null +++ b/ci/buildenv/centos-stream-9.sh @@ -0,0 +1,52 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf distro-sync -y + dnf install 'dnf-command(config-manager)' -y + dnf config-manager --set-enabled -y crb + dnf install -y epel-release + dnf install -y epel-next-release + dnf install -y \ + ca-certificates \ + ccache \ + check-devel \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + 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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/containers/ubuntu-1804.Dockerfile b/ci/buildenv/debian-10.sh index 1e0b8d2..ad4519a 100644 --- a/ci/containers/ubuntu-1804.Dockerfile +++ b/ci/buildenv/debian-10.sh @@ -4,13 +4,11 @@ # # https://gitlab.com/libvirt/libvirt-ci -FROM docker.io/library/ubuntu:18.04 - -RUN export DEBIAN_FRONTEND=noninteractive && \ - apt-get update && \ - apt-get install -y eatmydata && \ - eatmydata apt-get dist-upgrade -y && \ - eatmydata apt-get install --no-install-recommends -y \ +function install_buildenv() { + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get dist-upgrade -y + apt-get install --no-install-recommends -y \ ca-certificates \ ccache \ check \ @@ -39,20 +37,18 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-wheel \ valac \ wget \ - xz-utils && \ - eatmydata apt-get autoremove -y && \ - eatmydata apt-get autoclean -y && \ - sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ - dpkg-reconfigure locales && \ - dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \ - mkdir -p /usr/libexec/ccache-wrappers && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + xz-utils + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen + dpkg-reconfigure locales + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /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/gcc + /usr/bin/pip3 install meson==0.56.0 +} -RUN pip3 install meson==0.56.0 - -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" +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/debian-11.sh b/ci/buildenv/debian-11.sh new file mode 100644 index 0000000..0a225fb --- /dev/null +++ b/ci/buildenv/debian-11.sh @@ -0,0 +1,51 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get dist-upgrade -y + apt-get install --no-install-recommends -y \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + valac \ + wget \ + xz-utils + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen + dpkg-reconfigure locales + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/debian-sid.sh b/ci/buildenv/debian-sid.sh new file mode 100644 index 0000000..0a225fb --- /dev/null +++ b/ci/buildenv/debian-sid.sh @@ -0,0 +1,51 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get dist-upgrade -y + apt-get install --no-install-recommends -y \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + valac \ + wget \ + xz-utils + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen + dpkg-reconfigure locales + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/fedora-35.sh b/ci/buildenv/fedora-35.sh new file mode 100644 index 0000000..917f4e6 --- /dev/null +++ b/ci/buildenv/fedora-35.sh @@ -0,0 +1,49 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf update -y + dnf install -y \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + 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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/fedora-36.sh b/ci/buildenv/fedora-36.sh new file mode 100644 index 0000000..917f4e6 --- /dev/null +++ b/ci/buildenv/fedora-36.sh @@ -0,0 +1,49 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf update -y + dnf install -y \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + 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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/fedora-rawhide-cross-mingw32.sh b/ci/buildenv/fedora-rawhide-cross-mingw32.sh new file mode 100644 index 0000000..8be6eee --- /dev/null +++ b/ci/buildenv/fedora-rawhide-cross-mingw32.sh @@ -0,0 +1,53 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf update -y --nogpgcheck fedora-gpg-keys + dnf distro-sync -y + dnf install -y \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + git \ + glibc-langpack-en \ + gtk-doc \ + hwdata \ + libxml2 \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + dnf install -y \ + mingw32-gcc \ + mingw32-gettext \ + mingw32-glib2 \ + mingw32-libsoup \ + mingw32-libxml2 \ + mingw32-libxslt \ + mingw32-pkg-config + rpm -qa | sort > /packages.txt + mkdir -p /usr/libexec/ccache-wrappers + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-cc + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" + +export ABI="i686-w64-mingw32" +export MESON_OPTS="--cross-file=/usr/share/mingw/toolchain-mingw32.meson" diff --git a/ci/buildenv/fedora-rawhide-cross-mingw64.sh b/ci/buildenv/fedora-rawhide-cross-mingw64.sh new file mode 100644 index 0000000..161facb --- /dev/null +++ b/ci/buildenv/fedora-rawhide-cross-mingw64.sh @@ -0,0 +1,53 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf update -y --nogpgcheck fedora-gpg-keys + dnf distro-sync -y + dnf install -y \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + git \ + glibc-langpack-en \ + gtk-doc \ + hwdata \ + libxml2 \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + dnf install -y \ + mingw64-gcc \ + mingw64-gettext \ + mingw64-glib2 \ + mingw64-libsoup \ + mingw64-libxml2 \ + mingw64-libxslt \ + mingw64-pkg-config + rpm -qa | sort > /packages.txt + mkdir -p /usr/libexec/ccache-wrappers + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" + +export ABI="x86_64-w64-mingw32" +export MESON_OPTS="--cross-file=/usr/share/mingw/toolchain-mingw64.meson" diff --git a/ci/buildenv/fedora-rawhide.sh b/ci/buildenv/fedora-rawhide.sh new file mode 100644 index 0000000..af846d4 --- /dev/null +++ b/ci/buildenv/fedora-rawhide.sh @@ -0,0 +1,50 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + dnf update -y --nogpgcheck fedora-gpg-keys + dnf distro-sync -y + dnf install -y \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + 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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/opensuse-leap-153.sh b/ci/buildenv/opensuse-leap-153.sh new file mode 100644 index 0000000..41f74ac --- /dev/null +++ b/ci/buildenv/opensuse-leap-153.sh @@ -0,0 +1,52 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + zypper update -y + zypper install -y \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext-runtime \ + git \ + glib2-devel \ + glibc-locale \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + ninja \ + osinfo-db-tools \ + pkgconfig \ + python3-base \ + python3-lxml \ + python3-pip \ + python3-pytest \ + python3-requests \ + python3-setuptools \ + python3-wheel \ + rpm-build \ + vala \ + wget \ + xz + 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/gcc + /usr/bin/pip3 install meson==0.56.0 +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/opensuse-tumbleweed.sh b/ci/buildenv/opensuse-tumbleweed.sh new file mode 100644 index 0000000..5a6b31c --- /dev/null +++ b/ci/buildenv/opensuse-tumbleweed.sh @@ -0,0 +1,49 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + zypper dist-upgrade -y + zypper install -y \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext-runtime \ + git \ + glib2-devel \ + glibc-locale \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja \ + osinfo-db-tools \ + pkgconfig \ + python3-base \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz + 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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/ubuntu-2004.sh b/ci/buildenv/ubuntu-2004.sh new file mode 100644 index 0000000..ad4519a --- /dev/null +++ b/ci/buildenv/ubuntu-2004.sh @@ -0,0 +1,54 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get dist-upgrade -y + apt-get install --no-install-recommends -y \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pip \ + python3-pytest \ + python3-requests \ + python3-setuptools \ + python3-wheel \ + valac \ + wget \ + xz-utils + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen + dpkg-reconfigure locales + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /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/gcc + /usr/bin/pip3 install meson==0.56.0 +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/buildenv/ubuntu-2204.sh b/ci/buildenv/ubuntu-2204.sh new file mode 100644 index 0000000..0a225fb --- /dev/null +++ b/ci/buildenv/ubuntu-2204.sh @@ -0,0 +1,51 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +function install_buildenv() { + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get dist-upgrade -y + apt-get install --no-install-recommends -y \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + valac \ + wget \ + xz-utils + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen + dpkg-reconfigure locales + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /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/gcc +} + +export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers" +export LANG="en_US.UTF-8" +export MAKE="/usr/bin/make" +export NINJA="/usr/bin/ninja" +export PYTHON="/usr/bin/python3" diff --git a/ci/containers/centos-stream-8.Dockerfile b/ci/containers/centos-stream-8.Dockerfile index 436c846..aad5627 100644 --- a/ci/containers/centos-stream-8.Dockerfile +++ b/ci/containers/centos-stream-8.Dockerfile @@ -6,11 +6,12 @@ FROM quay.io/centos/centos:stream8 -RUN dnf update -y && \ +RUN dnf distro-sync -y && \ dnf install 'dnf-command(config-manager)' -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 \ ca-certificates \ ccache \ @@ -47,8 +48,8 @@ RUN dnf update -y && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/centos-stream-9.Dockerfile b/ci/containers/centos-stream-9.Dockerfile index 341b6c9..8492a76 100644 --- a/ci/containers/centos-stream-9.Dockerfile +++ b/ci/containers/centos-stream-9.Dockerfile @@ -6,14 +6,14 @@ FROM quay.io/centos/centos:stream9 -RUN dnf update -y && \ +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 \ ca-certificates \ + ccache \ check-devel \ gcc \ gettext \ @@ -42,8 +42,12 @@ RUN dnf update -y && \ xz && \ 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/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" diff --git a/ci/containers/debian-10.Dockerfile b/ci/containers/debian-10.Dockerfile index 236d428..f9a842f 100644 --- a/ci/containers/debian-10.Dockerfile +++ b/ci/containers/debian-10.Dockerfile @@ -11,35 +11,35 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get install -y eatmydata && \ eatmydata apt-get dist-upgrade -y && \ eatmydata apt-get install --no-install-recommends -y \ - ca-certificates \ - ccache \ - check \ - gcc \ - gettext \ - git \ - gtk-doc-tools \ - hwdata \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libsoup2.4-dev \ - libxml2-dev \ - libxml2-utils \ - libxslt1-dev \ - locales \ - make \ - ninja-build \ - osinfo-db-tools \ - pkgconf \ - python3 \ - python3-lxml \ - python3-pip \ - python3-pytest \ - python3-requests \ - python3-setuptools \ - python3-wheel \ - valac \ - wget \ - xz-utils && \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pip \ + python3-pytest \ + python3-requests \ + python3-setuptools \ + python3-wheel \ + valac \ + wget \ + xz-utils && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ @@ -49,10 +49,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -RUN pip3 install meson==0.56.0 +RUN /usr/bin/pip3 install meson==0.56.0 +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/debian-11.Dockerfile b/ci/containers/debian-11.Dockerfile index 60aa956..d6e682e 100644 --- a/ci/containers/debian-11.Dockerfile +++ b/ci/containers/debian-11.Dockerfile @@ -11,33 +11,33 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get install -y eatmydata && \ eatmydata apt-get dist-upgrade -y && \ eatmydata apt-get install --no-install-recommends -y \ - ca-certificates \ - ccache \ - check \ - gcc \ - gettext \ - git \ - gtk-doc-tools \ - hwdata \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libsoup2.4-dev \ - libxml2-dev \ - libxml2-utils \ - libxslt1-dev \ - locales \ - make \ - meson \ - ninja-build \ - osinfo-db-tools \ - pkgconf \ - python3 \ - python3-lxml \ - python3-pytest \ - python3-requests \ - valac \ - wget \ - xz-utils && \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + valac \ + wget \ + xz-utils && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ @@ -47,8 +47,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/debian-sid.Dockerfile b/ci/containers/debian-sid.Dockerfile index 8ca0d33..8398b7b 100644 --- a/ci/containers/debian-sid.Dockerfile +++ b/ci/containers/debian-sid.Dockerfile @@ -11,33 +11,33 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get install -y eatmydata && \ eatmydata apt-get dist-upgrade -y && \ eatmydata apt-get install --no-install-recommends -y \ - ca-certificates \ - ccache \ - check \ - gcc \ - gettext \ - git \ - gtk-doc-tools \ - hwdata \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libsoup2.4-dev \ - libxml2-dev \ - libxml2-utils \ - libxslt1-dev \ - locales \ - make \ - meson \ - ninja-build \ - osinfo-db-tools \ - pkgconf \ - python3 \ - python3-lxml \ - python3-pytest \ - python3-requests \ - valac \ - wget \ - xz-utils && \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + valac \ + wget \ + xz-utils && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ @@ -47,8 +47,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/fedora-35.Dockerfile b/ci/containers/fedora-35.Dockerfile index 1fb5ace..6fad65a 100644 --- a/ci/containers/fedora-35.Dockerfile +++ b/ci/containers/fedora-35.Dockerfile @@ -18,35 +18,35 @@ exec "$@"' > /usr/bin/nosync && \ chmod +x /usr/bin/nosync && \ nosync dnf update -y && \ nosync dnf install -y \ - ca-certificates \ - ccache \ - check-devel \ - cppi \ - gcc \ - gettext \ - git \ - glib2-devel \ - glibc-langpack-en \ - gobject-introspection-devel \ - gtk-doc \ - hwdata \ - libsoup-devel \ - libxml2 \ - libxml2-devel \ - libxslt-devel \ - make \ - meson \ - ninja-build \ - osinfo-db-tools \ - pkgconfig \ - python3 \ - python3-lxml \ - python3-pytest \ - python3-requests \ - rpm-build \ - vala \ - wget \ - xz && \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz && \ nosync dnf autoremove -y && \ nosync dnf clean all -y && \ rpm -qa | sort > /packages.txt && \ @@ -54,8 +54,8 @@ exec "$@"' > /usr/bin/nosync && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/fedora-34.Dockerfile b/ci/containers/fedora-36.Dockerfile index 1490bf5..6e4e495 100644 --- a/ci/containers/fedora-34.Dockerfile +++ b/ci/containers/fedora-36.Dockerfile @@ -4,7 +4,7 @@ # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.fedoraproject.org/fedora:34 +FROM registry.fedoraproject.org/fedora:36 RUN dnf install -y nosync && \ echo -e '#!/bin/sh\n\ @@ -18,35 +18,35 @@ exec "$@"' > /usr/bin/nosync && \ chmod +x /usr/bin/nosync && \ nosync dnf update -y && \ nosync dnf install -y \ - ca-certificates \ - ccache \ - check-devel \ - cppi \ - gcc \ - gettext \ - git \ - glib2-devel \ - glibc-langpack-en \ - gobject-introspection-devel \ - gtk-doc \ - hwdata \ - libsoup-devel \ - libxml2 \ - libxml2-devel \ - libxslt-devel \ - make \ - meson \ - ninja-build \ - osinfo-db-tools \ - pkgconfig \ - python3 \ - python3-lxml \ - python3-pytest \ - python3-requests \ - rpm-build \ - vala \ - wget \ - xz && \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz && \ nosync dnf autoremove -y && \ nosync dnf clean all -y && \ rpm -qa | sort > /packages.txt && \ @@ -54,8 +54,8 @@ exec "$@"' > /usr/bin/nosync && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/fedora-rawhide-cross-mingw32.Dockerfile b/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile index 06b1c26..a4f1720 100644 --- a/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile +++ b/ci/containers/fedora-rawhide-cross-mingw32.Dockerfile @@ -19,44 +19,44 @@ exec "$@"' > /usr/bin/nosync && \ chmod +x /usr/bin/nosync && \ nosync dnf distro-sync -y && \ nosync dnf install -y \ - ca-certificates \ - ccache \ - check-devel \ - cppi \ - git \ - glibc-langpack-en \ - gtk-doc \ - hwdata \ - libxml2 \ - make \ - meson \ - ninja-build \ - osinfo-db-tools \ - python3 \ - python3-lxml \ - python3-pytest \ - python3-requests \ - rpm-build \ - vala \ - wget \ - xz && \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + git \ + glibc-langpack-en \ + gtk-doc \ + hwdata \ + libxml2 \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz && \ nosync dnf autoremove -y && \ nosync dnf clean all -y +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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" RUN nosync dnf install -y \ - mingw32-gcc \ - mingw32-gettext \ - mingw32-glib2 \ - mingw32-libsoup \ - mingw32-libxml2 \ - mingw32-libxslt \ - mingw32-pkg-config && \ + mingw32-gcc \ + mingw32-gettext \ + mingw32-glib2 \ + mingw32-libsoup \ + mingw32-libxml2 \ + mingw32-libxslt \ + mingw32-pkg-config && \ nosync dnf clean all -y && \ rpm -qa | sort > /packages.txt && \ mkdir -p /usr/libexec/ccache-wrappers && \ diff --git a/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile b/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile index 08781d3..a6753d1 100644 --- a/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile +++ b/ci/containers/fedora-rawhide-cross-mingw64.Dockerfile @@ -19,44 +19,44 @@ exec "$@"' > /usr/bin/nosync && \ chmod +x /usr/bin/nosync && \ nosync dnf distro-sync -y && \ nosync dnf install -y \ - ca-certificates \ - ccache \ - check-devel \ - cppi \ - git \ - glibc-langpack-en \ - gtk-doc \ - hwdata \ - libxml2 \ - make \ - meson \ - ninja-build \ - osinfo-db-tools \ - python3 \ - python3-lxml \ - python3-pytest \ - python3-requests \ - rpm-build \ - vala \ - wget \ - xz && \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + git \ + glibc-langpack-en \ + gtk-doc \ + hwdata \ + libxml2 \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz && \ nosync dnf autoremove -y && \ nosync dnf clean all -y +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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" RUN nosync dnf install -y \ - mingw64-gcc \ - mingw64-gettext \ - mingw64-glib2 \ - mingw64-libsoup \ - mingw64-libxml2 \ - mingw64-libxslt \ - mingw64-pkg-config && \ + mingw64-gcc \ + mingw64-gettext \ + mingw64-glib2 \ + mingw64-libsoup \ + mingw64-libxml2 \ + mingw64-libxslt \ + mingw64-pkg-config && \ nosync dnf clean all -y && \ rpm -qa | sort > /packages.txt && \ mkdir -p /usr/libexec/ccache-wrappers && \ diff --git a/ci/containers/fedora-rawhide.Dockerfile b/ci/containers/fedora-rawhide.Dockerfile index 6de0847..8ecfe19 100644 --- a/ci/containers/fedora-rawhide.Dockerfile +++ b/ci/containers/fedora-rawhide.Dockerfile @@ -19,35 +19,35 @@ exec "$@"' > /usr/bin/nosync && \ chmod +x /usr/bin/nosync && \ nosync dnf distro-sync -y && \ nosync dnf install -y \ - ca-certificates \ - ccache \ - check-devel \ - cppi \ - gcc \ - gettext \ - git \ - glib2-devel \ - glibc-langpack-en \ - gobject-introspection-devel \ - gtk-doc \ - hwdata \ - libsoup-devel \ - libxml2 \ - libxml2-devel \ - libxslt-devel \ - make \ - meson \ - ninja-build \ - osinfo-db-tools \ - pkgconfig \ - python3 \ - python3-lxml \ - python3-pytest \ - python3-requests \ - rpm-build \ - vala \ - wget \ - xz && \ + ca-certificates \ + ccache \ + check-devel \ + cppi \ + gcc \ + gettext \ + git \ + glib2-devel \ + glibc-langpack-en \ + gobject-introspection-devel \ + gtk-doc \ + hwdata \ + libsoup-devel \ + libxml2 \ + libxml2-devel \ + libxslt-devel \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconfig \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + rpm-build \ + vala \ + wget \ + xz && \ nosync dnf autoremove -y && \ nosync dnf clean all -y && \ rpm -qa | sort > /packages.txt && \ @@ -55,8 +55,8 @@ exec "$@"' > /usr/bin/nosync && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/opensuse-leap-152.Dockerfile b/ci/containers/opensuse-leap-153.Dockerfile index ac77203..0acea09 100644 --- a/ci/containers/opensuse-leap-152.Dockerfile +++ b/ci/containers/opensuse-leap-153.Dockerfile @@ -4,7 +4,7 @@ # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.opensuse.org/opensuse/leap:15.2 +FROM registry.opensuse.org/opensuse/leap:15.3 RUN zypper update -y && \ zypper install -y \ @@ -45,10 +45,10 @@ RUN zypper update -y && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -RUN pip3 install meson==0.56.0 +RUN /usr/bin/pip3 install meson==0.56.0 +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/opensuse-tumbleweed.Dockerfile b/ci/containers/opensuse-tumbleweed.Dockerfile index 95565bf..a13be91 100644 --- a/ci/containers/opensuse-tumbleweed.Dockerfile +++ b/ci/containers/opensuse-tumbleweed.Dockerfile @@ -43,8 +43,8 @@ RUN zypper dist-upgrade -y && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/ubuntu-2004.Dockerfile b/ci/containers/ubuntu-2004.Dockerfile index 511d923..c8471ea 100644 --- a/ci/containers/ubuntu-2004.Dockerfile +++ b/ci/containers/ubuntu-2004.Dockerfile @@ -11,35 +11,35 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ apt-get install -y eatmydata && \ eatmydata apt-get dist-upgrade -y && \ eatmydata apt-get install --no-install-recommends -y \ - ca-certificates \ - ccache \ - check \ - gcc \ - gettext \ - git \ - gtk-doc-tools \ - hwdata \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libsoup2.4-dev \ - libxml2-dev \ - libxml2-utils \ - libxslt1-dev \ - locales \ - make \ - ninja-build \ - osinfo-db-tools \ - pkgconf \ - python3 \ - python3-lxml \ - python3-pip \ - python3-pytest \ - python3-requests \ - python3-setuptools \ - python3-wheel \ - valac \ - wget \ - xz-utils && \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pip \ + python3-pytest \ + python3-requests \ + python3-setuptools \ + python3-wheel \ + valac \ + wget \ + xz-utils && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ @@ -49,10 +49,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -RUN pip3 install meson==0.56.0 +RUN /usr/bin/pip3 install meson==0.56.0 +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 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/containers/ubuntu-2204.Dockerfile b/ci/containers/ubuntu-2204.Dockerfile new file mode 100644 index 0000000..d48b6df --- /dev/null +++ b/ci/containers/ubuntu-2204.Dockerfile @@ -0,0 +1,54 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + +FROM docker.io/library/ubuntu:22.04 + +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get install -y eatmydata && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y \ + ca-certificates \ + ccache \ + check \ + gcc \ + gettext \ + git \ + gtk-doc-tools \ + hwdata \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libsoup2.4-dev \ + libxml2-dev \ + libxml2-utils \ + libxslt1-dev \ + locales \ + make \ + meson \ + ninja-build \ + osinfo-db-tools \ + pkgconf \ + python3 \ + python3-lxml \ + python3-pytest \ + python3-requests \ + valac \ + wget \ + xz-utils && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ + dpkg-reconfigure locales && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /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/gcc + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" diff --git a/ci/gitlab.yml b/ci/gitlab.yml index 33a9fc8..b5a9286 100644 --- a/ci/gitlab.yml +++ b/ci/gitlab.yml @@ -5,281 +5,78 @@ # https://gitlab.com/libvirt/libvirt-ci -.container_job: - image: docker:stable - stage: containers - needs: [] - services: - - docker:dind - before_script: - - export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest" - - export COMMON_TAG="$CI_REGISTRY/libosinfo/libosinfo/ci-$NAME:latest" - - docker info - - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - script: - - docker pull "$TAG" || docker pull "$COMMON_TAG" || true - - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "ci/containers/$NAME.Dockerfile" ci/containers - - docker push "$TAG" - after_script: - - docker logout - - -.gitlab_native_build_job: - image: $CI_REGISTRY_IMAGE/ci-$NAME:latest - stage: builds - - -.gitlab_cross_build_job: - image: $CI_REGISTRY_IMAGE/ci-$NAME-cross-$CROSS:latest - stage: builds - - -check-dco: - stage: sanity_checks - needs: [] - image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master - script: - - /check-dco libosinfo - except: - variables: - - $CI_PROJECT_NAMESPACE == 'libosinfo' - variables: - GIT_DEPTH: 1000 - - -# Native container jobs - -x86_64-centos-stream-8-container: - extends: .container_job - allow_failure: false - variables: - NAME: centos-stream-8 - - -x86_64-centos-stream-9-container: - extends: .container_job - allow_failure: false - variables: - NAME: centos-stream-9 - - -x86_64-debian-10-container: - extends: .container_job - allow_failure: false - variables: - NAME: debian-10 - - -x86_64-debian-11-container: - extends: .container_job - allow_failure: false - variables: - NAME: debian-11 - - -x86_64-debian-sid-container: - extends: .container_job - allow_failure: false - variables: - NAME: debian-sid - - -x86_64-fedora-34-container: - extends: .container_job - allow_failure: false - variables: - NAME: fedora-34 - - -x86_64-fedora-35-container: - extends: .container_job - allow_failure: false - variables: - NAME: fedora-35 - - -x86_64-fedora-rawhide-container: - extends: .container_job - allow_failure: false - variables: - NAME: fedora-rawhide - - -x86_64-opensuse-leap-152-container: - extends: .container_job - allow_failure: false - variables: - NAME: opensuse-leap-152 - - -x86_64-opensuse-tumbleweed-container: - extends: .container_job - allow_failure: false - variables: - NAME: opensuse-tumbleweed - - -x86_64-ubuntu-1804-container: - extends: .container_job - allow_failure: false - variables: - NAME: ubuntu-1804 - - -x86_64-ubuntu-2004-container: - extends: .container_job - allow_failure: false - variables: - NAME: ubuntu-2004 - - - -# Cross container jobs - -mingw32-fedora-rawhide-container: - extends: .container_job - allow_failure: false - variables: - NAME: fedora-rawhide-cross-mingw32 - - -mingw64-fedora-rawhide-container: - extends: .container_job - allow_failure: false - variables: - NAME: fedora-rawhide-cross-mingw64 - - -# Native build jobs - -x86_64-centos-stream-8: - extends: .native_build_job - needs: - - x86_64-centos-stream-8-container - allow_failure: false - variables: - NAME: centos-stream-8 - - -x86_64-centos-stream-9: - extends: .native_build_job - needs: - - x86_64-centos-stream-9-container - allow_failure: false - variables: - NAME: centos-stream-9 - - -x86_64-debian-10: - extends: .native_build_job - needs: - - x86_64-debian-10-container - allow_failure: false - variables: - NAME: debian-10 - - -x86_64-debian-11: - extends: .native_build_job - needs: - - x86_64-debian-11-container - allow_failure: false - variables: - NAME: debian-11 - - -x86_64-debian-sid: - extends: .native_build_job - needs: - - x86_64-debian-sid-container - allow_failure: false - variables: - NAME: debian-sid - - -x86_64-fedora-34: - extends: .native_build_job - needs: - - x86_64-fedora-34-container - allow_failure: false - variables: - NAME: fedora-34 - - -x86_64-fedora-35: - extends: .native_build_job - needs: - - x86_64-fedora-35-container - allow_failure: false - variables: - NAME: fedora-35 - - -x86_64-fedora-rawhide: - extends: .native_build_job - needs: - - x86_64-fedora-rawhide-container - allow_failure: false - variables: - NAME: fedora-rawhide - - -x86_64-opensuse-leap-152: - extends: .native_build_job - needs: - - x86_64-opensuse-leap-152-container - allow_failure: false - variables: - NAME: opensuse-leap-152 - RPM: skip - - -x86_64-opensuse-tumbleweed: - extends: .native_build_job - needs: - - x86_64-opensuse-tumbleweed-container - allow_failure: false - variables: - NAME: opensuse-tumbleweed - RPM: skip - +# Variables that can be set to control the behaviour of +# pipelines that are run +# +# - RUN_PIPELINE - force creation of a CI pipeline when +# pushing to a branch in a forked repository. Official +# CI pipelines are triggered when merge requests are +# created/updated. Setting this variable to a non-empty +# value allows CI testing prior to opening a merge request. +# +# - RUN_CONTAINER_BUILDS - CI pipelines in upstream only +# publish containers if CI file changes are detected. +# Setting this variable to a non-empty value will force +# re-publishing, even when no file changes are detected. +# Typically to use from a scheduled job once a month. +# +# - RUN_UPSTREAM_NAMESPACE - the upstream namespace is +# configured to default to 'libosinfo'. When testing +# changes to CI it might be useful to use a different +# upstream. Setting this variable will override the +# namespace considered to be upstream. +# +# These can be set as git push options +# +# $ git push -o ci.variable=RUN_PIPELINE=1 +# +# Aliases can be set for common usage +# +# $ git config --local alias.push-ci "push -o ci.variable=RUN_PIPELINE=1" +# +# Allowing the less verbose invocation +# +# $ git push-ci +# +# Pipeline variables can also be set in the repository +# pipeline config globally, or set against scheduled pipelines -x86_64-ubuntu-1804: - extends: .native_build_job - needs: - - x86_64-ubuntu-1804-container - allow_failure: false - variables: - NAME: ubuntu-1804 +variables: + RUN_UPSTREAM_NAMESPACE: libosinfo -x86_64-ubuntu-2004: - extends: .native_build_job - needs: - - x86_64-ubuntu-2004-container - allow_failure: false - variables: - NAME: ubuntu-2004 +workflow: + rules: + # upstream+forks: Avoid duplicate pipelines on pushes, if a MR is open + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS' + when: never + # upstream+forks: Avoid pipelines on tag pushes + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG' + when: never -# Cross build jobs + # upstream+forks: Allow pipelines in scenarios we've figured out job rules + - if: '$CI_PIPELINE_SOURCE =~ /^(push|merge_request_event|api|web|schedule)$/' + when: always -mingw32-fedora-rawhide: - extends: .cross_build_job - needs: - - mingw32-fedora-rawhide-container - allow_failure: false - variables: - CROSS: mingw32 - NAME: fedora-rawhide + # upstream+forks: Avoid all other pipelines + - when: never -mingw64-fedora-rawhide: - extends: .cross_build_job - needs: - - mingw64-fedora-rawhide-container - allow_failure: false - variables: - CROSS: mingw64 - NAME: fedora-rawhide +debug: + image: docker.io/library/alpine:3 + stage: sanity_checks + needs: [] + script: + - printenv | sort + rules: + - if: '$RUN_DEBUG' + when: always + +include: + - local: '/ci/gitlab/container-templates.yml' + - local: '/ci/gitlab/build-templates.yml' + - local: '/ci/gitlab/sanity-checks.yml' + - local: '/ci/gitlab/containers.yml' + - local: '/ci/gitlab/builds.yml' diff --git a/ci/gitlab/build-templates.yml b/ci/gitlab/build-templates.yml new file mode 100644 index 0000000..65287b5 --- /dev/null +++ b/ci/gitlab/build-templates.yml @@ -0,0 +1,229 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + + +# +# We use pre-built containers for any pipelines that are: +# +# - Validating code committed on default upstream branch +# - Validating patches targetting default upstream branch +# which do not have CI changes +# +# We use a local build env for any pipelines that are: +# +# - Validating code committed to a non-default upstream branch +# - Validating patches targetting a non-default upstream branch +# - Validating patches targetting default upstream branch which +# include CI changes +# - Validating code committed to a fork branch +# +# Note: the rules across the prebuilt_env and local_env templates +# should be logical inverses, such that jobs are mutually exclusive +# +.gitlab_native_build_job_prebuilt_env: + image: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libosinfo/ci-$NAME:latest + stage: builds + before_script: + - cat /packages.txt + rules: + # upstream: pushes to the default branch + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + when: on_success + + # upstream: other web/api/scheduled pipelines targetting the default branch + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' + when: on_success + + # upstream+forks: merge requests targetting the default branch, without CI changes + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' + changes: + - ci/gitlab/container-templates.yml + - ci/containers/$NAME.Dockerfile + when: never + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' + when: on_success + + # upstream+forks: that's all folks + - when: never + +.gitlab_native_build_job_local_env: + image: $IMAGE + stage: builds + before_script: + - source ci/buildenv/$NAME.sh + - install_buildenv + - cat /packages.txt + rules: + # upstream: pushes to a non-default branch + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' + when: on_success + + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE' + when: on_success + + # upstream: other web/api/scheduled pipelines targetting non-default branches + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH' + when: on_success + + # forks: other web/api/scheduled pipelines + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/' + when: on_success + + # upstream+forks: merge requests targetting the default branch, with CI changes + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + changes: + - ci/gitlab/container-templates.yml + - ci/containers/$NAME.Dockerfile + when: manual + allow_failure: true + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' + changes: + - ci/gitlab/container-templates.yml + - ci/containers/$NAME.Dockerfile + when: on_success + + # upstream+forks: merge requests targetting non-default branches + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH' + when: on_success + + # upstream+forks: that's all folks + - when: never + + +# +# We use pre-built containers for any pipelines that are: +# +# - Validating code committed on default upstream branch +# - Validating patches targetting default upstream branch +# which do not have CI changes +# +# We use a local build env for any pipelines that are: +# +# - Validating code committed to a non-default upstream branch +# - Validating patches targetting a non-default upstream branch +# - Validating patches targetting default upstream branch which +# include CI changes +# - Validating code committed to a fork branch +# +# Note: the rules across the prebuilt_env and local_env templates +# should be logical inverses, such that jobs are mutually exclusive +# +.gitlab_cross_build_job_prebuilt_env: + image: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/libosinfo/ci-$NAME-cross-$CROSS:latest + stage: builds + before_script: + - cat /packages.txt + rules: + # upstream: pushes to the default branch + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + when: on_success + + # upstream: other web/api/scheduled pipelines targetting the default branch + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' + when: on_success + + # upstream+forks: merge requests targetting the default branch, without CI changes + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' + changes: + - ci/gitlab/container-templates.yml + - ci/containers/$NAME.Dockerfile + when: never + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' + when: on_success + + # upstream+forks: that's all folks + - when: never + +.gitlab_cross_build_job_local_env: + image: $IMAGE + stage: builds + before_script: + - source ci/buildenv/$NAME.sh + - install_buildenv + - cat /packages.txt + rules: + # upstream: pushes to a non-default branch + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' + when: on_success + + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE' + when: on_success + + # upstream: other web/api/scheduled pipelines targetting non-default branches + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH' + when: on_success + + # forks: other web/api/scheduled pipelines + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/' + when: on_success + + # upstream+forks: merge requests targetting the default branch, with CI changes + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + changes: + - ci/gitlab/container-templates.yml + - ci/containers/$NAME.Dockerfile + when: manual + allow_failure: true + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' + changes: + - ci/gitlab/container-templates.yml + - ci/containers/$NAME.Dockerfile + when: on_success + + # upstream+forks: merge requests targetting non-default branches + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL' + when: manual + allow_failure: true + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH' + when: on_success + + # upstream+forks: that's all folks + - when: never diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml new file mode 100644 index 0000000..b07cfce --- /dev/null +++ b/ci/gitlab/builds.yml @@ -0,0 +1,270 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + + +# Native build jobs + +x86_64-centos-stream-8-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-centos-stream-8-container + optional: true + allow_failure: false + variables: + NAME: centos-stream-8 + +x86_64-centos-stream-8-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: quay.io/centos/centos:stream8 + NAME: centos-stream-8 + + +x86_64-centos-stream-9-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-centos-stream-9-container + optional: true + allow_failure: false + variables: + NAME: centos-stream-9 + +x86_64-centos-stream-9-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: quay.io/centos/centos:stream9 + NAME: centos-stream-9 + + +x86_64-debian-10-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-debian-10-container + optional: true + allow_failure: false + variables: + NAME: debian-10 + +x86_64-debian-10-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: docker.io/library/debian:10-slim + NAME: debian-10 + + +x86_64-debian-11-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-debian-11-container + optional: true + allow_failure: false + variables: + NAME: debian-11 + +x86_64-debian-11-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: docker.io/library/debian:11-slim + NAME: debian-11 + + +x86_64-debian-sid-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-debian-sid-container + optional: true + allow_failure: false + variables: + NAME: debian-sid + +x86_64-debian-sid-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: docker.io/library/debian:sid-slim + NAME: debian-sid + + +x86_64-fedora-35-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-fedora-35-container + optional: true + allow_failure: false + variables: + NAME: fedora-35 + +x86_64-fedora-35-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: registry.fedoraproject.org/fedora:35 + NAME: fedora-35 + + +x86_64-fedora-36-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-fedora-36-container + optional: true + allow_failure: false + variables: + NAME: fedora-36 + +x86_64-fedora-36-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: registry.fedoraproject.org/fedora:36 + NAME: fedora-36 + + +x86_64-fedora-rawhide-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-fedora-rawhide-container + optional: true + allow_failure: false + variables: + NAME: fedora-rawhide + +x86_64-fedora-rawhide-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: registry.fedoraproject.org/fedora:rawhide + NAME: fedora-rawhide + + +x86_64-opensuse-leap-153-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-opensuse-leap-153-container + optional: true + allow_failure: false + variables: + NAME: opensuse-leap-153 + RPM: skip + +x86_64-opensuse-leap-153-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: registry.opensuse.org/opensuse/leap:15.3 + NAME: opensuse-leap-153 + RPM: skip + + +x86_64-opensuse-tumbleweed-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-opensuse-tumbleweed-container + optional: true + allow_failure: false + variables: + NAME: opensuse-tumbleweed + RPM: skip + +x86_64-opensuse-tumbleweed-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: registry.opensuse.org/opensuse/tumbleweed:latest + NAME: opensuse-tumbleweed + RPM: skip + + +x86_64-ubuntu-2004-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-ubuntu-2004-container + optional: true + allow_failure: false + variables: + NAME: ubuntu-2004 + +x86_64-ubuntu-2004-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: docker.io/library/ubuntu:20.04 + NAME: ubuntu-2004 + + +x86_64-ubuntu-2204-prebuilt-env: + extends: .native_build_job_prebuilt_env + needs: + - job: x86_64-ubuntu-2204-container + optional: true + allow_failure: false + variables: + NAME: ubuntu-2204 + +x86_64-ubuntu-2204-local-env: + extends: .native_build_job_local_env + needs: [] + allow_failure: false + variables: + IMAGE: docker.io/library/ubuntu:22.04 + NAME: ubuntu-2204 + + + +# Cross build jobs + +mingw32-fedora-rawhide-prebuilt-env: + extends: .cross_build_job_prebuilt_env + needs: + - job: mingw32-fedora-rawhide-container + optional: true + allow_failure: false + variables: + CROSS: mingw32 + NAME: fedora-rawhide + +mingw32-fedora-rawhide-local-env: + extends: .cross_build_job_local_env + needs: [] + allow_failure: false + variables: + CROSS: mingw32 + IMAGE: registry.fedoraproject.org/fedora:rawhide + NAME: fedora-rawhide + + +mingw64-fedora-rawhide-prebuilt-env: + extends: .cross_build_job_prebuilt_env + needs: + - job: mingw64-fedora-rawhide-container + optional: true + allow_failure: false + variables: + CROSS: mingw64 + NAME: fedora-rawhide + +mingw64-fedora-rawhide-local-env: + extends: .cross_build_job_local_env + needs: [] + allow_failure: false + variables: + CROSS: mingw64 + IMAGE: registry.fedoraproject.org/fedora:rawhide + NAME: fedora-rawhide diff --git a/ci/gitlab/container-templates.yml b/ci/gitlab/container-templates.yml new file mode 100644 index 0000000..a577028 --- /dev/null +++ b/ci/gitlab/container-templates.yml @@ -0,0 +1,44 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + + +# We want to publish containers with tag 'latest': +# +# - In upstream, for push to default branch with CI changes. +# - In upstream, on request, for scheduled/manual pipelines +# against default branch +# +# Note: never publish from merge requests since they have non-committed code +# +.container_job: + image: docker:stable + stage: containers + needs: [] + services: + - docker:dind + before_script: + - export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest" + - docker info + - docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + script: + - docker build --tag "$TAG" -f "ci/containers/$NAME.Dockerfile" ci/containers ; + - docker push "$TAG" + after_script: + - docker logout + rules: + # upstream: publish containers if there were CI changes on the default branch + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + when: on_success + changes: + - ci/gitlab/container-templates.yml + - ci/containers/$NAME.Dockerfile + + # upstream: allow force re-publishing containers on default branch for web/api/scheduled pipelines + - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $RUN_CONTAINER_BUILDS == "1"' + when: on_success + + # upstream+forks: that's all folks + - when: never diff --git a/ci/gitlab/containers.yml b/ci/gitlab/containers.yml new file mode 100644 index 0000000..ce667d9 --- /dev/null +++ b/ci/gitlab/containers.yml @@ -0,0 +1,108 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + + +# Native container jobs + +x86_64-centos-stream-8-container: + extends: .container_job + allow_failure: false + variables: + NAME: centos-stream-8 + + +x86_64-centos-stream-9-container: + extends: .container_job + allow_failure: false + variables: + NAME: centos-stream-9 + + +x86_64-debian-10-container: + extends: .container_job + allow_failure: false + variables: + NAME: debian-10 + + +x86_64-debian-11-container: + extends: .container_job + allow_failure: false + variables: + NAME: debian-11 + + +x86_64-debian-sid-container: + extends: .container_job + allow_failure: false + variables: + NAME: debian-sid + + +x86_64-fedora-35-container: + extends: .container_job + allow_failure: false + variables: + NAME: fedora-35 + + +x86_64-fedora-36-container: + extends: .container_job + allow_failure: false + variables: + NAME: fedora-36 + + +x86_64-fedora-rawhide-container: + extends: .container_job + allow_failure: false + variables: + NAME: fedora-rawhide + + +x86_64-opensuse-leap-153-container: + extends: .container_job + allow_failure: false + variables: + NAME: opensuse-leap-153 + + +x86_64-opensuse-tumbleweed-container: + extends: .container_job + allow_failure: false + variables: + NAME: opensuse-tumbleweed + + +x86_64-ubuntu-2004-container: + extends: .container_job + allow_failure: false + variables: + NAME: ubuntu-2004 + + +x86_64-ubuntu-2204-container: + extends: .container_job + allow_failure: false + variables: + NAME: ubuntu-2204 + + + +# Cross container jobs + +mingw32-fedora-rawhide-container: + extends: .container_job + allow_failure: false + variables: + NAME: fedora-rawhide-cross-mingw32 + + +mingw64-fedora-rawhide-container: + extends: .container_job + allow_failure: false + variables: + NAME: fedora-rawhide-cross-mingw64 diff --git a/ci/gitlab/sanity-checks.yml b/ci/gitlab/sanity-checks.yml new file mode 100644 index 0000000..f843c7f --- /dev/null +++ b/ci/gitlab/sanity-checks.yml @@ -0,0 +1,26 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + + +check-dco: + stage: sanity_checks + needs: [] + image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master + script: + - /check-dco "$RUN_UPSTREAM_NAMESPACE" + rules: + # upstream+forks: Run pipelines on MR + - if: '$CI_PIPELINE_SOURCE =~ "merge_request_event"' + when: on_success + + # forks: pushes to branches with pipeline requested + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE' + when: on_success + + # upstream+forks: that's all folks + - when: never + variables: + GIT_DEPTH: 1000 diff --git a/ci/manifest.yml b/ci/manifest.yml index 256bf83..ab8eb08 100644 --- a/ci/manifest.yml +++ b/ci/manifest.yml @@ -18,10 +18,10 @@ targets: debian-sid: x86_64 - fedora-34: x86_64 - fedora-35: x86_64 + fedora-36: x86_64 + fedora-rawhide: jobs: - arch: x86_64 @@ -30,7 +30,7 @@ targets: - arch: mingw64 - opensuse-leap-152: + opensuse-leap-153: jobs: - arch: x86_64 variables: @@ -42,6 +42,6 @@ targets: variables: RPM: skip - ubuntu-1804: x86_64 - ubuntu-2004: x86_64 + + ubuntu-2204: x86_64 |