mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 00:58:36 +00:00
FreeBSD fixes, GitLab CI build improvements.
- use sccache for build caching - add coverage reports as build artifacts - add lcov-summary for coverage summary - clean up/refactor CI yaml This resolves the FreeBSD part of #754.
This commit is contained in:
parent
7b89d84f42
commit
40a438be3e
454
.gitlab-ci.yml
454
.gitlab-ci.yml
@ -1,4 +1,6 @@
|
||||
---
|
||||
stages:
|
||||
- pull
|
||||
- base
|
||||
- dependencies
|
||||
- build
|
||||
@ -6,10 +8,51 @@ stages:
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
CC: clang-7
|
||||
CXX: clang++-7
|
||||
SCCACHE_GCS_BUCKET: btm-build-cache
|
||||
SCCACHE_GCS_RW_MODE: READ_WRITE
|
||||
SCCACHE_GCS_KEY_PATH: /tmp/storage-key.json
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://localhost:2375/
|
||||
|
||||
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
|
||||
|
||||
.docker_base_builder: &docker_base_builder
|
||||
retry:
|
||||
@ -17,23 +60,33 @@ variables:
|
||||
when:
|
||||
- runner_system_failure
|
||||
- stuck_or_timeout_failure
|
||||
- unknown_failure
|
||||
- api_failure
|
||||
stage: base
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:dind
|
||||
only:
|
||||
changes:
|
||||
- tests/dockerfiles/Dockerfile.$2-base
|
||||
- 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
|
||||
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest || true
|
||||
- >
|
||||
docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG
|
||||
|| true
|
||||
script:
|
||||
- cd tests/dockerfiles
|
||||
- docker pull $DOCKER_BASE_IMAGE || true
|
||||
- docker build -f Dockerfile.$DISTRO-base --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 build -f Dockerfile.$DISTRO-base
|
||||
--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
|
||||
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG
|
||||
|
||||
@ -66,11 +119,26 @@ builder centos7 base:
|
||||
- export COMPILER=$3
|
||||
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\""
|
||||
- cd tests/dockerfiles
|
||||
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest || true
|
||||
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG || true
|
||||
- docker build -f Dockerfile.$DISTRO-$COMPILER --build-arg IMAGE=$CI_REGISTRY_IMAGE --cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest --cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG --tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG .
|
||||
- >
|
||||
docker tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_REF_SLUG
|
||||
$CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
||||
- >
|
||||
docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG
|
||||
|| true
|
||||
- >
|
||||
docker pull
|
||||
$CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG
|
||||
|| true
|
||||
- >
|
||||
docker build -f Dockerfile.$DISTRO-$COMPILER
|
||||
--build-arg IMAGE=$CI_REGISTRY_IMAGE
|
||||
--cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG
|
||||
--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
|
||||
- >
|
||||
docker push
|
||||
${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG
|
||||
|
||||
builder ubuntu clang-7: *docker_builder
|
||||
builder ubuntu clang-8: *docker_builder
|
||||
@ -83,7 +151,7 @@ builder fedora clang-7: *docker_builder
|
||||
builder centos6 gcc-7: *docker_builder
|
||||
builder centos7 gcc-7: *docker_builder
|
||||
builder centos7 gcc-8: *docker_builder
|
||||
builder centos7 clang-7: *docker_builder
|
||||
builder centos7 clang-5: *docker_builder
|
||||
|
||||
.build_stages: &build_stages
|
||||
retry:
|
||||
@ -91,32 +159,36 @@ builder centos7 clang-7: *docker_builder
|
||||
when:
|
||||
- runner_system_failure
|
||||
- stuck_or_timeout_failure
|
||||
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
||||
- unknown_failure
|
||||
- api_failure
|
||||
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
|
||||
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 \
|
||||
..
|
||||
- >
|
||||
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
|
||||
..
|
||||
- make -j4
|
||||
|
||||
.build_variables: &build_variables
|
||||
@ -136,10 +208,8 @@ ubuntu clang-7:
|
||||
<<: *build_variables
|
||||
DISTRO: ubuntu
|
||||
COMPILER: clang-7
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
paths:
|
||||
- build/
|
||||
CC: clang-7
|
||||
CXX: clang++-7
|
||||
|
||||
ubuntu clang-8:
|
||||
<<: *build_stages
|
||||
@ -258,12 +328,12 @@ centos7 gcc-8:
|
||||
before_script:
|
||||
- source /opt/rh/devtoolset-8/enable
|
||||
|
||||
centos7 clang-7:
|
||||
centos7 clang-5:
|
||||
<<: *build_stages
|
||||
variables:
|
||||
<<: *build_variables
|
||||
DISTRO: centos7
|
||||
COMPILER: clang-7
|
||||
COMPILER: clang-5
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
BUILD_AUDACIOUS: "OFF"
|
||||
@ -273,40 +343,299 @@ centos7 clang-7:
|
||||
before_script:
|
||||
- source /opt/rh/llvm-toolset-7/enable
|
||||
|
||||
.freebsd_deps: &freebsd_deps
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
- runner_system_failure
|
||||
- stuck_or_timeout_failure
|
||||
- unknown_failure
|
||||
- api_failure
|
||||
tags:
|
||||
- freebsd12
|
||||
before_script:
|
||||
# Try up to 5 times until installation succeeds. It may be locked.
|
||||
- >
|
||||
for i in {1..5}; do
|
||||
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
|
||||
&& break || sleep $(expr $i \* $i + 1); done
|
||||
|
||||
.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
|
||||
variables:
|
||||
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
|
||||
stage: test
|
||||
|
||||
.test_run: &test_run
|
||||
script:
|
||||
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\""
|
||||
- mkdir build
|
||||
- cd build
|
||||
- >
|
||||
cmake
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
-DMAINTAINER_MODE=ON
|
||||
-DBUILD_TESTS=ON
|
||||
..
|
||||
- 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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_REF_SLUG
|
||||
stage: test
|
||||
|
||||
test and coverage:
|
||||
<<: *test_stages
|
||||
CC: clang-7
|
||||
CXX: clang++-7
|
||||
script:
|
||||
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\""
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DBUILD_TESTS=ON ..
|
||||
- >
|
||||
cmake
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
-DMAINTAINER_MODE=ON
|
||||
-DCHECK_CODE_QUALITY=ON
|
||||
..
|
||||
- make -j4
|
||||
- make -j4 test
|
||||
- make -j4 test-conky-coverage-txt
|
||||
|
||||
check-clang-tidy:
|
||||
<<: *test_stages
|
||||
script:
|
||||
- cd build
|
||||
- cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DCHECK_CODE_QUALITY=ON ..
|
||||
- make -j4 check-clang-tidy
|
||||
|
||||
check-clang-format:
|
||||
check clang-format:
|
||||
<<: *test_stages
|
||||
variables:
|
||||
COMPILER: clang-7
|
||||
DISTRO: ubuntu
|
||||
CC: clang-7
|
||||
CXX: clang++-7
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DCHECK_CODE_QUALITY=ON ..
|
||||
- >
|
||||
cmake
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
-DMAINTAINER_MODE=ON
|
||||
-DCHECK_CODE_QUALITY=ON
|
||||
..
|
||||
- make -j4 check-clang-format
|
||||
|
||||
.push_base_images: &push_base_images
|
||||
@ -315,6 +644,8 @@ check-clang-format:
|
||||
when:
|
||||
- runner_system_failure
|
||||
- stuck_or_timeout_failure
|
||||
- unknown_failure
|
||||
- api_failure
|
||||
stage: deploy
|
||||
image: docker:stable
|
||||
services:
|
||||
@ -324,13 +655,16 @@ check-clang-format:
|
||||
- master
|
||||
- tags
|
||||
before_script:
|
||||
- export DOCKER_HOST="${DOCKER_HOST:-tcp://localhost:2375/}"
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
script:
|
||||
- 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
|
||||
- >
|
||||
docker tag $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
|
||||
$CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
||||
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
|
||||
|
||||
push ubuntu base: *push_base_images
|
||||
@ -350,7 +684,9 @@ push fedora base: *push_base_images
|
||||
- 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
|
||||
- >
|
||||
docker tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
|
||||
$CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
||||
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
|
||||
|
||||
push ubuntu clang-7: *push_images
|
||||
@ -364,4 +700,4 @@ push fedora clang-7: *push_images
|
||||
push centos6 gcc-7: *push_images
|
||||
push centos7 gcc-7: *push_images
|
||||
push centos7 gcc-8: *push_images
|
||||
push centos7 clang-7: *push_images
|
||||
push centos7 clang-5: *push_images
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
language: cpp
|
||||
matrix:
|
||||
include:
|
||||
|
@ -59,15 +59,29 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# Check prereqs
|
||||
find_program(GCOV_PATH ${CMAKE_SOURCE_DIR}/tests/llvm-gcov.sh gcov)
|
||||
find_program(GCOV_PATH
|
||||
NAMES ${CMAKE_SOURCE_DIR}/tests/llvm-gcov.sh gcov
|
||||
PATHS ENV PATH)
|
||||
find_program(LCOV_PATH
|
||||
NAMES lcov
|
||||
lcov.bat
|
||||
lcov.exe
|
||||
lcov.perl)
|
||||
find_program(LLVM_COV_PATH NAMES llvm-cov-7 llvm-cov-6 llvm-profdata)
|
||||
lcov.perl
|
||||
PATHS ENV PATH)
|
||||
find_program(LLVM_COV_PATH
|
||||
NAMES llvm-cov80
|
||||
llvm-cov-8
|
||||
llvm-cov70
|
||||
llvm-cov-7
|
||||
llvm-cov
|
||||
PATHS ENV PATH)
|
||||
find_program(LLVM_PROFDATA_PATH
|
||||
NAMES llvm-profdata-7 llvm-profdata-6 llvm-profdata)
|
||||
NAMES llvm-profdata80
|
||||
llvm-profdata-8
|
||||
llvm-profdata70
|
||||
llvm-profdata-7
|
||||
llvm-profdata
|
||||
PATHS ENV PATH)
|
||||
find_program(GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat)
|
||||
find_program(GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
|
||||
find_program(SIMPLE_PYTHON_EXECUTABLE python)
|
||||
@ -186,8 +200,7 @@ function(SETUP_TARGET_FOR_COVERAGE_LCOV_HTML)
|
||||
${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
|
||||
# Clean up
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${Coverage_NAME}.base
|
||||
${Coverage_NAME}.total
|
||||
${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
|
||||
${Coverage_NAME}.total ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
DEPENDS ${Coverage_DEPENDENCIES}
|
||||
COMMENT
|
||||
@ -198,7 +211,8 @@ function(SETUP_TARGET_FOR_COVERAGE_LCOV_HTML)
|
||||
add_custom_command(
|
||||
TARGET ${Coverage_NAME} POST_BUILD
|
||||
COMMAND ;
|
||||
COMMENT "Lcov code coverage info report saved in ${Coverage_NAME}.info.")
|
||||
COMMENT
|
||||
"Lcov code coverage info report saved in ${Coverage_NAME}.info.cleaned")
|
||||
|
||||
# Show info where to find the report
|
||||
add_custom_command(
|
||||
|
@ -105,6 +105,14 @@ if(NOT OS_DARWIN)
|
||||
)
|
||||
endif(NOT OS_DARWIN)
|
||||
|
||||
if(OS_FREEBSD)
|
||||
add_definitions(-D__BSD_VISIBLE=1 -D_XOPEN_SOURCE=700)
|
||||
set(
|
||||
CMAKE_REQUIRED_DEFINITIONS
|
||||
"${CMAKE_REQUIRED_DEFINITIONS} -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L -D__BSD_VISIBLE=1 -D_XOPEN_SOURCE=700"
|
||||
)
|
||||
endif(OS_FREEBSD)
|
||||
|
||||
if(OS_DRAGONFLY)
|
||||
set(conky_libs ${conky_libs} -L/usr/pkg/lib)
|
||||
set(conky_includes ${conky_includes} -I/usr/pkg/include)
|
||||
|
@ -61,7 +61,10 @@ endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
set(OS_FREEBSD true)
|
||||
set(conky_libs ${conky_libs} -lkvm -ldevstat -lbsd)
|
||||
set(conky_libs ${conky_libs} -lkvm -ldevstat -lintl -linotify)
|
||||
if(BUILD_IRC)
|
||||
set(conky_libs ${conky_libs} -lssl -lcrypto)
|
||||
endif(BUILD_IRC)
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "DragonFly")
|
||||
|
@ -49,7 +49,10 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_SYS_INOTIFY_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wc99-extensions"
|
||||
#include <sys/inotify.h>
|
||||
#pragma clang diagnostic pop
|
||||
#endif /* HAVE_SYS_INOTIFY_H */
|
||||
#ifdef BUILD_X11
|
||||
#pragma GCC diagnostic push
|
||||
@ -131,10 +134,6 @@
|
||||
#include <microhttpd.h>
|
||||
#endif /* BUILD_HTTP */
|
||||
|
||||
#if defined(__FreeBSD_kernel__)
|
||||
#include <bsd/bsd.h>
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_OLD_CONFIG
|
||||
#include "convertconf.h"
|
||||
#endif /* BUILD_OLD_CONFIG */
|
||||
|
@ -1098,11 +1098,11 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
|
||||
obj->callbacks.print = &print_sip_status;
|
||||
obj->callbacks.free = &gen_free_opaque;
|
||||
#else
|
||||
END OBJ_IF_ARG(
|
||||
if_running, 0,
|
||||
"if_running needs an argument") char buf[text_buffer_size.get(*state)];
|
||||
END OBJ_IF_ARG(if_running, 0, "if_running needs an argument")
|
||||
|
||||
snprintf(buf, text_buffer_size.get(*state), "pidof %s >/dev/null", arg);
|
||||
char buf[DEFAULT_TEXT_BUFFER_SIZE];
|
||||
|
||||
snprintf(buf, DEFAULT_TEXT_BUFFER_SIZE, "pidof %s >/dev/null", arg);
|
||||
obj->data.s = STRNDUP_ARG;
|
||||
/* XXX: maybe use a different callback here */
|
||||
obj->callbacks.iftest = &if_running_iftest;
|
||||
|
@ -274,7 +274,6 @@ int update_running_processes(void) {
|
||||
|
||||
void get_cpu_count(void) {
|
||||
int cpu_count = 0;
|
||||
size_t cpu_count_len = sizeof(cpu_count);
|
||||
|
||||
if (GETSYSCTL("hw.ncpu", cpu_count) == 0) {
|
||||
info.cpu_count = cpu_count;
|
||||
@ -350,7 +349,7 @@ int update_cpu_usage(void) {
|
||||
fprintf(stderr, "Cannot get kern.cp_times\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < info.cpu_count; i++) {
|
||||
for (i = 0; i < (int)info.cpu_count; i++) {
|
||||
total = 0;
|
||||
for (j = 0; j < CPUSTATES; j++) total += cp_time[i * CPUSTATES + j];
|
||||
|
||||
@ -451,26 +450,7 @@ void get_battery_stuff(char *buf, unsigned int n, const char *bat, int item) {
|
||||
}
|
||||
}
|
||||
|
||||
static int check_bat(const char *bat) {
|
||||
int batnum, numbatts;
|
||||
char *endptr;
|
||||
if (GETSYSCTL("hw.acpi.battery.units", numbatts)) {
|
||||
fprintf(stderr, "Cannot read sysctl \"hw.acpi.battery.units\"\n");
|
||||
return -1;
|
||||
}
|
||||
if (numbatts <= 0) {
|
||||
fprintf(stderr, "No battery unit detected\n");
|
||||
return -1;
|
||||
}
|
||||
if (!bat || (batnum = strtol(bat, &endptr, 10)) < 0 || bat == endptr ||
|
||||
batnum > numbatts) {
|
||||
fprintf(stderr, "Wrong battery unit %s requested\n", bat ? bat : "");
|
||||
return -1;
|
||||
}
|
||||
return batnum;
|
||||
}
|
||||
|
||||
int get_battery_perct(const char *bat) {
|
||||
int get_battery_perct(const char *) {
|
||||
int batcapacity;
|
||||
|
||||
get_battery_stats(nullptr, &batcapacity, NULL, NULL);
|
||||
@ -602,7 +582,7 @@ int update_diskio(void) {
|
||||
struct device_selection *dev_select = nullptr;
|
||||
long select_generation;
|
||||
static struct statinfo statinfo_cur;
|
||||
char device_name[text_buffer_size.get(*state)];
|
||||
char device_name[DEFAULT_TEXT_BUFFER_SIZE];
|
||||
struct diskio_stat *cur;
|
||||
unsigned int reads, writes;
|
||||
unsigned int total_reads = 0, total_writes = 0;
|
||||
@ -627,7 +607,7 @@ int update_diskio(void) {
|
||||
|
||||
di = dev_select[dn].position;
|
||||
dev = &statinfo_cur.dinfo->devices[di];
|
||||
snprintf(device_name, text_buffer_size.get(*state), "%s%d",
|
||||
snprintf(device_name, DEFAULT_TEXT_BUFFER_SIZE, "%s%d",
|
||||
dev_select[dn].device_name, dev_select[dn].unit_number);
|
||||
|
||||
total_reads += (reads = dev->bytes[DEVSTAT_READ] / 512);
|
||||
@ -661,7 +641,7 @@ void get_top_info(void) {
|
||||
p = kvm_getprocs(kd, KERN_PROC_PROC, 0, &n_processes);
|
||||
|
||||
for (i = 0; i < n_processes; i++) {
|
||||
if (!((p[i].ki_flag & P_SYSTEM)) && p[i].ki_comm != nullptr) {
|
||||
if (!(p[i].ki_flag & P_SYSTEM)) {
|
||||
proc = get_process(p[i].ki_pid);
|
||||
|
||||
proc->time_stamp = g_time;
|
||||
|
@ -72,7 +72,7 @@ void free_iconv(struct text_object *obj) {
|
||||
void iconv_convert(size_t *a, char *buff_in, char *p, size_t p_max_size) {
|
||||
int bytes;
|
||||
size_t dummy1, dummy2;
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#if defined(__DragonFly__)
|
||||
const char *ptr = buff_in;
|
||||
#else
|
||||
char *ptr = buff_in;
|
||||
|
@ -32,7 +32,10 @@ extern "C" {
|
||||
}
|
||||
|
||||
#ifdef HAVE_SYS_INOTIFY_H
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wc99-extensions"
|
||||
#include <sys/inotify.h>
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
void llua_append_notify(const char *name);
|
||||
void llua_rm_notifies(void);
|
||||
|
@ -314,7 +314,7 @@ int state::gc(int what, int data) {
|
||||
pushinteger(what);
|
||||
pushinteger(data);
|
||||
call(2, 1, 0);
|
||||
assert(isnumber(-1));
|
||||
assert(state::_isnumber(-1));
|
||||
int r = tointeger(-1);
|
||||
pop();
|
||||
return r;
|
||||
@ -389,7 +389,7 @@ bool state::next(int index) {
|
||||
|
||||
call(2, MULTRET, 0);
|
||||
|
||||
assert(isnumber(-1));
|
||||
assert(state::_isnumber(-1));
|
||||
int r = tointeger(-1);
|
||||
pop();
|
||||
return r != 0;
|
||||
@ -427,7 +427,7 @@ bool state::safe_compare(lua_CFunction trampoline, int index1, int index2) {
|
||||
pushvalue(index1);
|
||||
pushvalue(index2);
|
||||
call(2, 1, 0);
|
||||
assert(isnumber(-1));
|
||||
assert(state::_isnumber(-1));
|
||||
int r = tointeger(-1);
|
||||
pop();
|
||||
return r != 0;
|
||||
|
@ -203,7 +203,8 @@ class state : private std::mutex {
|
||||
}
|
||||
bool isnil(int index) throw() { return lua_isnil(cobj.get(), index); }
|
||||
bool isnone(int index) throw() { return lua_isnone(cobj.get(), index); }
|
||||
bool isnumber(int index) throw() { return lua_isnumber(cobj.get(), index); }
|
||||
/* isnumber conflicts with some headers on BSD systems */
|
||||
bool _isnumber(int index) throw() { return lua_isnumber(cobj.get(), index); }
|
||||
bool isstring(int index) throw() { return lua_isstring(cobj.get(), index); }
|
||||
void pop(int n = 1) throw() { lua_pop(cobj.get(), n); }
|
||||
void pushboolean(bool b) throw() { lua_pushboolean(cobj.get(), b); }
|
||||
|
@ -118,8 +118,10 @@ struct net_stat *get_net_stat(const char *dev, void * /*free_at_crash1*/,
|
||||
|
||||
void parse_net_stat_arg(struct text_object *obj, const char *arg,
|
||||
void *free_at_crash) {
|
||||
#ifdef BUILD_IPV6
|
||||
bool shownetmask = false;
|
||||
bool showscope = false;
|
||||
#endif /* BUILD_IPV6 */
|
||||
char nextarg[21]; // longest arg possible is a devname (max 20 chars)
|
||||
int i = 0;
|
||||
struct net_stat *netstat = nullptr;
|
||||
@ -152,6 +154,7 @@ void parse_net_stat_arg(struct text_object *obj, const char *arg,
|
||||
}
|
||||
|
||||
while (sscanf(arg + i, " %20s", nextarg) == 1) {
|
||||
#ifdef BUILD_IPV6
|
||||
if (strcmp(nextarg, "-n") == 0 || strcmp(nextarg, "--netmask") == 0) {
|
||||
shownetmask = true;
|
||||
} else if (strcmp(nextarg, "-s") == 0 || strcmp(nextarg, "--scope") == 0) {
|
||||
@ -162,8 +165,11 @@ void parse_net_stat_arg(struct text_object *obj, const char *arg,
|
||||
if (nextarg[j] == 's') { showscope = true; }
|
||||
}
|
||||
} else {
|
||||
#endif /* BUILD_IPV6 */
|
||||
netstat = get_net_stat(nextarg, obj, free_at_crash);
|
||||
#ifdef BUILD_IPV6
|
||||
}
|
||||
#endif /* BUILD_IPV6 */
|
||||
i += strlen(nextarg); // skip this arg
|
||||
while (
|
||||
!((isspace(static_cast<unsigned char>(arg[i])) != 0) || arg[i] == 0)) {
|
||||
|
@ -20,11 +20,12 @@ catch_discover_tests(test-conky)
|
||||
|
||||
if(USING_CLANG_7)
|
||||
set(COVERAGE_LCOV_EXCLUDES
|
||||
"v1/*"
|
||||
"/usr/include/**"
|
||||
"/usr/lib/**"
|
||||
"/usr/local/include/**"
|
||||
"/usr/local/lib/**"
|
||||
"*/include/c++/v1/*"
|
||||
"/usr/include/*"
|
||||
"/usr/lib/*"
|
||||
"/usr/local/Cellar/*"
|
||||
"/usr/local/include/*"
|
||||
"/usr/local/lib/*"
|
||||
"/usr/include/libkern/i386/*"
|
||||
"/usr/include/sys/_types/*"
|
||||
"/usr/local/opt/gettext/include/*"
|
||||
|
@ -1,5 +1,7 @@
|
||||
FROM centos:6
|
||||
|
||||
ENV SCCACHE_VER=0.2.8
|
||||
|
||||
RUN yum update -y -q \
|
||||
&& yum -y -q install \
|
||||
epel-release \
|
||||
@ -28,9 +30,14 @@ RUN yum update -y -q \
|
||||
man \
|
||||
mysql-devel \
|
||||
ncurses-devel \
|
||||
openssl-devel \
|
||||
patch \
|
||||
pulseaudio-libs-devel \
|
||||
readline-devel \
|
||||
&& curl -sL https://github.com/mozilla/sccache/releases/download/${SCCACHE_VER}/sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz -o sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& tar xf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& cp sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl/sccache /usr/bin \
|
||||
&& rm -rf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl* \
|
||||
&& curl -L https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.sh -o cmake-3.13.4-Linux-x86_64.sh \
|
||||
&& chmod +x cmake-3.13.4-Linux-x86_64.sh \
|
||||
&& ./cmake-3.13.4-Linux-x86_64.sh --prefix=/usr --skip-license \
|
||||
|
@ -1,5 +1,7 @@
|
||||
FROM centos:7
|
||||
|
||||
ENV SCCACHE_VER=0.2.8
|
||||
|
||||
RUN yum update -y -q \
|
||||
&& yum -y -q install \
|
||||
epel-release \
|
||||
@ -28,9 +30,14 @@ RUN yum update -y -q \
|
||||
man \
|
||||
mysql-devel \
|
||||
ncurses-devel \
|
||||
openssl-devel \
|
||||
patch \
|
||||
pulseaudio-libs-devel \
|
||||
readline-devel \
|
||||
&& curl -sL https://github.com/mozilla/sccache/releases/download/${SCCACHE_VER}/sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz -o sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& tar xf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& cp sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl/sccache /usr/bin \
|
||||
&& rm -rf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl* \
|
||||
&& curl -L https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-Linux-x86_64.sh -o cmake-3.13.4-Linux-x86_64.sh \
|
||||
&& chmod +x cmake-3.13.4-Linux-x86_64.sh \
|
||||
&& ./cmake-3.13.4-Linux-x86_64.sh --prefix=/usr --skip-license \
|
||||
|
@ -3,4 +3,6 @@ FROM ${IMAGE}/builder/centos7-base:latest
|
||||
|
||||
RUN yum -y -q install \
|
||||
llvm-toolset-7-clang \
|
||||
llvm-toolset-7-llvm \
|
||||
llvm-toolset-7-clang-tools-extra \
|
||||
&& yum clean all
|
@ -1,7 +1,9 @@
|
||||
FROM fedora:latest
|
||||
|
||||
RUN yum update -y -q \
|
||||
&& yum -y -q install \
|
||||
ENV SCCACHE_VER=0.2.8
|
||||
|
||||
RUN dnf update -y -q \
|
||||
&& dnf -y -q install \
|
||||
audacious-devel \
|
||||
cairo-devel \
|
||||
cmake \
|
||||
@ -28,8 +30,13 @@ RUN yum update -y -q \
|
||||
man \
|
||||
mysql-devel \
|
||||
ncurses-devel \
|
||||
openssl-devel \
|
||||
patch \
|
||||
pulseaudio-libs-devel \
|
||||
readline-devel \
|
||||
systemd-devel \
|
||||
xmms2-devel
|
||||
xmms2-devel \
|
||||
&& curl -sL https://github.com/mozilla/sccache/releases/download/${SCCACHE_VER}/sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz -o sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& tar xf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& cp sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl/sccache /usr/bin \
|
||||
&& rm -rf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl*
|
||||
|
@ -1,8 +1,15 @@
|
||||
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
|
||||
FROM ${IMAGE}/builder/fedora-base:latest
|
||||
|
||||
RUN yum -y -q install \
|
||||
RUN dnf -y -q install \
|
||||
llvm \
|
||||
clang \
|
||||
libcxx-devel \
|
||||
libcxxabi-devel \
|
||||
&& yum clean all
|
||||
&& dnf clean all \
|
||||
&& curl -Ls https://rpm.nodesource.com/setup_11.x -o npm.sh \
|
||||
&& bash npm.sh \
|
||||
&& rm npm.sh \
|
||||
&& dnf -y -q install npm \
|
||||
&& npm install -g lcov-summary \
|
||||
&& npm cache clean --force
|
||||
|
@ -1,14 +1,18 @@
|
||||
FROM ubuntu:bionic
|
||||
|
||||
ENV SCCACHE_VER=0.2.8
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -qy --no-install-recommends \
|
||||
software-properties-common \
|
||||
wget \
|
||||
gpg-agent \
|
||||
cmake \
|
||||
git \
|
||||
audacious-dev \
|
||||
cmake \
|
||||
docbook2x \
|
||||
git \
|
||||
gpg \
|
||||
gpg-agent \
|
||||
lcov \
|
||||
less \
|
||||
libaudclient-dev \
|
||||
libcairo2-dev \
|
||||
libcurl4-openssl-dev \
|
||||
@ -21,6 +25,7 @@ RUN apt-get update \
|
||||
libmysqlclient-dev \
|
||||
libpulse-dev \
|
||||
librsvg2-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
@ -29,8 +34,12 @@ RUN apt-get update \
|
||||
libxml2-dev \
|
||||
libxmmsclient-dev \
|
||||
libxnvctrl-dev \
|
||||
ncurses-dev \
|
||||
lcov \
|
||||
docbook2x \
|
||||
man \
|
||||
less
|
||||
ncurses-dev \
|
||||
software-properties-common \
|
||||
wget \
|
||||
&& wget -q https://github.com/mozilla/sccache/releases/download/${SCCACHE_VER}/sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz -O sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& tar xf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz \
|
||||
&& cp sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl/sccache /usr/bin \
|
||||
&& rm -rf sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl*
|
||||
|
||||
|
@ -15,4 +15,10 @@ RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
|
||||
clang-format-7 \
|
||||
clang-tidy-7 \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& wget https://deb.nodesource.com/setup_11.x -O npm.sh \
|
||||
&& bash npm.sh \
|
||||
&& rm npm.sh \
|
||||
&& apt-get install -y nodejs \
|
||||
&& npm install -g lcov-summary \
|
||||
&& npm cache clean --force
|
||||
|
@ -1,2 +1,15 @@
|
||||
#!/bin/bash
|
||||
exec llvm-cov-7 gcov "$@"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if hash llvm-cov 2>/dev/null; then
|
||||
llvm_cov="llvm-cov"
|
||||
elif hash llvm-cov-7 2>/dev/null; then
|
||||
llvm_cov="llvm-cov-7"
|
||||
elif hash llvm-cov-8 2>/dev/null; then
|
||||
llvm_cov="llvm-cov-8"
|
||||
elif hash llvm-cov70 2>/dev/null; then
|
||||
llvm_cov="llvm-cov70"
|
||||
elif hash llvm-cov80 2>/dev/null; then
|
||||
llvm_cov="llvm-cov80"
|
||||
fi
|
||||
|
||||
exec $llvm_cov gcov "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user