1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00
conky/.gitlab-ci.yml

956 lines
22 KiB
YAML
Raw Normal View History

---
2019-02-23 02:57:10 +00:00
stages:
- pull
- base
- dependencies
2019-02-23 02:57:10 +00:00
- build
- test
2019-02-24 15:24:32 +00:00
- deploy
2019-02-23 02:57:10 +00:00
variables:
SCCACHE_GCS_BUCKET: btm-build-cache
SCCACHE_GCS_RW_MODE: READ_WRITE
SCCACHE_GCS_KEY_PATH: /tmp/storage-key.json
DOCKER_DRIVER: overlay2
before_script:
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
.pull_images: &pull_images
stage: pull
allow_failure: true
image: docker:stable
services:
- docker:dind
script:
- set -- $CI_JOB_NAME
- export DISTRO=$2
- export COMPILER=$3
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\""
- export DOCKER_HOST="${DOCKER_HOST:-tcp://localhost:2375/}"
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# Pull either the last ref slug, or latest, depending on which exists
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG || docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
# If ref slug exists, use that, otherwise fallback to latest tag
- >
docker tag
$CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG
$CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA ||
docker tag
$CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
$CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
pull ubuntu clang-7: *pull_images
pull ubuntu clang-8: *pull_images
pull ubuntu clang-9: *pull_images
pull ubuntu clang-10: *pull_images
pull ubuntu clang-11: *pull_images
pull ubuntu gcc-5: *pull_images
pull ubuntu gcc-6: *pull_images
pull ubuntu gcc-7: *pull_images
pull ubuntu gcc-8: *pull_images
pull ubuntu gcc-9: *pull_images
pull ubuntu gcc-10: *pull_images
pull fedora-29 gcc-8: *pull_images
pull fedora-29 clang-7: *pull_images
pull fedora-31 clang-8: *pull_images
2021-01-24 01:39:59 +00:00
pull fedora-32 clang-10: *pull_images
pull fedora-33 clang-11: *pull_images
pull centos6 gcc-7: *pull_images
pull centos7 gcc-7: *pull_images
pull centos7 gcc-8: *pull_images
pull centos7 clang-5: *pull_images
2019-02-24 15:24:32 +00:00
.docker_base_builder: &docker_base_builder
2019-02-24 14:55:30 +00:00
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- unknown_failure
- api_failure
2019-02-24 15:24:32 +00:00
stage: base
image: docker:stable
only:
changes:
- tests/dockerfiles/*
services:
- docker:dind
before_script:
2019-02-24 15:24:32 +00:00
- set -- $CI_JOB_NAME
- export DISTRO=$2
- "echo \"Distro: ${DISTRO}\nDocker base: ${DOCKER_BASE_IMAGE}\""
- export DOCKER_HOST="${DOCKER_HOST:-tcp://localhost:2375/}"
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest || true
- >
docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG
|| true
2019-02-25 18:16:21 +00:00
- >
docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
|| true
script:
- cd tests/dockerfiles
2019-02-24 15:24:32 +00:00
- docker pull $DOCKER_BASE_IMAGE || true
- >
docker build -f Dockerfile.$DISTRO-base
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
2019-02-25 18:16:21 +00:00
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG .
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
2019-02-24 15:24:32 +00:00
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG
2019-02-24 15:24:32 +00:00
builder ubuntu base:
<<: *docker_base_builder
variables:
2019-02-24 15:24:32 +00:00
DOCKER_BASE_IMAGE: ubuntu:bionic
builder fedora-29 base:
2019-02-24 15:24:32 +00:00
<<: *docker_base_builder
variables:
DOCKER_BASE_IMAGE: fedora:29
builder fedora-31 base:
<<: *docker_base_builder
variables:
DOCKER_BASE_IMAGE: fedora:31
2021-01-24 01:39:59 +00:00
builder fedora-32 base:
<<: *docker_base_builder
variables:
DOCKER_BASE_IMAGE: fedora:32
builder fedora-33 base:
<<: *docker_base_builder
variables:
DOCKER_BASE_IMAGE: fedora:33
2019-02-24 15:24:32 +00:00
builder centos6 base:
<<: *docker_base_builder
variables:
2019-02-24 15:24:32 +00:00
DOCKER_BASE_IMAGE: centos:6
builder centos7 base:
<<: *docker_base_builder
variables:
DOCKER_BASE_IMAGE: centos:7
2019-02-24 15:24:32 +00:00
.docker_builder: &docker_builder
<<: *docker_base_builder
stage: dependencies
script:
2019-02-24 15:24:32 +00:00
- set -- $CI_JOB_NAME
- export DISTRO=$2
- export COMPILER=$3
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\""
- cd tests/dockerfiles
- >
2019-02-25 18:16:21 +00:00
docker tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
$CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
- >
2019-02-25 18:16:21 +00:00
docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
|| true
- >
docker build -f Dockerfile.$DISTRO-$COMPILER
--build-arg IMAGE=$CI_REGISTRY_IMAGE
2019-02-25 18:16:21 +00:00
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG .
- docker push ${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
- >
docker push
${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG
2019-02-24 15:24:32 +00:00
builder ubuntu clang-7: *docker_builder
builder ubuntu clang-8: *docker_builder
builder ubuntu clang-9: *docker_builder
builder ubuntu clang-10: *docker_builder
builder ubuntu clang-11: *docker_builder
2019-02-24 15:24:32 +00:00
builder ubuntu gcc-5: *docker_builder
builder ubuntu gcc-6: *docker_builder
builder ubuntu gcc-7: *docker_builder
builder ubuntu gcc-8: *docker_builder
builder ubuntu gcc-9: *docker_builder
builder ubuntu gcc-10: *docker_builder
builder fedora-29 gcc-8: *docker_builder
builder fedora-29 clang-7: *docker_builder
builder fedora-31 clang-8: *docker_builder
2021-01-24 01:39:59 +00:00
builder fedora-32 clang-10: *docker_builder
builder fedora-33 clang-11: *docker_builder
2019-02-24 15:24:32 +00:00
builder centos6 gcc-7: *docker_builder
builder centos7 gcc-7: *docker_builder
builder centos7 gcc-8: *docker_builder
builder centos7 clang-5: *docker_builder
.build_stages: &build_stages
2019-02-24 14:55:30 +00:00
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- unknown_failure
- api_failure
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
stage: build
2019-02-23 02:57:10 +00:00
script:
2019-02-24 15:24:32 +00:00
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\""
2019-02-23 02:57:10 +00:00
- mkdir build
- cd build
- >
cmake
-DCMAKE_EXE_LINKER_FLAGS=$LINKER_FLAGS
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DMAINTAINER_MODE=ON
-DBUILD_AUDACIOUS=$BUILD_AUDACIOUS
-DBUILD_MYSQL=ON
-DBUILD_LUA_IMLIB2=ON
-DBUILD_LUA_RSVG=$BUILD_LUA_RSVG
-DBUILD_LUA_CAIRO=$BUILD_LUA_CAIRO
-DBUILD_XMMS2=$BUILD_XMMS2
-DBUILD_ICAL=ON
-DBUILD_IRC=ON
-DBUILD_HTTP=ON
-DBUILD_ICONV=ON
-DBUILD_PULSEAUDIO=ON
-DBUILD_JOURNAL=$BUILD_JOURNAL
-DBUILD_RSS=ON
-DBUILD_IRC=ON
-DBUILD_NVIDIA=$BUILD_NVIDIA
..
2019-02-23 02:57:10 +00:00
- make -j4
.build_variables: &build_variables
LINKER_FLAGS: ""
BUILD_AUDACIOUS: "ON"
BUILD_XMMS2: "ON"
BUILD_NVIDIA: "ON"
BUILD_JOURNAL: "ON"
BUILD_LUA_CAIRO: "ON"
BUILD_LUA_RSVG: "ON"
2019-02-24 15:24:32 +00:00
ubuntu clang-7:
<<: *build_stages
variables:
<<: *build_variables
2019-02-24 15:24:32 +00:00
DISTRO: ubuntu
COMPILER: clang-7
CC: clang-7
CXX: clang++-7
2019-02-23 02:57:10 +00:00
2019-02-24 15:24:32 +00:00
ubuntu clang-8:
<<: *build_stages
variables:
<<: *build_variables
2019-02-24 15:24:32 +00:00
DISTRO: ubuntu
COMPILER: clang-8
CC: clang-8
CXX: clang++-8
ubuntu clang-9:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: ubuntu
COMPILER: clang-9
CC: clang-9
CXX: clang++-9
ubuntu clang-10:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: ubuntu
COMPILER: clang-10
CC: clang-10
CXX: clang++-10
ubuntu clang-11:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: ubuntu
COMPILER: clang-11
CC: clang-11
CXX: clang++-11
2019-02-24 15:24:32 +00:00
ubuntu gcc-5:
<<: *build_stages
variables:
<<: *build_variables
2019-02-24 15:24:32 +00:00
DISTRO: ubuntu
COMPILER: gcc-5
CC: gcc-5
CXX: g++-5
2019-02-24 15:24:32 +00:00
ubuntu gcc-6:
<<: *build_stages
variables:
<<: *build_variables
2019-02-24 15:24:32 +00:00
DISTRO: ubuntu
COMPILER: gcc-6
CC: gcc-6
CXX: g++-6
2019-02-24 15:24:32 +00:00
ubuntu gcc-7:
<<: *build_stages
variables:
<<: *build_variables
2019-02-24 15:24:32 +00:00
DISTRO: ubuntu
COMPILER: gcc-7
CC: gcc-7
CXX: g++-7
2019-02-24 15:24:32 +00:00
ubuntu gcc-8:
<<: *build_stages
variables:
<<: *build_variables
2019-02-24 15:24:32 +00:00
DISTRO: ubuntu
COMPILER: gcc-8
CC: gcc-8
CXX: g++-8
ubuntu gcc-9:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: ubuntu
COMPILER: gcc-9
CC: gcc-9
CXX: g++-9
ubuntu gcc-10:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: ubuntu
COMPILER: gcc-10
CC: gcc-10
CXX: g++-10
fedora-29 gcc-8:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: fedora-29
2019-02-24 15:24:32 +00:00
COMPILER: gcc-8
CC: gcc
CXX: g++
BUILD_AUDACIOUS: "OFF"
fedora-29 clang-7:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: fedora-29
2019-02-24 15:24:32 +00:00
COMPILER: clang-7
CC: clang
CXX: clang++
BUILD_AUDACIOUS: "OFF"
fedora-31 clang-8:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: fedora-31
COMPILER: clang-8
CC: clang
CXX: clang++
BUILD_AUDACIOUS: "OFF"
2021-01-24 01:39:59 +00:00
fedora-32 clang-10:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: fedora-32
COMPILER: clang-10
CC: clang
CXX: clang++
BUILD_AUDACIOUS: "OFF"
fedora-33 clang-11:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: fedora-33
COMPILER: clang-11
CC: clang
CXX: clang++
BUILD_AUDACIOUS: "OFF"
2019-02-24 15:24:32 +00:00
centos6 gcc-7:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: centos6
2019-02-24 15:24:32 +00:00
COMPILER: gcc-7
CC: gcc
CXX: g++
CMAKE: cmake3
BUILD_AUDACIOUS: "OFF"
BUILD_XMMS2: "OFF"
BUILD_NVIDIA: "OFF"
BUILD_JOURNAL: "OFF"
BUILD_LUA_CAIRO: "OFF"
BUILD_LUA_RSVG: "OFF"
# required because centos6 separates tinfo from ncurses
LINKER_FLAGS: "-ltinfo"
before_script:
- source /opt/rh/devtoolset-7/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
2019-02-24 15:24:32 +00:00
centos7 gcc-7:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: centos7
2019-02-24 15:24:32 +00:00
COMPILER: gcc-7
CC: gcc
CXX: g++
CMAKE: cmake3
BUILD_AUDACIOUS: "OFF"
BUILD_XMMS2: "OFF"
BUILD_NVIDIA: "OFF"
BUILD_JOURNAL: "OFF"
before_script:
- source /opt/rh/devtoolset-7/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
2019-02-24 15:24:32 +00:00
centos7 gcc-8:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: centos7
2019-02-24 15:24:32 +00:00
COMPILER: gcc-8
CC: gcc
CXX: g++
CMAKE: cmake3
BUILD_AUDACIOUS: "OFF"
BUILD_XMMS2: "OFF"
BUILD_NVIDIA: "OFF"
BUILD_JOURNAL: "OFF"
before_script:
- source /opt/rh/devtoolset-8/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
centos7 clang-5:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: centos7
COMPILER: clang-5
CC: clang
CXX: clang++
BUILD_AUDACIOUS: "OFF"
BUILD_XMMS2: "OFF"
BUILD_NVIDIA: "OFF"
BUILD_JOURNAL: "OFF"
before_script:
- source /opt/rh/llvm-toolset-7/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
# .freebsd_deps: &freebsd_deps
# retry:
# max: 2
# when:
# - runner_system_failure
# - stuck_or_timeout_failure
# - unknown_failure
# - api_failure
# tags:
# - freebsd12
# before_script:
# - echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
# - 'echo "COMPILER_PACKAGE: $COMPILER_PACKAGE"'
# # Try up to 7 times until installation succeeds. It may be locked.
# - >
# (
# flock -x -w 600 9 || exit 1;
# sudo pkg update;
# sudo pkg install -y -q
# cairo
# cmake
# docbook-xsl
# docbook2X
# gettext-runtime
# imlib2
# lcov
# libical
# libiconv
# libinotify
# libircclient
# libmicrohttpd
# librsvg2
# libX11
# libXdamage
# libXext
# libXfixes
# libXft
# libXinerama
# libxslt
# lua53
# mysql80-client
# pkgconf
# xmms2
# $COMPILER_PACKAGE
# ) 9>/var/lock/pkg
# .freebsd_build_script: &freebsd_build_script
# script:
# - mkdir build
# - cd build
# - >
# cmake
# -DCMAKE_REQUIRED_INCLUDES="/usr/include;/usr/local/include"
# -DCMAKE_EXE_LINKER_FLAGS=$LINKER_FLAGS
# -DMAINTAINER_MODE=ON
# -DBUILD_MYSQL=ON
# -DBUILD_LUA_IMLIB2=ON
# -DBUILD_LUA_RSVG=ON
# -DBUILD_LUA_CAIRO=ON
# -DBUILD_XMMS2=ON
# -DBUILD_ICAL=ON
# -DBUILD_IRC=ON
# -DBUILD_HTTP=ON
# -DBUILD_ICONV=ON
# -DBUILD_RSS=ON
# -DBUILD_IRC=ON
# ..
# - make -j4
# freebsd12 gcc-8:
# <<: *freebsd_deps
# stage: build
# variables:
# DISTRO: freebsd12
# CC: gcc
# CXX: g++
# COMPILER_PACKAGE: gcc
# <<: *freebsd_build_script
# freebsd12 clang-7:
# <<: *freebsd_deps
# stage: build
# variables:
# DISTRO: freebsd12
# CC: clang70
# CXX: clang++70
# COMPILER_PACKAGE: llvm70
# <<: *freebsd_build_script
# freebsd12 clang-8:
# <<: *freebsd_deps
# stage: build
# variables:
# DISTRO: freebsd12
# CC: clang80
# CXX: clang++80
# COMPILER_PACKAGE: llvm80
# <<: *freebsd_build_script
.test_stages: &test_stages
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- unknown_failure
- api_failure
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
stage: test
.test_run: &test_run
script:
2019-02-24 15:24:32 +00:00
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\""
- mkdir build
- cd build
- |
if [[ "$DISTRO" == "freebsd12" ]] ; then
cmake \
-DBUILD_TESTS=ON \
-DMAINTAINER_MODE=ON \
..
else
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DBUILD_TESTS=ON \
-DMAINTAINER_MODE=ON \
..
fi
- make -j4
- make -j4 test
- if [ "$COMPILER" == "clang-7" ] ; then make -j4 test-conky-coverage-txt ; fi
- if [ "$COMPILER" == "clang-7" ] ; then make -j4 test-conky-coverage-html ; fi
- if [ "$COMPILER" == "clang-7" ] ; then lcov-summary test-conky-coverage-html.info.cleaned ; fi
- make -j4
- if [[ "$DISTRO" == "freebsd12" ]] ; then sudo make install ; else make install ; fi
- conky -v
- find . -iname '*.gcda' -delete
- |
if [[ "$DISTRO" == "freebsd12" ]] ; then
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DRELEASE=ON \
..
else
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DRELEASE=ON \
..
fi
- make -j4
- if [[ "$DISTRO" == "freebsd12" ]] ; then sudo make install ; else make install ; fi
- conky -v
coverage: '/Total Coverage:\s+(\d+\.\d+)%/'
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-coverage-report"
paths:
- build/test-conky-coverage-html/
test ubuntu clang-7:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: clang-7
CC: clang-7
CXX: clang++-7
test ubuntu clang-8:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: clang-8
CC: clang-8
CXX: clang++-8
test ubuntu clang-9:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: clang-9
CC: clang-9
CXX: clang++-9
test ubuntu clang-10:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: clang-10
CC: clang-10
CXX: clang++-10
test ubuntu clang-11:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: clang-11
CC: clang-11
CXX: clang++-11
test ubuntu gcc-5:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: gcc-5
CC: gcc-5
CXX: g++-5
test ubuntu gcc-6:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: gcc-6
CC: gcc-6
CXX: g++-6
test ubuntu gcc-7:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: gcc-7
CC: gcc-7
CXX: g++-7
test ubuntu gcc-8:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: gcc-8
CC: gcc-8
CXX: g++-8
test ubuntu gcc-9:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: gcc-9
CC: gcc-9
CXX: g++-9
test ubuntu gcc-10:
<<: *test_stages
<<: *test_run
variables:
DISTRO: ubuntu
COMPILER: gcc-10
CC: gcc-10
CXX: g++-10
test fedora-29 gcc-8:
<<: *test_stages
<<: *test_run
variables:
DISTRO: fedora-29
COMPILER: gcc-8
CC: gcc
CXX: g++
test fedora-29 clang-7:
<<: *test_stages
<<: *test_run
variables:
DISTRO: fedora-29
COMPILER: clang-7
CC: clang
CXX: clang++
test fedora-31 clang-8:
<<: *test_stages
<<: *test_run
variables:
DISTRO: fedora-31
COMPILER: clang-8
CC: clang
CXX: clang++
2021-01-24 01:39:59 +00:00
test fedora-32 clang-10:
<<: *test_stages
<<: *test_run
variables:
DISTRO: fedora-32
COMPILER: clang-10
CC: clang
CXX: clang++
test fedora-33 clang-11:
<<: *test_stages
<<: *test_run
variables:
DISTRO: fedora-33
COMPILER: clang-11
CC: clang
CXX: clang++
test centos6 gcc-7:
<<: *test_stages
<<: *test_run
variables:
DISTRO: centos7
COMPILER: gcc-7
CC: gcc
CXX: g++
before_script:
- source /opt/rh/devtoolset-7/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
test centos7 clang-5:
<<: *test_stages
<<: *test_run
variables:
DISTRO: centos7
COMPILER: clang-5
CC: clang
CXX: clang++
before_script:
- source /opt/rh/llvm-toolset-7/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
test centos7 gcc-7:
<<: *test_stages
<<: *test_run
variables:
DISTRO: centos7
COMPILER: gcc-7
CC: gcc
CXX: g++
before_script:
- source /opt/rh/devtoolset-7/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
test centos7 gcc-8:
<<: *test_stages
<<: *test_run
variables:
DISTRO: centos7
COMPILER: gcc-8
CC: gcc
CXX: g++
before_script:
- source /opt/rh/devtoolset-8/enable
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH
# test freebsd12 clang-7:
# <<: *freebsd_deps
# <<: *test_run
# variables:
# DISTRO: freebsd12
# COMPILER: clang-7
# COMPILER_PACKAGE: llvm70
# CC: clang70
# CXX: clang++70
# test freebsd12 clang-8:
# <<: *freebsd_deps
# <<: *test_run
# variables:
# DISTRO: freebsd12
# COMPILER: clang-8
# COMPILER_PACKAGE: llvm80
# CC: clang80
# CXX: clang++80
# test freebsd12 gcc-8:
# <<: *freebsd_deps
# <<: *test_run
# variables:
# DISTRO: freebsd12
# COMPILER: gcc-8
# COMPILER_PACKAGE: gcc
# CC: gcc
# CXX: g++
check clang-tidy:
<<: *test_stages
variables:
COMPILER: clang-11
DISTRO: ubuntu
CC: clang-11
CXX: clang++-11
2019-02-23 02:57:10 +00:00
script:
- mkdir build
2019-02-23 02:57:10 +00:00
- cd build
- >
cmake
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DMAINTAINER_MODE=ON
-DCHECK_CODE_QUALITY=ON
..
- make -j4
- make -j4 check-clang-tidy
2019-02-23 02:57:10 +00:00
check clang-format:
<<: *test_stages
variables:
COMPILER: clang-11
DISTRO: ubuntu
CC: clang-11
CXX: clang++-11
2019-02-23 02:57:58 +00:00
script:
- mkdir build
2019-02-23 02:57:58 +00:00
- cd build
- >
cmake
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DMAINTAINER_MODE=ON
-DCHECK_CODE_QUALITY=ON
..
- make -j4 check-clang-format
2019-02-24 15:24:32 +00:00
.push_base_images: &push_base_images
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- unknown_failure
- api_failure
2019-02-24 15:24:32 +00:00
stage: deploy
image: docker:stable
services:
- docker:dind
only:
changes:
- tests/dockerfiles/*
2019-02-24 15:24:32 +00:00
refs:
- master
- tags
before_script:
- export DOCKER_HOST="${DOCKER_HOST:-tcp://localhost:2375/}"
2019-02-24 15:24:32 +00:00
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
2019-02-24 15:24:32 +00:00
- set -- $CI_JOB_NAME
- export DISTRO=$2
- 'echo "Distro: ${DISTRO}"'
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
- >
docker tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
$CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
2019-02-24 15:24:32 +00:00
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
push ubuntu base: *push_base_images
push centos6 base: *push_base_images
push centos7 base: *push_base_images
push fedora-29 base: *push_base_images
push fedora-31 base: *push_base_images
2021-01-24 01:39:59 +00:00
push fedora-32 base: *push_base_images
push fedora-33 base: *push_base_images
2019-02-24 15:24:32 +00:00
.push_images: &push_images
<<: *push_base_images
only:
changes:
- tests/dockerfiles/*
2019-02-24 15:24:32 +00:00
refs:
- master
- tags
script:
- set -- $CI_JOB_NAME
- export DISTRO=$2
- export COMPILER=$3
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\""
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
- >
docker tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
$CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
2019-02-24 15:24:32 +00:00
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
push ubuntu clang-7: *push_images
push ubuntu clang-8: *push_images
push ubuntu clang-9: *push_images
push ubuntu clang-10: *push_images
push ubuntu clang-11: *push_images
2019-02-24 15:24:32 +00:00
push ubuntu gcc-5: *push_images
push ubuntu gcc-6: *push_images
push ubuntu gcc-7: *push_images
push ubuntu gcc-8: *push_images
push ubuntu gcc-9: *push_images
push ubuntu gcc-10: *push_images
push fedora-29 gcc-8: *push_images
push fedora-29 clang-7: *push_images
push fedora-31 clang-8: *push_images
2021-01-24 01:39:59 +00:00
push fedora-32 clang-10: *push_images
push fedora-33 clang-11: *push_images
2019-02-24 15:24:32 +00:00
push centos6 gcc-7: *push_images
push centos7 gcc-7: *push_images
push centos7 gcc-8: *push_images
push centos7 clang-5: *push_images