diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2019-07-29 18:54:24 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2019-07-30 09:43:31 +0200 |
commit | 98f172eb2d2353e19edd8167f22215ce596811f8 (patch) | |
tree | 2c722d92156dac926ab2201c1e4eae1fcd663259 | |
parent | 87f41ace4920fd2069794211683659eb25b025a6 (diff) |
gitlab-ci: Use templates from wayland/ci-templates
These are already used by xserver, Mesa and some other projects.
Current Debian testing brings e.g. GCC 8.3.0 and clang 7.0.1.
-rw-r--r-- | .gitlab-ci.yml | 38 | ||||
-rw-r--r-- | .gitlab-ci/Dockerfile | 64 | ||||
-rw-r--r-- | .gitlab-ci/debian-install.sh | 67 |
3 files changed, 78 insertions, 91 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 313161d..e73feb9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,9 +13,16 @@ # container registry, so that the image from the main repository's registry # will be used there as well. variables: - IMAGE_TAG: "debian-testing-20181213" - IMAGE_LOCAL: "$CI_REGISTRY_IMAGE:$IMAGE_TAG" - IMAGE_MAIN: "registry.freedesktop.org/xorg/driver/xf86-video-amdgpu:$IMAGE_TAG" + UPSTREAM_REPO: xorg/driver/xf86-video-amdgpu + DEBIAN_VERSION: testing-slim + DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh' + DEBIAN_TAG: "2019-08-02" + IMAGE_LOCAL: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG" + +include: + - project: 'wayland/ci-templates' + ref: adfcd8c318d3398d0547960e45daa34d3b48bce6 + file: '/templates/debian.yml' stages: - docker-image @@ -23,31 +30,8 @@ stages: debian-testing: + extends: .debian@container-ifnot-exists stage: docker-image - image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] - script: - - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - - mkdir kaniko-context - - | - echo "FROM $IMAGE_LOCAL" > kaniko-context/Dockerfile - # If the image exists in the local registry, skip to the build-and-test job - set +e - set -x - /kaniko/executor --context kaniko-context --no-push && exit 0 - set +x - set -e - - | - echo "FROM $IMAGE_MAIN" > kaniko-context/Dockerfile - # Try to re-use the image from the main repository's registry, and if - # that fails, generate a local image from scratch - set +e - set -x - /kaniko/executor --context kaniko-context --destination $IMAGE_LOCAL && exit 0 - set +x - set -e - - /kaniko/executor --context $CI_PROJECT_DIR/.gitlab-ci --destination $IMAGE_LOCAL image: $IMAGE_LOCAL diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile deleted file mode 100644 index 161edb5..0000000 --- a/.gitlab-ci/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -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::Get::Build-Dep-Automatic "true";' > /etc/apt/apt.conf && \ - 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 git ca-certificates build-essential automake autoconf libtool pkg-config && \ - apt-get build-dep -y xorg-server && \ - \ - git clone https://gitlab.freedesktop.org/xorg/lib/libXfont.git && \ - cd libXfont && \ - git checkout libXfont-1.5-branch && \ - ./autogen.sh && \ - make install-pkgconfigDATA && \ - cd .. && rm -rf libXfont && \ - git clone https://gitlab.freedesktop.org/xorg/xserver.git && \ - cd xserver && \ - git checkout server-1.13-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.13 --enable-dri2 && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - git checkout server-1.14-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.14 --enable-dri2 && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - git checkout server-1.15-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.15 --enable-dri2 && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - git checkout server-1.16-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.16 --enable-dri2 --enable-dri3 --enable-glamor && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - git checkout server-1.17-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.17 --enable-dri2 --enable-dri3 --enable-glamor && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - git checkout server-1.18-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.18 --enable-dri2 --enable-dri3 --enable-glamor && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - git checkout server-1.19-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.19 --enable-dri2 --enable-dri3 --enable-glamor && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - git checkout server-1.20-branch && \ - ./autogen.sh --prefix=/usr/local/xserver-1.20 --enable-dri2 --enable-dri3 --enable-glamor && \ - make -C include install-nodist_sdkHEADERS && \ - make install-headers install-aclocalDATA install-pkgconfigDATA clean && \ - cd .. && rm -rf xserver && \ - \ - apt-get install -y clang xutils-dev libdrm-dev libgl1-mesa-dev libgbm-dev libudev-dev \ - x11proto-dev libpixman-1-dev libpciaccess-dev && \ - apt-get purge -y git ca-certificates && apt-get autoremove -y --purge && \ - apt-get clean && rm -f /var/lib/apt/lists/deb.debian.org_debian_dists_testing_* diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh new file mode 100644 index 0000000..cf9faac --- /dev/null +++ b/.gitlab-ci/debian-install.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +set -e +set -o xtrace + +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 git ca-certificates build-essential automake autoconf libtool pkg-config + +echo 'APT::Get::Build-Dep-Automatic "true";' >>/etc/apt/apt.conf +apt-get build-dep -y xorg-server + +git clone https://gitlab.freedesktop.org/xorg/lib/libXfont.git +cd libXfont +git checkout libXfont-1.5-branch +./autogen.sh +make install-pkgconfigDATA +cd .. && rm -rf libXfont + +git clone https://gitlab.freedesktop.org/xorg/xserver.git +cd xserver + +git checkout server-1.13-branch +./autogen.sh --prefix=/usr/local/xserver-1.13 --enable-dri2 +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean + +git checkout server-1.14-branch +./autogen.sh --prefix=/usr/local/xserver-1.14 --enable-dri2 +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean + +git checkout server-1.15-branch +./autogen.sh --prefix=/usr/local/xserver-1.15 --enable-dri2 +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean + +git checkout server-1.16-branch +./autogen.sh --prefix=/usr/local/xserver-1.16 --enable-dri2 --enable-dri3 --enable-glamor +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean + +git checkout server-1.17-branch +./autogen.sh --prefix=/usr/local/xserver-1.17 --enable-dri2 --enable-dri3 --enable-glamor +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean + +git checkout server-1.18-branch +./autogen.sh --prefix=/usr/local/xserver-1.18 --enable-dri2 --enable-dri3 --enable-glamor +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean + +git checkout server-1.19-branch +./autogen.sh --prefix=/usr/local/xserver-1.19 --enable-dri2 --enable-dri3 --enable-glamor +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean + +git checkout server-1.20-branch +./autogen.sh --prefix=/usr/local/xserver-1.20 --enable-dri2 --enable-dri3 --enable-glamor +make -C include install-nodist_sdkHEADERS +make install-headers install-aclocalDATA install-pkgconfigDATA clean +cd .. && rm -rf xserver + +apt-get install -y clang xutils-dev libdrm-dev libgl1-mesa-dev libgbm-dev libudev-dev \ + x11proto-dev libpixman-1-dev libpciaccess-dev +apt-get purge -y git ca-certificates +apt-get autoremove -y --purge |