mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +00:00
551 lines
12 KiB
YAML
551 lines
12 KiB
YAML
---
|
|
stages:
|
|
- base
|
|
- dependencies
|
|
- build
|
|
- test
|
|
- check
|
|
|
|
variables:
|
|
DOCKER_DRIVER: overlay2
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
.docker_base_builder: &docker_base_builder
|
|
retry:
|
|
max: 2
|
|
when:
|
|
- runner_system_failure
|
|
- stuck_or_timeout_failure
|
|
- unknown_failure
|
|
- api_failure
|
|
stage: base
|
|
image: docker:stable
|
|
only:
|
|
changes:
|
|
- tests/dockerfiles/*
|
|
services:
|
|
- docker:dind
|
|
before_script:
|
|
- 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
|
|
script:
|
|
- cd tests/dockerfiles
|
|
- >
|
|
docker build . -f Dockerfile.$DISTRO-base
|
|
--build-arg BUILDKIT_INLINE_CACHE=1
|
|
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
|
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
|
|
|
builder ubuntu base:
|
|
<<: *docker_base_builder
|
|
variables:
|
|
DOCKER_BASE_IMAGE: ubuntu:bionic
|
|
|
|
builder fedora-31 base:
|
|
<<: *docker_base_builder
|
|
variables:
|
|
DOCKER_BASE_IMAGE: fedora:31
|
|
|
|
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
|
|
|
|
.docker_builder: &docker_builder
|
|
<<: *docker_base_builder
|
|
stage: dependencies
|
|
script:
|
|
- set -- $CI_JOB_NAME
|
|
- export DISTRO=$2
|
|
- export COMPILER=$3
|
|
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\""
|
|
- cd tests/dockerfiles
|
|
- >
|
|
docker build . -f Dockerfile.$DISTRO-$COMPILER
|
|
--build-arg IMAGE=$CI_REGISTRY_IMAGE
|
|
--build-arg BUILDKIT_INLINE_CACHE=1
|
|
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
|
- docker push ${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:latest
|
|
|
|
builder ubuntu clang-9: *docker_builder
|
|
builder ubuntu clang-10: *docker_builder
|
|
builder ubuntu clang-11: *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-31 clang-8: *docker_builder
|
|
builder fedora-32 clang-10: *docker_builder
|
|
builder fedora-33 clang-11: *docker_builder
|
|
|
|
.build_stages: &build_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: build
|
|
script:
|
|
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\""
|
|
- mkdir build
|
|
- cd build
|
|
- >
|
|
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
|
|
..
|
|
- 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"
|
|
|
|
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
|
|
|
|
ubuntu gcc-7:
|
|
<<: *build_stages
|
|
variables:
|
|
<<: *build_variables
|
|
DISTRO: ubuntu
|
|
COMPILER: gcc-7
|
|
CC: gcc-7
|
|
CXX: g++-7
|
|
|
|
ubuntu gcc-8:
|
|
<<: *build_stages
|
|
variables:
|
|
<<: *build_variables
|
|
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-31 clang-8:
|
|
<<: *build_stages
|
|
variables:
|
|
<<: *build_variables
|
|
DISTRO: fedora-31
|
|
COMPILER: clang-8
|
|
CC: clang
|
|
CXX: clang++
|
|
BUILD_AUDACIOUS: "OFF"
|
|
|
|
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"
|
|
|
|
# .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:latest
|
|
stage: test
|
|
|
|
.test_run: &test_run
|
|
script:
|
|
- "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 \
|
|
-DBUILD_TESTS=ON \
|
|
-DMAINTAINER_MODE=ON \
|
|
..
|
|
fi
|
|
- make -j4
|
|
- make -j4 test
|
|
- 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
|
|
- 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_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-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-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-31 clang-8:
|
|
<<: *test_stages
|
|
<<: *test_run
|
|
variables:
|
|
DISTRO: fedora-31
|
|
COMPILER: clang-8
|
|
CC: clang
|
|
CXX: clang++
|
|
|
|
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 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_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
|
|
|
|
check clang-tidy:
|
|
<<: *check_stages
|
|
variables:
|
|
COMPILER: clang-11
|
|
DISTRO: ubuntu
|
|
CC: clang-11
|
|
CXX: clang++-11
|
|
script:
|
|
- mkdir build
|
|
- cd build
|
|
- >
|
|
cmake
|
|
-DMAINTAINER_MODE=ON
|
|
-DCHECK_CODE_QUALITY=ON
|
|
..
|
|
- make -j4
|
|
- make -j4 check-clang-tidy
|
|
|
|
check clang-format:
|
|
<<: *check_stages
|
|
variables:
|
|
COMPILER: clang-11
|
|
DISTRO: ubuntu
|
|
CC: clang-11
|
|
CXX: clang++-11
|
|
script:
|
|
- mkdir build
|
|
- cd build
|
|
- >
|
|
cmake
|
|
-DMAINTAINER_MODE=ON
|
|
-DCHECK_CODE_QUALITY=ON
|
|
..
|
|
- make -j4 check-clang-format
|