diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-12-14 11:04:24 +0100 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-12-17 17:40:08 +0100 |
commit | f56d8e2282a3d1344aa1300c78faede0071a3bfa (patch) | |
tree | 93737b404a1841551c247ede09a595b8eed2e3d9 /.gitlab-ci | |
parent | ed44f9cd6a4ccf6de7dda70432764b4da10f3f44 (diff) |
gitlab-ci: Docker image can be generated as part of pipeline
This removes the dependency on an externally generated docker image, and
should make it easier to update the docker image or make other changes
related to it.
This is based on Debian testing, because I'm most familiar with Debian.
But it should be easy to base it on another distro.
v2:
* Use kaniko instead of docker-in-docker for image generation, so it can
also work in unprivileged runners.
* Drop piglit.conf & tetexec.cfg overrides, just make sure the files in
the image work.
Diffstat (limited to '.gitlab-ci')
-rw-r--r-- | .gitlab-ci/Dockerfile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile new file mode 100644 index 000000000..c52736796 --- /dev/null +++ b/.gitlab-ci/Dockerfile @@ -0,0 +1,36 @@ +FROM debian:testing-slim + +WORKDIR /tmp + +RUN export DEBIAN_FRONTEND=noninteractive; \ + echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \ + echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \ + echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \ + echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf && \ + echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \ + echo 'exit 101' >> /usr/sbin/policy-rc.d && \ + chmod +x /usr/sbin/policy-rc.d && \ + echo 'deb-src https://deb.debian.org/debian testing main' >/etc/apt/sources.list.d/deb-src.list && \ + apt-get update && \ + apt-get install -y meson git ca-certificates cmake automake autoconf libtool libwaffle-dev \ + libxkbcommon-dev python-mako python-numpy python-six python3-mako python3-numpy python3-six \ + x11-utils x11-xserver-utils xauth xvfb && \ + apt-get build-dep -y xorg-server && \ + \ + cd /root && \ + git clone https://gitlab.freedesktop.org/mesa/piglit.git && cd piglit && \ + cmake -G Ninja -DPIGLIT_BUILD_GL_TESTS=OFF -DPIGLIT_BUILD_GLES1_TESTS=OFF \ + -DPIGLIT_BUILD_GLES2_TESTS=OFF -DPIGLIT_BUILD_GLES3_TESTS=OFF \ + -DPIGLIT_BUILD_DMA_BUF_TESTS=OFF -DPIGLIT_BUILD_GLX_TESTS=OFF && \ + ninja && \ + cd .. && \ + git clone https://gitlab.freedesktop.org/xorg/test/xts && \ + cd xts && ./autogen.sh && xvfb-run make -j$(nproc) && \ + cd .. && rm -rf piglit/.git xts/.git && \ + echo '[xts]' > piglit/piglit.conf && echo 'path=/root/xts' >> piglit/piglit.conf && \ + find -name \*.a -o -name \*.o | xargs rm && \ + \ + apt-get purge -y git cmake automake autoconf libtool libwaffle-dev libxkbcommon-dev \ + python3-mako python3-numpy python3-six x11-utils x11-xserver-utils xauth xvfb && \ + apt-get autoremove -y --purge && apt-get clean && \ + rm -f /var/lib/apt/lists/deb.debian.org_debian_dists_testing_* |