1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

Add more build envs to GitLab CI.

Adding:

 - clang-8
 - gcc-5 through gcc-8
 - fedora & centos builds

Fixing:
 - mysqlclient default search path
 - build on centos6
This commit is contained in:
Brenden Matthews 2019-02-23 17:13:33 -05:00
parent 46abd3b75a
commit dc35a1b0a8
23 changed files with 905 additions and 259 deletions

View File

@ -1,8 +1,9 @@
stages: stages:
- base
- dependencies - dependencies
- build - build
- test - test
- lint - coverage
variables: variables:
CC: clang-7 CC: clang-7
@ -10,38 +11,400 @@ variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375/ DOCKER_HOST: tcp://localhost:2375/
docker_builder: .docker_builder: &docker_builder
stage: dependencies stage: dependencies
image: docker:stable image: docker:stable
only:
changes:
- Dockerfile.builder
services: services:
- docker:dind - docker:dind
before_script: before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script: - docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest || true
- docker pull $CI_REGISTRY_IMAGE/builder:latest || true
- docker build -f Dockerfile.builder --cache-from $CI_REGISTRY_IMAGE/builder:latest --tag $CI_REGISTRY_IMAGE/builder:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE/builder:latest .
- docker push ${CI_REGISTRY_IMAGE}/builder:$CI_COMMIT_SHA
- docker push ${CI_REGISTRY_IMAGE}/builder:latest
build: builder-ubuntu-base:
image: $CI_REGISTRY_IMAGE/builder:latest <<: *docker_builder
stage: base
variables:
DISTRO: ubuntu
only:
changes:
- tests/dockerfiles/Dockerfile.ubuntu-base
script:
- cd tests/dockerfiles
- docker pull ubuntu:bionic || 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:latest .
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
builder-fedora-base:
<<: *docker_builder
stage: base
variables:
DISTRO: fedora
only:
changes:
- tests/dockerfiles/Dockerfile.fedora-base
script:
- cd tests/dockerfiles
- docker pull fedora:latest || 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:latest .
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
builder-centos6-base:
<<: *docker_builder
stage: base
variables:
DISTRO: centos6
only:
changes:
- tests/dockerfiles/Dockerfile.centos6-base
script:
- cd tests/dockerfiles
- docker pull centos:6 || 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:latest .
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
builder-centos7-base:
<<: *docker_builder
stage: base
variables:
DISTRO: centos7
only:
changes:
- tests/dockerfiles/Dockerfile.centos7-base
script:
- cd tests/dockerfiles
- docker pull centos:7 || 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:latest .
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/builder/$DISTRO-base:latest
.builder_script: &builder_script
script:
- cd tests/dockerfiles
- docker pull $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest || true
- docker build -f Dockerfile.$DISTRO-$COMPILER --build-arg IMAGE=$CI_REGISTRY_IMAGE --cache-from $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest --tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest .
- docker push ${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:$CI_COMMIT_SHA
- docker push ${CI_REGISTRY_IMAGE}/builder/$DISTRO-$COMPILER:latest
builder-ubuntu-clang-7:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.ubuntu-base
- tests/dockerfiles/Dockerfile.ubuntu-clang-7
variables:
COMPILER: clang-7
DISTRO: ubuntu
<<: *builder_script
builder-ubuntu-clang-8:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.ubuntu-base
- tests/dockerfiles/Dockerfile.ubuntu-clang-8
variables:
COMPILER: clang-8
DISTRO: ubuntu
<<: *builder_script
builder-ubuntu-gcc-5:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.ubuntu-base
- tests/dockerfiles/Dockerfile.ubuntu-gcc-5
variables:
COMPILER: gcc-5
DISTRO: ubuntu
<<: *builder_script
builder-ubuntu-gcc-6:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.ubuntu-base
- tests/dockerfiles/Dockerfile.ubuntu-gcc-6
variables:
COMPILER: gcc-6
DISTRO: ubuntu
<<: *builder_script
builder-ubuntu-gcc-7:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.ubuntu-base
- tests/dockerfiles/Dockerfile.ubuntu-gcc-7
variables:
COMPILER: gcc-7
DISTRO: ubuntu
<<: *builder_script
builder-ubuntu-gcc-8:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.ubuntu-base
- tests/dockerfiles/Dockerfile.ubuntu-gcc-8
variables:
COMPILER: gcc-8
DISTRO: ubuntu
<<: *builder_script
builder-fedora-gcc-8:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.fedora-base
- tests/dockerfiles/Dockerfile.fedora-gcc-8
variables:
COMPILER: gcc-8
DISTRO: fedora
<<: *builder_script
builder-fedora-clang-7:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.fedora-base
- tests/dockerfiles/Dockerfile.fedora-clang-7
variables:
COMPILER: clang-7
DISTRO: fedora
<<: *builder_script
builder-centos6-gcc-7:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.centos6-base
- tests/dockerfiles/Dockerfile.centos6-gcc-7
variables:
COMPILER: gcc-7
DISTRO: centos6
<<: *builder_script
builder-centos7-gcc-7:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.centos7-base
- tests/dockerfiles/Dockerfile.centos7-gcc-7
variables:
COMPILER: gcc-7
DISTRO: centos7
<<: *builder_script
builder-centos7-gcc-8:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.centos7-base
- tests/dockerfiles/Dockerfile.centos7-gcc-8
variables:
COMPILER: gcc-8
DISTRO: centos7
<<: *builder_script
builder-centos7-clang-7:
<<: *docker_builder
only:
changes:
- tests/dockerfiles/Dockerfile.centos7-base
- tests/dockerfiles/Dockerfile.centos7-clang-7
variables:
COMPILER: clang-7
DISTRO: centos7
<<: *builder_script
.build_stages: &build_stages
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
stage: build stage: build
script: script:
- mkdir build - mkdir build
- cd build - cd build
- cmake -DMAINTAINER_MODE=ON .. - |
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 - make -j4
.build_variables: &build_variables
COMPILER: clang-7
DISTRO: ubuntu
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"
ubuntu-clang-7:
<<: *build_stages
variables:
<<: *build_variables
artifacts: artifacts:
expire_in: 1 day expire_in: 1 day
paths: paths:
- build/ - build/
test: ubuntu-clang-8:
image: $CI_REGISTRY_IMAGE/builder:latest <<: *build_stages
variables:
<<: *build_variables
COMPILER: clang-8
CC: clang-8
CXX: clang++-8
ubuntu-gcc-5:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-5
CC: gcc-5
CXX: g++-5
ubuntu-gcc-6:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-6
CC: gcc-6
CXX: g++-6
ubuntu-gcc-7:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-7
CC: gcc-7
CXX: g++-7
ubuntu-gcc-8:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-8
CC: gcc-8
CXX: g++-8
fedora-gcc-8:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-8
DISTRO: fedora
CC: gcc
CXX: g++
BUILD_AUDACIOUS: "OFF"
fedora-clang-7:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: fedora
CC: clang
CXX: clang++
BUILD_AUDACIOUS: "OFF"
centos6-gcc-7:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-7
DISTRO: centos6
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
centos7-gcc-7:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-7
DISTRO: centos7
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
centos7-gcc-8:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: gcc-8
DISTRO: centos7
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
centos7-clang-7:
<<: *build_stages
variables:
<<: *build_variables
COMPILER: clang-7
DISTRO: centos7
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
.test_stages: &test_stages
variables:
COMPILER: clang-7
DISTRO: ubuntu
image: $CI_REGISTRY_IMAGE/builder/$DISTRO-$COMPILER:latest
stage: test stage: test
test:
<<: *test_stages
script: script:
- cd build - cd build
- cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DBUILD_TESTS=ON .. - cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DBUILD_TESTS=ON ..
@ -49,17 +412,23 @@ test:
- make -j4 test - make -j4 test
check-clang-tidy: check-clang-tidy:
image: $CI_REGISTRY_IMAGE/builder:latest <<: *test_stages
stage: test
script: script:
- cd build - cd build
- cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DCHECK_CODE_QUALITY=ON .. - cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DCHECK_CODE_QUALITY=ON ..
- make -j4 check-clang-tidy - make -j4 check-clang-tidy
check-clang-format: check-clang-format:
image: $CI_REGISTRY_IMAGE/builder:latest <<: *test_stages
stage: test
script: script:
- cd build - cd build
- cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DCHECK_CODE_QUALITY=ON .. - cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DCHECK_CODE_QUALITY=ON ..
- make -j4 check-clang-format - make -j4 check-clang-format
coverage:
<<: *test_stages
stage: coverage
script:
- cd build
- cmake -DCMAKE_SOURCE_DIR=$(dirname `pwd`) -DCMAKE_BINARY_DIR=`pwd` -DMAINTAINER_MODE=ON -DBUILD_TESTS=ON ..
- make test-conky-coverage-txt

View File

@ -1,236 +1,236 @@
language: cpp language: cpp
matrix: matrix:
include: include:
- os: linux - os: linux
dist: xenial dist: xenial
addons: addons:
apt: apt:
sources: sources:
- llvm-toolchain-xenial-7 - llvm-toolchain-xenial-7
packages: packages:
- clang-7 - clang-7
- llvm-7 - llvm-7
- lld-7 - lld-7
- libc++-7-dev - libc++-7-dev
- libc++abi-7-dev - libc++abi-7-dev
- lcov - lcov
- cmake - cmake
- docbook2x - docbook2x
- libxdamage-dev - libxdamage-dev
- libx11-dev - libx11-dev
- libxft-dev - libxft-dev
- libxext-dev - libxext-dev
- libglib2.0-dev - libglib2.0-dev
- libxml2-dev - libxml2-dev
- libcurl4-gnutls-dev - libcurl4-gnutls-dev
- liblua5.3-dev - liblua5.3-dev
- libcairo2-dev - libcairo2-dev
- libimlib2-dev - libimlib2-dev
- libxinerama-dev - libxinerama-dev
- libmysqlclient-dev - libmysqlclient-dev
- libical-dev - libical-dev
- libircclient-dev - libircclient-dev
- libcairo2-dev - libcairo2-dev
- libmicrohttpd-dev - libmicrohttpd-dev
- ncurses-dev - ncurses-dev
- librsvg2-dev - librsvg2-dev
- libaudclient-dev - libaudclient-dev
- libxmmsclient-dev - libxmmsclient-dev
- libpulse-dev - libpulse-dev
- libcurl4-gnutls-dev - libcurl4-gnutls-dev
- audacious-dev - audacious-dev
- libsystemd-dev - libsystemd-dev
- libxnvctrl-dev - libxnvctrl-dev
- libircclient-dev - libircclient-dev
- gawk - gawk
sonarcloud: sonarcloud:
organization: brndnmtthws-github organization: brndnmtthws-github
token: token:
secure: KikPusy+HXcEVLr0Dqb6mkrefDU5jm7EGQ5fwO4sBG7bRMcnHV3V14s5yB4Ol8btpUC0nkNn/41+f37lkG+oT4y9ZeIH2ZrhsSEHxOgH6DF9ZSVJwtpLrF9siWgfZ0m5c5V7U5rzVYL3jlO1hQfXKCfMNAcwlKcEUrfpk7jVEZc= secure: KikPusy+HXcEVLr0Dqb6mkrefDU5jm7EGQ5fwO4sBG7bRMcnHV3V14s5yB4Ol8btpUC0nkNn/41+f37lkG+oT4y9ZeIH2ZrhsSEHxOgH6DF9ZSVJwtpLrF9siWgfZ0m5c5V7U5rzVYL3jlO1hQfXKCfMNAcwlKcEUrfpk7jVEZc=
env: env:
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" - MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"
- os: linux - os: linux
dist: xenial dist: xenial
addons: addons:
apt: apt:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
packages: packages:
- g++-5 - g++-5
- cmake - cmake
- docbook2x - docbook2x
- libxdamage-dev - libxdamage-dev
- libx11-dev - libx11-dev
- libxft-dev - libxft-dev
- libxext-dev - libxext-dev
- libglib2.0-dev - libglib2.0-dev
- libxml2-dev - libxml2-dev
- libcurl4-gnutls-dev - libcurl4-gnutls-dev
- liblua5.3-dev - liblua5.3-dev
- libcairo2-dev - libcairo2-dev
- libimlib2-dev - libimlib2-dev
- libxinerama-dev - libxinerama-dev
- libmysqlclient-dev - libmysqlclient-dev
- libical-dev - libical-dev
- libircclient-dev - libircclient-dev
- libcairo2-dev - libcairo2-dev
- libmicrohttpd-dev - libmicrohttpd-dev
- ncurses-dev - ncurses-dev
- librsvg2-dev - librsvg2-dev
- libaudclient-dev - libaudclient-dev
- libxmmsclient-dev - libxmmsclient-dev
- libpulse-dev - libpulse-dev
- libcurl4-gnutls-dev - libcurl4-gnutls-dev
- audacious-dev - audacious-dev
- libsystemd-dev - libsystemd-dev
- libxnvctrl-dev - libxnvctrl-dev
- libircclient-dev - libircclient-dev
- gawk - gawk
env: env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- os: linux - os: linux
dist: xenial dist: xenial
addons: addons:
apt: apt:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
packages: packages:
- g++-8 - g++-8
- cmake - cmake
- docbook2x - docbook2x
- libxdamage-dev - libxdamage-dev
- libx11-dev - libx11-dev
- libxft-dev - libxft-dev
- libxext-dev - libxext-dev
- libglib2.0-dev - libglib2.0-dev
- libxml2-dev - libxml2-dev
- libcurl4-gnutls-dev - libcurl4-gnutls-dev
- liblua5.3-dev - liblua5.3-dev
- libcairo2-dev - libcairo2-dev
- libimlib2-dev - libimlib2-dev
- libxinerama-dev - libxinerama-dev
- libmysqlclient-dev - libmysqlclient-dev
- libical-dev - libical-dev
- libircclient-dev - libircclient-dev
- libcairo2-dev - libcairo2-dev
- libmicrohttpd-dev - libmicrohttpd-dev
- ncurses-dev - ncurses-dev
- librsvg2-dev - librsvg2-dev
- libaudclient-dev - libaudclient-dev
- libxmmsclient-dev - libxmmsclient-dev
- libpulse-dev - libpulse-dev
- libcurl4-gnutls-dev - libcurl4-gnutls-dev
- audacious-dev - audacious-dev
- libsystemd-dev - libsystemd-dev
- libxnvctrl-dev - libxnvctrl-dev
- libircclient-dev - libircclient-dev
- gawk - gawk
env: env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- os: osx - os: osx
osx_image: xcode9.4 osx_image: xcode9.4
- os: osx - os: osx
osx_image: xcode10.1 osx_image: xcode10.1
before_install: before_install:
- openssl aes-256-cbc -K $encrypted_38876355cb3e_key -iv $encrypted_38876355cb3e_iv - openssl aes-256-cbc -K $encrypted_38876355cb3e_key -iv $encrypted_38876355cb3e_iv
-in appimage/secret.gpg.enc -out appimage/secret.gpg -d -in appimage/secret.gpg.enc -out appimage/secret.gpg -d
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then eval "${MATRIX_EVAL}" ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then eval "${MATRIX_EVAL}" ; fi
- | - |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install freetype gettext lua imlib2 librsvg docbook2x lcov ; HOMEBREW_NO_AUTO_UPDATE=1 brew install freetype gettext lua imlib2 librsvg docbook2x lcov ;
HOMEBREW_NO_AUTO_UPDATE=1 brew link gettext --force ; HOMEBREW_NO_AUTO_UPDATE=1 brew link gettext --force ;
fi fi
before_script: before_script:
- | - |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mkdir build && cd build mkdir build && cd build
cmake \ cmake \
-DMAINTAINER_MODE=ON \ -DMAINTAINER_MODE=ON \
-DBUILD_MYSQL=ON \ -DBUILD_MYSQL=ON \
-DBUILD_LUA_IMLIB2=ON \ -DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_RSVG=ON \ -DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_CAIRO=ON \ -DBUILD_LUA_CAIRO=ON \
-DBUILD_AUDACIOUS=ON \ -DBUILD_AUDACIOUS=ON \
-DBUILD_XMMS2=ON \ -DBUILD_XMMS2=ON \
-DBUILD_ICAL=ON \ -DBUILD_ICAL=ON \
-DBUILD_IRC=ON \ -DBUILD_IRC=ON \
-DBUILD_HTTP=ON \ -DBUILD_HTTP=ON \
-DBUILD_ICONV=ON \ -DBUILD_ICONV=ON \
-DBUILD_PULSEAUDIO=ON \ -DBUILD_PULSEAUDIO=ON \
-DBUILD_JOURNAL=ON \ -DBUILD_JOURNAL=ON \
-DBUILD_RSS=ON \ -DBUILD_RSS=ON \
-DBUILD_IRC=ON \ -DBUILD_IRC=ON \
-DBUILD_NVIDIA=ON \ -DBUILD_NVIDIA=ON \
.. ..
cd .. cd ..
mkdir build-no-x11 mkdir build-no-x11
cd build-no-x11 cd build-no-x11
cmake \ cmake \
-DMAINTAINER_MODE=ON \ -DMAINTAINER_MODE=ON \
-DBUILD_X11=OFF \ -DBUILD_X11=OFF \
-DBUILD_MYSQL=ON \ -DBUILD_MYSQL=ON \
-DBUILD_LUA_CAIRO=ON \ -DBUILD_LUA_CAIRO=ON \
-DBUILD_LUA_IMLIB2=ON \ -DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_RSVG=ON \ -DBUILD_LUA_RSVG=ON \
-DBUILD_AUDACIOUS=ON \ -DBUILD_AUDACIOUS=ON \
-DBUILD_XMMS2=ON \ -DBUILD_XMMS2=ON \
-DBUILD_ICAL=ON \ -DBUILD_ICAL=ON \
-DBUILD_IRC=ON \ -DBUILD_IRC=ON \
-DBUILD_HTTP=ON \ -DBUILD_HTTP=ON \
-DBUILD_ICONV=ON \ -DBUILD_ICONV=ON \
-DBUILD_PULSEAUDIO=ON \ -DBUILD_PULSEAUDIO=ON \
-DBUILD_JOURNAL=ON \ -DBUILD_JOURNAL=ON \
-DBUILD_RSS=ON \ -DBUILD_RSS=ON \
-DBUILD_IRC=ON \ -DBUILD_IRC=ON \
.. ..
cd .. cd ..
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir build && cd build mkdir build && cd build
cmake \ cmake \
-DMAINTAINER_MODE=ON \ -DMAINTAINER_MODE=ON \
-DBUILD_LUA_RSVG=ON \ -DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_IMLIB2=ON \ -DBUILD_LUA_IMLIB2=ON \
.. ..
cd .. cd ..
mkdir build-no-x11 mkdir build-no-x11
cd build-no-x11 cd build-no-x11
cmake \ cmake \
-DMAINTAINER_MODE=ON \ -DMAINTAINER_MODE=ON \
-DBUILD_X11=OFF \ -DBUILD_X11=OFF \
-DBUILD_X11=OFF \ -DBUILD_X11=OFF \
-DBUILD_LUA_RSVG=ON \ -DBUILD_LUA_RSVG=ON \
-DBUILD_LUA_IMLIB2=ON \ -DBUILD_LUA_IMLIB2=ON \
.. ..
cd .. cd ..
fi fi
script: script:
- cd build - cd build
- | - |
if [ "$CXX" = "clang++-7" ] ; then if [ "$CXX" = "clang++-7" ] ; then
build-wrapper-linux-x86-64 --out-dir bw-output make -j4 ; build-wrapper-linux-x86-64 --out-dir bw-output make -j4 ;
else else
make -j4 ; make -j4 ;
fi fi
- make test - make test
- if [ "$CXX" = "clang++-7" ] ; then make test-conky-coverage-txt ; fi - if [ "$CXX" = "clang++-7" ] ; then make test-conky-coverage-txt ; fi
- cd ../build-no-x11 - cd ../build-no-x11
- make -j4 - make -j4
- cd .. - cd ..
- if [ "$CXX" = "clang++-7" -a ! -z "$SONAR_TOKEN" ] ; then sonar-scanner ; fi - if [ "$CXX" = "clang++-7" -a ! -z "$SONAR_TOKEN" ] ; then sonar-scanner ; fi
branches: branches:
only: only:
- master - master
- "/^v\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/" - "/^v\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/"
sudo: required sudo: required
cache: cache:
- directories: - directories:
- "$HOME/.sonar/cache" - "$HOME/.sonar/cache"
before_deploy: before_deploy:
- "gpg --import appimage/secret.gpg" - "gpg --import appimage/secret.gpg"
- "./appimage/build.sh" - "./appimage/build.sh"
deploy: deploy:
provider: releases provider: releases

View File

@ -231,7 +231,16 @@ if(BUILD_MYSQL)
message(FATAL_ERROR "Unable to find mysql.h") message(FATAL_ERROR "Unable to find mysql.h")
endif(NOT mysql_INCLUDE_PATH) endif(NOT mysql_INCLUDE_PATH)
set(conky_includes ${conky_includes} ${mysql_INCLUDE_PATH}) set(conky_includes ${conky_includes} ${mysql_INCLUDE_PATH})
find_library(MYSQLCLIENT_LIB NAMES mysqlclient) find_library(MYSQLCLIENT_LIB
NAMES mysqlclient
PATHS /usr/lib
/usr/lib64
/usr/lib/mysql
/usr/lib64/mysql
/usr/local/lib
/usr/local/lib64
/usr/local/lib/mysql
/usr/local/lib64/mysql)
if(NOT MYSQLCLIENT_LIB) if(NOT MYSQLCLIENT_LIB)
message(FATAL_ERROR "Unable to find mysqlclient library") message(FATAL_ERROR "Unable to find mysqlclient library")
endif(NOT MYSQLCLIENT_LIB) endif(NOT MYSQLCLIENT_LIB)

View File

@ -5,7 +5,8 @@ set(CLANG_FORMAT_BIN_NAME
clang-format clang-format
clang-format-5.0 clang-format-5.0
clang-format-6.0 clang-format-6.0
clang-format-7) clang-format-7
clang-format-8)
find_program(CLANG_FORMAT_BIN NAMES ${CLANG_FORMAT_BIN_NAME}) find_program(CLANG_FORMAT_BIN NAMES ${CLANG_FORMAT_BIN_NAME})

View File

@ -1,7 +1,12 @@
# Find Clang tidy # Find Clang tidy
# #
set(CLANG_TIDY_BIN_NAME clang-tidy clang-tidy-5.0 clang-tidy-6.0 clang-tidy-7) set(CLANG_TIDY_BIN_NAME
clang-tidy
clang-tidy-5.0
clang-tidy-6.0
clang-tidy-7
clang-tidy-8)
find_program(CLANG_TIDY_BIN NAMES ${CLANG_TIDY_BIN_NAME}) find_program(CLANG_TIDY_BIN NAMES ${CLANG_TIDY_BIN_NAME})

View File

@ -761,7 +761,11 @@ void print_github(struct text_object *obj, char *p, unsigned int p_max_size) {
curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);
if (nullptr == (curl = curl_easy_init())) { goto error; } if (nullptr == (curl = curl_easy_init())) { goto error; }
curl_easy_setopt(curl, CURLOPT_URL, github_url); curl_easy_setopt(curl, CURLOPT_URL, github_url);
#if defined(CURLOPT_ACCEPT_ENCODING)
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip"); curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip");
#else /* defined(CURLOPT_ACCEPT_ENCODING) */
curl_easy_setopt(curl, CURLOPT_ENCODING, "gzip");
#endif /* defined(CURLOPT_ACCEPT_ENCODING) */
curl_easy_setopt(curl, CURLOPT_USERAGENT, user_agent); curl_easy_setopt(curl, CURLOPT_USERAGENT, user_agent);
curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL); curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L); curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L);

View File

@ -48,7 +48,6 @@
#define AmD 0x68747541 #define AmD 0x68747541
#define InteL 0x756e6547 #define InteL 0x756e6547
#define FMT_UINT "%" PRIuMAX
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
#define TICKZ 100L #define TICKZ 100L
@ -123,7 +122,7 @@ void get_cpu_clock_speed(char *str1, unsigned int p_max_size) {
if (-1 == (nanosleep(&tc, NULL))) { return; } if (-1 == (nanosleep(&tc, NULL))) { return; }
z = rdtsc(); z = rdtsc();
snprintf(str1, p_max_size, FMT_UINT " MHz", ((z - x) / 100000U)); snprintf(str1, p_max_size, "%ju MHz", ((z - x) / 100000U));
} }
void print_freq2(struct text_object *obj, char *p, unsigned int p_max_size) { void print_freq2(struct text_object *obj, char *p, unsigned int p_max_size) {

View File

@ -0,0 +1,62 @@
FROM centos:6
RUN yum update -y -q \
&& yum -y -q install \
epel-release \
centos-release-scl \
&& yum -y -q install \
cairo-devel \
dbus-glib-devel \
docbook2X \
freetype-devel \
gcc \
git \
imlib2-devel \
lcov \
libcurl-devel \
libical-devel \
libircclient-devel \
libmicrohttpd-devel \
librsvg2-devel \
libX11-devel \
libXdamage-devel \
libXext-devel \
libXft-devel \
libXinerama-devel \
libxml2-devel \
make \
man \
mysql-devel \
ncurses-devel \
patch \
pulseaudio-libs-devel \
readline-devel \
&& 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 \
&& rm cmake-3.13.4-Linux-x86_64.sh \
&& mkdir /luabuild \
&& pushd /luabuild \
&& curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz \
&& tar zxf lua-5.3.5.tar.gz \
&& cd lua-5.3.5 \
&& make -j4 linux MYCFLAGS=-fPIC MYLDFLAGS=-fPIC \
&& make install INSTALL_TOP=/usr \
&& popd \
&& rm -rf /luabuild \
&& mkdir -p /usr/lib/pkgconfig \
&& echo $'\
V= 5.3\n\
R= 5.3.5\n\
prefix= /usr\n\
exec_prefix=${prefix}\n\
libdir= /usr/lib\n\
includedir=${prefix}/include\n\
\n\
Name: Lua\n\
Description: An Extensible Extension Language\n\
Version: ${R}\n\
Requires:\n\
Libs: -llua -lm -ldl\n\
Cflags: -I${includedir}' \
>> /usr/lib64/pkgconfig/lua.pc

View File

@ -0,0 +1,6 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/centos6-base:latest
RUN yum -y -q install \
devtoolset-7 \
&& yum clean all

View File

@ -0,0 +1,62 @@
FROM centos:7
RUN yum update -y -q \
&& yum -y -q install \
epel-release \
centos-release-scl \
&& yum -y -q install \
cairo-devel \
dbus-glib-devel \
docbook2X \
freetype-devel \
gcc \
git \
imlib2-devel \
lcov \
libcurl-devel \
libical-devel \
libircclient-devel \
libmicrohttpd-devel \
librsvg2-devel \
libX11-devel \
libXdamage-devel \
libXext-devel \
libXft-devel \
libXinerama-devel \
libxml2-devel \
make \
man \
mysql-devel \
ncurses-devel \
patch \
pulseaudio-libs-devel \
readline-devel \
&& 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 \
&& rm cmake-3.13.4-Linux-x86_64.sh \
&& mkdir /luabuild \
&& pushd /luabuild \
&& curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz \
&& tar zxf lua-5.3.5.tar.gz \
&& cd lua-5.3.5 \
&& make -j4 linux MYCFLAGS=-fPIC MYLDFLAGS=-fPIC \
&& make install INSTALL_TOP=/usr \
&& popd \
&& rm -rf /luabuild \
&& mkdir -p /usr/lib/pkgconfig \
&& echo $'\
V= 5.3\n\
R= 5.3.5\n\
prefix= /usr\n\
exec_prefix=${prefix}\n\
libdir= /usr/lib\n\
includedir=${prefix}/include\n\
\n\
Name: Lua\n\
Description: An Extensible Extension Language\n\
Version: ${R}\n\
Requires:\n\
Libs: -llua -lm -ldl\n\
Cflags: -I${includedir}' \
>> /usr/lib64/pkgconfig/lua.pc

View File

@ -0,0 +1,6 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/centos7-base:latest
RUN yum -y -q install \
llvm-toolset-7-clang \
&& yum clean all

View File

@ -0,0 +1,6 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/centos7-base:latest
RUN yum -y -q install \
devtoolset-7 \
&& yum clean all

View File

@ -0,0 +1,6 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/centos7-base:latest
RUN yum -y -q install \
devtoolset-8 \
&& yum clean all

View File

@ -0,0 +1,35 @@
FROM fedora:latest
RUN yum update -y -q \
&& yum -y -q install \
audacious-devel \
cairo-devel \
cmake \
dbus-glib-devel \
docbook2X \
freetype-devel \
git \
imlib2-devel \
lcov \
libcurl-devel \
libical-devel \
libircclient-devel \
libmicrohttpd-devel \
librsvg2-devel \
libX11-devel \
libXdamage-devel \
libXext-devel \
libXft-devel \
libXinerama-devel \
libxml2-devel \
libXNVCtrl-devel \
lua-devel \
make \
man \
mysql-devel \
ncurses-devel \
patch \
pulseaudio-libs-devel \
readline-devel \
systemd-devel \
xmms2-devel

View File

@ -0,0 +1,8 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/fedora-base:latest
RUN yum -y -q install \
clang \
libcxx-devel \
libcxxabi-devel \
&& yum clean all

View File

@ -0,0 +1,7 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/fedora-base:latest
RUN yum -qy install \
gcc \
gcc-c++ \
&& yum clean all

View File

@ -34,19 +34,3 @@ RUN apt-get update \
docbook2x \ docbook2x \
man \ man \
less less
RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
&& apt-key add llvm-snapshot.gpg.key \
&& add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main' \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
clang-7 \
lldb-7 \
lld-7 \
libc++-7-dev \
libc++abi-7-dev \
clang-tools-7 \
clang-format-7 \
clang-tidy-7 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@ -0,0 +1,18 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/ubuntu-base:latest
RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
&& apt-key add llvm-snapshot.gpg.key \
&& add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main' \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
clang-7 \
lldb-7 \
lld-7 \
libc++-7-dev \
libc++abi-7-dev \
clang-tools-7 \
clang-format-7 \
clang-tidy-7 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@ -0,0 +1,15 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/ubuntu-base:latest
RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
&& apt-key add llvm-snapshot.gpg.key \
&& add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main' \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
clang-8 \
lldb-8 \
lld-8 \
libc++-8-dev \
libc++abi-8-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@ -0,0 +1,11 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/ubuntu-base:latest
RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
&& apt-key add llvm-snapshot.gpg.key \
&& add-apt-repository ppa:ubuntu-toolchain-r/test \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
g++-5 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@ -0,0 +1,11 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/ubuntu-base:latest
RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
&& apt-key add llvm-snapshot.gpg.key \
&& add-apt-repository ppa:ubuntu-toolchain-r/test \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
g++-6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@ -0,0 +1,11 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/ubuntu-base:latest
RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
&& apt-key add llvm-snapshot.gpg.key \
&& add-apt-repository ppa:ubuntu-toolchain-r/test \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
g++-7 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@ -0,0 +1,11 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/ubuntu-base:latest
RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
&& apt-key add llvm-snapshot.gpg.key \
&& add-apt-repository ppa:ubuntu-toolchain-r/test \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
g++-8 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*