2019-02-24 20:31:46 +00:00
|
|
|
---
|
2019-02-23 02:57:10 +00:00
|
|
|
stages:
|
2019-02-23 22:13:33 +00:00
|
|
|
- base
|
2019-02-23 19:40:34 +00:00
|
|
|
- dependencies
|
2019-02-23 02:57:10 +00:00
|
|
|
- build
|
|
|
|
- test
|
2021-02-05 19:18:58 +00:00
|
|
|
- check
|
2019-02-23 02:57:10 +00:00
|
|
|
|
2019-02-23 03:03:05 +00:00
|
|
|
variables:
|
2019-02-23 19:40:34 +00:00
|
|
|
DOCKER_DRIVER: overlay2
|
2021-02-05 19:02:36 +00:00
|
|
|
DOCKER_BUILDKIT: 1
|
2019-02-23 19:40:34 +00:00
|
|
|
|
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
|
2019-02-24 20:31:46 +00:00
|
|
|
- unknown_failure
|
|
|
|
- api_failure
|
2019-02-24 15:24:32 +00:00
|
|
|
stage: base
|
2019-02-23 19:40:34 +00:00
|
|
|
image: docker:stable
|
2021-02-05 19:24:20 +00:00
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- tests/dockerfiles/*
|
2019-02-24 20:31:46 +00:00
|
|
|
services:
|
|
|
|
- docker:dind
|
2019-02-23 19:40:34 +00:00
|
|
|
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}\""
|
2019-02-24 20:31:46 +00:00
|
|
|
- export DOCKER_HOST="${DOCKER_HOST:-tcp://localhost:2375/}"
|
2019-02-23 19:40:34 +00:00
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
script:
|
2019-02-23 22:13:33 +00:00
|
|
|
- cd tests/dockerfiles
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
2021-02-05 19:12:05 +00:00
|
|
|
docker build . -f Dockerfile.$DISTRO-base
|
2021-02-05 19:02:36 +00:00
|
|
|
--build-arg BUILDKIT_INLINE_CACHE=1
|
2019-02-24 20:31:46 +00:00
|
|
|
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
2021-02-05 19:02:36 +00:00
|
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
|
|
|
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
2019-02-23 22:13:33 +00:00
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
builder ubuntu base:
|
|
|
|
<<: *docker_base_builder
|
2019-02-23 22:13:33 +00:00
|
|
|
variables:
|
2019-02-24 15:24:32 +00:00
|
|
|
DOCKER_BASE_IMAGE: ubuntu:bionic
|
2019-02-23 22:13:33 +00:00
|
|
|
|
2019-04-14 17:51:25 +00:00
|
|
|
builder fedora-31 base:
|
|
|
|
<<: *docker_base_builder
|
|
|
|
variables:
|
|
|
|
DOCKER_BASE_IMAGE: fedora:31
|
2019-02-23 22:13:33 +00:00
|
|
|
|
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
|
|
|
.docker_builder: &docker_builder
|
|
|
|
<<: *docker_base_builder
|
|
|
|
stage: dependencies
|
2019-02-23 22:13:33 +00:00
|
|
|
script:
|
2019-02-24 15:24:32 +00:00
|
|
|
- set -- $CI_JOB_NAME
|
|
|
|
- export DISTRO=$2
|
|
|
|
- export COMPILER=$3
|
|
|
|
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\""
|
2019-02-23 22:13:33 +00:00
|
|
|
- cd tests/dockerfiles
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
2021-02-05 19:12:05 +00:00
|
|
|
docker build . -f Dockerfile.$DISTRO-$COMPILER
|
2019-02-24 20:31:46 +00:00
|
|
|
--build-arg IMAGE=$CI_REGISTRY_IMAGE
|
2021-02-05 19:02:36 +00:00
|
|
|
--build-arg BUILDKIT_INLINE_CACHE=1
|
2019-02-25 18:16:21 +00:00
|
|
|
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
2021-02-05 19:02:36 +00:00
|
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
|
|
|
- docker push ${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:latest
|
2019-02-24 15:24:32 +00:00
|
|
|
|
2021-01-24 00:50:58 +00:00
|
|
|
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-7: *docker_builder
|
|
|
|
builder ubuntu gcc-8: *docker_builder
|
2021-01-24 00:50:58 +00:00
|
|
|
builder ubuntu gcc-9: *docker_builder
|
|
|
|
builder ubuntu gcc-10: *docker_builder
|
2019-04-14 17:51:25 +00:00
|
|
|
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-23 22:13:33 +00:00
|
|
|
|
|
|
|
.build_stages: &build_stages
|
2019-02-24 14:55:30 +00:00
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
when:
|
|
|
|
- runner_system_failure
|
|
|
|
- stuck_or_timeout_failure
|
2019-02-24 20:31:46 +00:00
|
|
|
- unknown_failure
|
|
|
|
- api_failure
|
2021-02-05 19:02:36 +00:00
|
|
|
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
2019-02-23 19:40:34 +00:00
|
|
|
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\""
|
2021-02-28 23:46:53 +00:00
|
|
|
- mkdir -p build
|
2019-02-23 02:57:10 +00:00
|
|
|
- cd build
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
cmake
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS=$LINKER_FLAGS
|
|
|
|
-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
|
2019-02-23 22:13:33 +00:00
|
|
|
|
|
|
|
.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"
|
|
|
|
|
2021-01-24 00:50:58 +00:00
|
|
|
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-7:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
2019-02-24 15:24:32 +00:00
|
|
|
DISTRO: ubuntu
|
2019-02-23 22:13:33 +00:00
|
|
|
COMPILER: gcc-7
|
|
|
|
CC: gcc-7
|
|
|
|
CXX: g++-7
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
ubuntu gcc-8:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
2019-02-24 15:24:32 +00:00
|
|
|
DISTRO: ubuntu
|
2019-02-23 22:13:33 +00:00
|
|
|
COMPILER: gcc-8
|
|
|
|
CC: gcc-8
|
|
|
|
CXX: g++-8
|
|
|
|
|
2021-01-24 00:50:58 +00:00
|
|
|
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
|
|
|
|
|
2019-04-14 17:51:25 +00:00
|
|
|
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 20:31:46 +00:00
|
|
|
.test_stages: &test_stages
|
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
when:
|
|
|
|
- runner_system_failure
|
|
|
|
- stuck_or_timeout_failure
|
|
|
|
- unknown_failure
|
|
|
|
- api_failure
|
2021-02-05 19:02:36 +00:00
|
|
|
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
2019-02-23 19:40:34 +00:00
|
|
|
stage: test
|
2019-02-23 22:13:33 +00:00
|
|
|
|
2019-02-24 20:31:46 +00:00
|
|
|
.test_run: &test_run
|
2019-02-23 19:40:34 +00:00
|
|
|
script:
|
2019-02-24 15:24:32 +00:00
|
|
|
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\""
|
2021-02-28 23:46:53 +00:00
|
|
|
- mkdir -p build
|
2019-02-23 19:40:34 +00:00
|
|
|
- cd build
|
2019-04-14 17:51:25 +00:00
|
|
|
- |
|
2021-02-28 16:59:51 +00:00
|
|
|
cmake \
|
2019-04-14 17:51:25 +00:00
|
|
|
-DBUILD_TESTS=ON \
|
|
|
|
-DMAINTAINER_MODE=ON \
|
|
|
|
..
|
2019-02-23 19:40:34 +00:00
|
|
|
- make -j4
|
|
|
|
- make -j4 test
|
2021-02-05 18:35:07 +00:00
|
|
|
- if [ "$COMPILER" == "clang-11" ] ; then make -j4 test-conky-coverage-txt ; fi
|
|
|
|
- if [ "$COMPILER" == "clang-11" ] ; then make -j4 test-conky-coverage-html ; fi
|
|
|
|
- if [ "$COMPILER" == "clang-11" ] ; then lcov-summary test-conky-coverage-html.info.cleaned ; fi
|
2019-03-09 19:50:46 +00:00
|
|
|
- make -j4
|
2021-02-28 20:30:21 +00:00
|
|
|
- make -j4 install
|
2019-03-09 19:50:46 +00:00
|
|
|
- conky -v
|
2019-03-09 22:00:45 +00:00
|
|
|
- find . -iname '*.gcda' -delete
|
2019-04-14 17:51:25 +00:00
|
|
|
- |
|
2021-02-28 16:59:51 +00:00
|
|
|
cmake \
|
2019-04-14 17:51:25 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DRELEASE=ON \
|
|
|
|
..
|
2019-03-09 19:50:46 +00:00
|
|
|
- make -j4
|
2021-02-28 18:21:20 +00:00
|
|
|
- make -j4 install
|
2019-03-09 19:50:46 +00:00
|
|
|
- conky -v
|
2019-02-24 20:31:46 +00:00
|
|
|
coverage: '/Total Coverage:\s+(\d+\.\d+)%/'
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-coverage-report"
|
|
|
|
paths:
|
|
|
|
- build/test-conky-coverage-html/
|
|
|
|
|
2021-01-24 00:50:58 +00:00
|
|
|
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
|
|
|
|
|
2019-02-24 20:31:46 +00:00
|
|
|
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
|
|
|
|
|
2021-01-24 00:50:58 +00:00
|
|
|
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
|
|
|
|
|
2019-04-14 17:51:25 +00:00
|
|
|
test fedora-31 clang-8:
|
2019-02-24 20:31:46 +00:00
|
|
|
<<: *test_stages
|
|
|
|
<<: *test_run
|
|
|
|
variables:
|
2019-04-14 17:51:25 +00:00
|
|
|
DISTRO: fedora-31
|
|
|
|
COMPILER: clang-8
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
2019-02-24 20:31:46 +00:00
|
|
|
|
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++
|
|
|
|
|
2021-02-05 19:18:58 +00:00
|
|
|
.check_stages: &check_stages
|
|
|
|
retry:
|
|
|
|
max: 2
|
|
|
|
when:
|
|
|
|
- runner_system_failure
|
|
|
|
- stuck_or_timeout_failure
|
|
|
|
- unknown_failure
|
|
|
|
- api_failure
|
|
|
|
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
|
|
|
stage: check
|
|
|
|
|
2019-02-24 20:31:46 +00:00
|
|
|
check clang-tidy:
|
2021-02-05 19:18:58 +00:00
|
|
|
<<: *check_stages
|
2019-02-24 20:31:46 +00:00
|
|
|
variables:
|
2021-01-24 00:50:58 +00:00
|
|
|
COMPILER: clang-11
|
2019-02-24 20:31:46 +00:00
|
|
|
DISTRO: ubuntu
|
2021-01-24 00:50:58 +00:00
|
|
|
CC: clang-11
|
|
|
|
CXX: clang++-11
|
2019-02-23 02:57:10 +00:00
|
|
|
script:
|
2021-02-28 23:46:53 +00:00
|
|
|
- mkdir -p build
|
2019-02-23 02:57:10 +00:00
|
|
|
- cd build
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
cmake
|
|
|
|
-DMAINTAINER_MODE=ON
|
|
|
|
-DCHECK_CODE_QUALITY=ON
|
|
|
|
..
|
|
|
|
- make -j4
|
2019-02-23 19:40:34 +00:00
|
|
|
- make -j4 check-clang-tidy
|
2019-02-23 02:57:10 +00:00
|
|
|
|
2019-02-24 20:31:46 +00:00
|
|
|
check clang-format:
|
2021-02-05 19:18:58 +00:00
|
|
|
<<: *check_stages
|
2019-02-24 20:31:46 +00:00
|
|
|
variables:
|
2021-01-24 00:50:58 +00:00
|
|
|
COMPILER: clang-11
|
2019-02-24 20:31:46 +00:00
|
|
|
DISTRO: ubuntu
|
2021-01-24 00:50:58 +00:00
|
|
|
CC: clang-11
|
|
|
|
CXX: clang++-11
|
2019-02-23 02:57:58 +00:00
|
|
|
script:
|
2021-02-28 23:46:53 +00:00
|
|
|
- mkdir -p build
|
2019-02-23 02:57:58 +00:00
|
|
|
- cd build
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
cmake
|
|
|
|
-DMAINTAINER_MODE=ON
|
|
|
|
-DCHECK_CODE_QUALITY=ON
|
|
|
|
..
|
2019-02-23 19:40:34 +00:00
|
|
|
- make -j4 check-clang-format
|