2019-02-24 20:31:46 +00:00
|
|
|
---
|
2019-02-23 02:57:10 +00:00
|
|
|
stages:
|
2019-02-24 20:31:46 +00:00
|
|
|
- pull
|
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
|
2019-02-24 15:24:32 +00:00
|
|
|
- deploy
|
2019-02-23 02:57:10 +00:00
|
|
|
|
2019-02-23 03:03:05 +00:00
|
|
|
variables:
|
2019-02-24 20:31:46 +00:00
|
|
|
SCCACHE_GCS_BUCKET: btm-build-cache
|
|
|
|
SCCACHE_GCS_RW_MODE: READ_WRITE
|
|
|
|
SCCACHE_GCS_KEY_PATH: /tmp/storage-key.json
|
2019-02-23 19:40:34 +00:00
|
|
|
DOCKER_DRIVER: overlay2
|
2019-02-24 20:31:46 +00:00
|
|
|
|
|
|
|
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 gcc-5: *pull_images
|
|
|
|
pull ubuntu gcc-6: *pull_images
|
|
|
|
pull ubuntu gcc-7: *pull_images
|
|
|
|
pull ubuntu gcc-8: *pull_images
|
|
|
|
pull fedora gcc-8: *pull_images
|
|
|
|
pull fedora clang-7: *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-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
|
2019-02-24 15:24:32 +00:00
|
|
|
only:
|
|
|
|
changes:
|
2019-02-24 20:31:46 +00:00
|
|
|
- tests/dockerfiles/*
|
|
|
|
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
|
2019-02-23 22:13:33 +00:00
|
|
|
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest || true
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
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
|
2019-02-23 19:40:34 +00:00
|
|
|
script:
|
2019-02-23 22:13:33 +00:00
|
|
|
- cd tests/dockerfiles
|
2019-02-24 15:24:32 +00:00
|
|
|
- docker pull $DOCKER_BASE_IMAGE || true
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
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
|
2019-02-24 20:31:46 +00:00
|
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
|
|
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG .
|
2019-02-23 22:13:33 +00:00
|
|
|
- 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-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-02-24 15:24:32 +00:00
|
|
|
builder fedora base:
|
|
|
|
<<: *docker_base_builder
|
2019-02-23 22:13:33 +00:00
|
|
|
variables:
|
2019-02-24 15:24:32 +00:00
|
|
|
DOCKER_BASE_IMAGE: fedora:latest
|
2019-02-23 22:13:33 +00:00
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
builder centos6 base:
|
|
|
|
<<: *docker_base_builder
|
2019-02-23 22:13:33 +00:00
|
|
|
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-23 22:13:33 +00:00
|
|
|
|
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
|
|
|
- >
|
2019-02-25 18:16:21 +00:00
|
|
|
docker tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
|
2019-02-24 20:31:46 +00:00
|
|
|
$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
|
2019-02-24 20:31:46 +00:00
|
|
|
|| 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
|
2019-02-24 20:31:46 +00:00
|
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
|
|
|
|
--tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG .
|
2019-02-23 22:13:33 +00:00
|
|
|
- docker push ${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
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 gcc-5: *docker_builder
|
|
|
|
builder ubuntu gcc-6: *docker_builder
|
|
|
|
builder ubuntu gcc-7: *docker_builder
|
|
|
|
builder ubuntu gcc-8: *docker_builder
|
|
|
|
builder fedora gcc-8: *docker_builder
|
|
|
|
builder fedora clang-7: *docker_builder
|
|
|
|
builder centos6 gcc-7: *docker_builder
|
|
|
|
builder centos7 gcc-7: *docker_builder
|
|
|
|
builder centos7 gcc-8: *docker_builder
|
2019-02-24 20:31:46 +00:00
|
|
|
builder centos7 clang-5: *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
|
|
|
|
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
|
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\""
|
2019-02-23 02:57:10 +00:00
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
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
|
2019-02-23 22:13:33 +00:00
|
|
|
|
|
|
|
.build_variables: &build_variables
|
|
|
|
CC: clang-7
|
|
|
|
CXX: clang++-7
|
|
|
|
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:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
2019-02-24 15:24:32 +00:00
|
|
|
DISTRO: ubuntu
|
|
|
|
COMPILER: clang-7
|
2019-02-24 20:31:46 +00:00
|
|
|
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:
|
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: clang-8
|
|
|
|
CC: clang-8
|
|
|
|
CXX: clang++-8
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
ubuntu gcc-5:
|
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-5
|
|
|
|
CC: gcc-5
|
|
|
|
CXX: g++-5
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
ubuntu gcc-6:
|
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-6
|
|
|
|
CC: gcc-6
|
|
|
|
CXX: g++-6
|
|
|
|
|
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
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
fedora gcc-8:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
|
|
|
DISTRO: fedora
|
2019-02-24 15:24:32 +00:00
|
|
|
COMPILER: gcc-8
|
2019-02-23 22:13:33 +00:00
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
|
|
|
BUILD_AUDACIOUS: "OFF"
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
fedora clang-7:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
|
|
|
DISTRO: fedora
|
2019-02-24 15:24:32 +00:00
|
|
|
COMPILER: clang-7
|
2019-02-23 22:13:33 +00:00
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
|
|
|
BUILD_AUDACIOUS: "OFF"
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
centos6 gcc-7:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
|
|
|
DISTRO: centos6
|
2019-02-24 15:24:32 +00:00
|
|
|
COMPILER: gcc-7
|
2019-02-23 22:13:33 +00:00
|
|
|
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
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
centos7 gcc-7:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
|
|
|
DISTRO: centos7
|
2019-02-24 15:24:32 +00:00
|
|
|
COMPILER: gcc-7
|
2019-02-23 22:13:33 +00:00
|
|
|
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
|
|
|
|
|
2019-02-24 15:24:32 +00:00
|
|
|
centos7 gcc-8:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
|
|
|
DISTRO: centos7
|
2019-02-24 15:24:32 +00:00
|
|
|
COMPILER: gcc-8
|
2019-02-23 22:13:33 +00:00
|
|
|
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
|
|
|
|
|
2019-02-24 20:31:46 +00:00
|
|
|
centos7 clang-5:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *build_stages
|
|
|
|
variables:
|
|
|
|
<<: *build_variables
|
|
|
|
DISTRO: centos7
|
2019-02-24 20:31:46 +00:00
|
|
|
COMPILER: clang-5
|
2019-02-23 22:13:33 +00:00
|
|
|
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
|
|
|
|
|
2019-02-24 20:31:46 +00:00
|
|
|
.freebsd_deps: &freebsd_deps
|
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
|
|
|
|
tags:
|
|
|
|
- freebsd12
|
|
|
|
before_script:
|
|
|
|
# Try up to 5 times until installation succeeds. It may be locked.
|
|
|
|
- >
|
2019-02-25 18:01:05 +00:00
|
|
|
for i in {1..6}; do
|
2019-02-24 20:31:46 +00:00
|
|
|
sudo pkg install -y -q
|
|
|
|
cairo
|
|
|
|
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
|
2019-02-25 18:01:05 +00:00
|
|
|
&& break || sleep $(expr $i \* $i + 10); done
|
2019-02-24 20:31:46 +00:00
|
|
|
|
|
|
|
.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
|
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
|
|
|
-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
|
2019-02-23 22:13:33 +00:00
|
|
|
variables:
|
2019-02-24 20:31:46 +00:00
|
|
|
DISTRO: freebsd12
|
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
|
|
|
COMPILER_PACKAGE: gcc
|
|
|
|
<<: *freebsd_build_script
|
|
|
|
|
|
|
|
freebsd12 clang-7:
|
|
|
|
<<: *freebsd_deps
|
|
|
|
stage: build
|
|
|
|
variables:
|
|
|
|
DISTRO: freebsd12
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
|
|
|
COMPILER_PACKAGE: llvm70
|
|
|
|
<<: *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
|
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\""
|
2019-02-24 20:31:46 +00:00
|
|
|
- mkdir build
|
2019-02-23 19:40:34 +00:00
|
|
|
- cd build
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
cmake
|
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
|
|
|
-DMAINTAINER_MODE=ON
|
|
|
|
-DBUILD_TESTS=ON
|
|
|
|
..
|
2019-02-23 19:40:34 +00:00
|
|
|
- make -j4
|
|
|
|
- make -j4 test
|
2019-02-24 20:31:46 +00:00
|
|
|
- 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
|
|
|
|
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 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 fedora clang-7:
|
|
|
|
<<: *test_stages
|
|
|
|
<<: *test_run
|
|
|
|
variables:
|
|
|
|
DISTRO: fedora
|
|
|
|
COMPILER: clang-7
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
|
|
|
|
|
|
|
test fedora gcc-8:
|
|
|
|
<<: *test_stages
|
|
|
|
<<: *test_run
|
|
|
|
variables:
|
|
|
|
DISTRO: fedora
|
|
|
|
COMPILER: gcc-8
|
|
|
|
CC: gcc
|
|
|
|
CXX: g++
|
|
|
|
|
|
|
|
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
|
2019-02-23 19:40:34 +00:00
|
|
|
|
2019-02-24 20:31:46 +00:00
|
|
|
test centos7 clang-5:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *test_stages
|
2019-02-24 20:31:46 +00:00
|
|
|
<<: *test_run
|
|
|
|
variables:
|
|
|
|
DISTRO: centos7
|
|
|
|
COMPILER: clang-5
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
|
|
|
before_script:
|
|
|
|
- source /opt/rh/llvm-toolset-7/enable
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
test freebsd12 clang-7:
|
|
|
|
<<: *freebsd_deps
|
|
|
|
<<: *test_run
|
|
|
|
variables:
|
|
|
|
DISTRO: freebsd12
|
|
|
|
COMPILER: clang-7
|
|
|
|
COMPILER_PACKAGE: llvm70
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
|
|
|
|
|
|
|
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-7
|
|
|
|
DISTRO: ubuntu
|
|
|
|
CC: clang-7
|
|
|
|
CXX: clang++-7
|
2019-02-23 02:57:10 +00:00
|
|
|
script:
|
2019-02-24 20:31:46 +00:00
|
|
|
- mkdir build
|
2019-02-23 02:57:10 +00:00
|
|
|
- cd build
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
cmake
|
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
|
|
|
-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:
|
2019-02-23 22:13:33 +00:00
|
|
|
<<: *test_stages
|
2019-02-24 20:31:46 +00:00
|
|
|
variables:
|
|
|
|
COMPILER: clang-7
|
|
|
|
DISTRO: ubuntu
|
|
|
|
CC: clang-7
|
|
|
|
CXX: clang++-7
|
2019-02-23 02:57:58 +00:00
|
|
|
script:
|
2019-02-24 20:31:46 +00:00
|
|
|
- mkdir build
|
2019-02-23 02:57:58 +00:00
|
|
|
- cd build
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
cmake
|
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
|
|
|
-DMAINTAINER_MODE=ON
|
|
|
|
-DCHECK_CODE_QUALITY=ON
|
|
|
|
..
|
2019-02-23 19:40:34 +00:00
|
|
|
- make -j4 check-clang-format
|
2019-02-23 22:13:33 +00:00
|
|
|
|
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
|
2019-02-24 20:31:46 +00:00
|
|
|
- unknown_failure
|
|
|
|
- api_failure
|
2019-02-24 15:24:32 +00:00
|
|
|
stage: deploy
|
|
|
|
image: docker:stable
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
only:
|
2019-02-25 21:10:51 +00:00
|
|
|
changes:
|
|
|
|
- tests/dockerfiles/*
|
2019-02-24 15:24:32 +00:00
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- tags
|
|
|
|
before_script:
|
2019-02-24 20:31:46 +00:00
|
|
|
- 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
|
2019-02-23 22:13:33 +00:00
|
|
|
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
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
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 base: *push_base_images
|
|
|
|
|
|
|
|
.push_images: &push_images
|
|
|
|
<<: *push_base_images
|
|
|
|
only:
|
2019-02-25 20:48:09 +00:00
|
|
|
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
|
2019-02-24 20:31:46 +00:00
|
|
|
- >
|
|
|
|
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 gcc-5: *push_images
|
|
|
|
push ubuntu gcc-6: *push_images
|
|
|
|
push ubuntu gcc-7: *push_images
|
|
|
|
push ubuntu gcc-8: *push_images
|
|
|
|
push fedora gcc-8: *push_images
|
|
|
|
push fedora clang-7: *push_images
|
|
|
|
push centos6 gcc-7: *push_images
|
|
|
|
push centos7 gcc-7: *push_images
|
|
|
|
push centos7 gcc-8: *push_images
|
2019-02-24 20:31:46 +00:00
|
|
|
push centos7 clang-5: *push_images
|