Mesa (main): ci: Add Fedora 34 based x86 build docker image
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 9 10:51:42 UTC 2021
Module: Mesa
Branch: main
Commit: 5d8d2bf2d8706dba9c5d2e943ef6bc4e59f17b83
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d8d2bf2d8706dba9c5d2e943ef6bc4e59f17b83
Author: Michel Dänzer <mdaenzer at redhat.com>
Date: Wed May 12 16:42:37 2021 +0200
ci: Add Fedora 34 based x86 build docker image
v2:
* Do not install weak dependencies in Fedora docker image.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11412>
---
.gitlab-ci.yml | 21 ++++++
.gitlab-ci/container/container_post_build.sh | 4 +-
.gitlab-ci/container/container_pre_build.sh | 12 ++-
.gitlab-ci/container/fedora/x86_build.sh | 107 +++++++++++++++++++++++++++
4 files changed, 140 insertions(+), 4 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 795af50ebec..10d9e55fdcf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,6 +22,7 @@ include:
ref: *ci-templates-commit
file:
- '/templates/debian.yml'
+ - '/templates/fedora.yml'
- local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
- local: '.gitlab-ci/test-source-dep.yml'
- local: 'src/amd/ci/gitlab-ci.yml'
@@ -452,6 +453,26 @@ debian/arm_build:
needs:
- debian/arm_build
+
+# Fedora 34 based x86 build image
+fedora/x86_build:
+ extends:
+ - .fdo.container-build at fedora
+ - .container
+ variables:
+ FDO_DISTRIBUTION_VERSION: 34
+ MESA_IMAGE_TAG: &fedora-x86_build "2021-07-08-bump-libdrm"
+
+.use-fedora/x86_build:
+ extends:
+ - .set-image
+ variables:
+ MESA_IMAGE_PATH: "fedora/x86_build"
+ MESA_IMAGE_TAG: *fedora-x86_build
+ needs:
+ - fedora/x86_build
+
+
.kernel+rootfs:
extends:
- .ci-run-policy
diff --git a/.gitlab-ci/container/container_post_build.sh b/.gitlab-ci/container/container_post_build.sh
index 66e928a4bc8..818dc1ecfd0 100755
--- a/.gitlab-ci/container/container_post_build.sh
+++ b/.gitlab-ci/container/container_post_build.sh
@@ -1,6 +1,8 @@
#!/bin/sh
-apt-get autoremove -y --purge
+if test -f /etc/debian_version; then
+ apt-get autoremove -y --purge
+fi
# Clean up any build cache for rust.
rm -rf /.cargo
diff --git a/.gitlab-ci/container/container_pre_build.sh b/.gitlab-ci/container/container_pre_build.sh
index 43cadc739b8..dc36970c8a7 100755
--- a/.gitlab-ci/container/container_pre_build.sh
+++ b/.gitlab-ci/container/container_pre_build.sh
@@ -1,15 +1,21 @@
#!/bin/sh
+if test -f /etc/debian_version; then
+ CCACHE_PATH=/usr/lib/ccache
+else
+ CCACHE_PATH=/usr/lib64/ccache
+fi
+
# Common setup among container builds before we get to building code.
export CCACHE_COMPILERCHECK=content
export CCACHE_COMPRESS=true
export CCACHE_DIR=/cache/mesa/ccache
-export PATH=/usr/lib/ccache:$PATH
+export PATH=$CCACHE_PATH:$PATH
# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
-export CC="/usr/lib/ccache/gcc"
-export CXX="/usr/lib/ccache/g++"
+export CC="${CCACHE_PATH}/gcc"
+export CXX="${CCACHE_PATH}/g++"
# Force linkers to gold, since it's so much faster for building. We can't use
# lld because we're on old debian and it's buggy. ming fails meson builds
diff --git a/.gitlab-ci/container/fedora/x86_build.sh b/.gitlab-ci/container/fedora/x86_build.sh
new file mode 100644
index 00000000000..718e49e9338
--- /dev/null
+++ b/.gitlab-ci/container/fedora/x86_build.sh
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+
+EPHEMERAL="
+ autoconf
+ automake
+ bzip2
+ git
+ libtool
+ pkgconfig(epoxy)
+ pkgconfig(gbm)
+ unzip
+ wget
+ xz
+ "
+
+dnf install -y --setopt=install_weak_deps=False \
+ bison \
+ ccache \
+ clang-devel \
+ flex \
+ gcc \
+ gcc-c++ \
+ gettext \
+ kernel-headers \
+ llvm-devel \
+ meson \
+ "pkgconfig(dri2proto)" \
+ "pkgconfig(expat)" \
+ "pkgconfig(glproto)" \
+ "pkgconfig(libclc)" \
+ "pkgconfig(libelf)" \
+ "pkgconfig(libglvnd)" \
+ "pkgconfig(libomxil-bellagio)" \
+ "pkgconfig(libselinux)" \
+ "pkgconfig(libva)" \
+ "pkgconfig(pciaccess)" \
+ "pkgconfig(vdpau)" \
+ "pkgconfig(vulkan)" \
+ "pkgconfig(wayland-egl-backend)" \
+ "pkgconfig(wayland-protocols)" \
+ "pkgconfig(wayland-scanner)" \
+ "pkgconfig(x11)" \
+ "pkgconfig(x11-xcb)" \
+ "pkgconfig(xcb)" \
+ "pkgconfig(xcb-dri2)" \
+ "pkgconfig(xcb-dri3)" \
+ "pkgconfig(xcb-glx)" \
+ "pkgconfig(xcb-present)" \
+ "pkgconfig(xcb-randr)" \
+ "pkgconfig(xcb-sync)" \
+ "pkgconfig(xcb-xfixes)" \
+ "pkgconfig(xdamage)" \
+ "pkgconfig(xext)" \
+ "pkgconfig(xfixes)" \
+ "pkgconfig(xrandr)" \
+ "pkgconfig(xshmfence)" \
+ "pkgconfig(xxf86vm)" \
+ "pkgconfig(zlib)" \
+ python-unversioned-command \
+ python3-devel \
+ python3-mako \
+ python3-devel \
+ python3-mako \
+ vulkan-headers \
+ $EPHEMERAL
+
+
+. .gitlab-ci/container/container_pre_build.sh
+
+
+# dependencies where we want a specific version
+export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
+export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
+
+export XORGMACROS_VERSION=util-macros-1.19.0
+export LIBWAYLAND_VERSION=wayland-1.18.0
+
+wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
+tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
+cd $XORGMACROS_VERSION; ./configure; make install; cd ..
+rm -rf $XORGMACROS_VERSION
+
+. .gitlab-ci/container/build-libdrm.sh
+
+wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
+tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz
+cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
+rm -rf $LIBWAYLAND_VERSION
+
+
+pushd /usr/local
+git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
+rm -rf shader-db/.git
+cd shader-db
+make
+popd
+
+
+############### Uninstall the build software
+
+dnf remove -y $EPHEMERAL
+
+. .gitlab-ci/container/container_post_build.sh
More information about the mesa-commit
mailing list