# The format of the tag is "%Y-%m-%d-${counter}" where ${counter} stays
# at "01" unless you have multiple updates on the same day :)
variables:
- UBUNTU_TAG: 2019-01-31-01
- UBUNTU_IMAGE: "$CI_REGISTRY/$CI_PROJECT_PATH/ubuntu:$UBUNTU_TAG"
+ UBUNTU_TAG: 2019-02-12-01
+ UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
+ UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
+cache:
+ paths:
+ - ccache
stages:
- containers-build
- build+test
+# When to automatically run the CI
+.ci-run-policy:
+ only:
+ - master
+ - merge_requests
+ - /^ci([-/].*)?$/
+
+
# CONTAINERS
containers:ubuntu:
+ extends: .ci-run-policy
stage: containers-build
image: docker:stable
services:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# Check if the image (with the specific tag) already exists
- docker manifest inspect $UBUNTU_IMAGE && exit || true
+ # Try to re-use the image from the main repository's registry
+ - docker image pull $UBUNTU_IMAGE_MAIN &&
+ docker image tag $UBUNTU_IMAGE_MAIN $UBUNTU_IMAGE &&
+ docker image push $UBUNTU_IMAGE && exit || true
- docker build -t $UBUNTU_IMAGE -f .gitlab-ci/Dockerfile.ubuntu .
- docker push $UBUNTU_IMAGE
- only:
- changes:
- - .gitlab-ci.yml
- - .gitlab-ci/Dockerfile.ubuntu
# BUILD
.build:
+ extends: .ci-run-policy
image: $UBUNTU_IMAGE
stage: build+test
artifacts:
when: on_failure
untracked: true
+ # Use ccache transparently, and print stats before/after
+ before_script:
+ - export PATH="/usr/lib/ccache:$PATH"
+ - export CCACHE_BASEDIR="$PWD"
+ - export CCACHE_DIR="$PWD/ccache"
+ - export CCACHE_COMPILERCHECK=content
+ - ccache --zero-stats || true
+ - ccache --show-stats || true
+ after_script:
+ - export CCACHE_DIR="$PWD/ccache"
+ - ccache --show-stats
.meson-build:
extends: .build
- before_script:
+ script:
# We need to control the version of llvm-config we're using, so we'll
# generate a native file to do so. This requires meson >=0.49
- if test -n "$LLVM_VERSION"; then
-D vulkan-drivers=${VULKAN_DRIVERS:-[]}
- cd _build
- meson configure
- script:
- - ninja
+ - ninja -j4
- ninja test
.make-build:
extends: .build
variables:
MAKEFLAGS: "-j4"
- before_script:
+ script:
- if test -n "$LLVM_VERSION"; then
export LLVM_CONFIG="llvm-config-${LLVM_VERSION}";
fi
--with-gallium-drivers=$GALLIUM_DRIVERS
--with-vulkan-drivers=$VULKAN_DRIVERS
--disable-llvm-shared-libs
- script:
- make
- eval $MAKE_CHECK_COMMAND
-D gallium-xa=false
-D gallium-nine=false
-D gallium-opencl=disabled
- GALLIUM_DRIVERS: "i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
+ GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
LLVM_VERSION: "5.0"
build:meson-gallium-clover-llvm5: