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

Add clang 8 to builds.

Also added new librsvg functions, and ignore deprecation warnings on new
versions of librsvg.

Disable sccache on FreeBSD.
This commit is contained in:
Brenden Matthews 2019-04-14 13:51:25 -04:00
parent 84ceeff23f
commit b8d956f884
11 changed files with 242 additions and 60 deletions

View File

@ -47,8 +47,9 @@ pull ubuntu gcc-5: *pull_images
pull ubuntu gcc-6: *pull_images pull ubuntu gcc-6: *pull_images
pull ubuntu gcc-7: *pull_images pull ubuntu gcc-7: *pull_images
pull ubuntu gcc-8: *pull_images pull ubuntu gcc-8: *pull_images
pull fedora gcc-8: *pull_images pull fedora-29 gcc-8: *pull_images
pull fedora clang-7: *pull_images pull fedora-29 clang-7: *pull_images
pull fedora-31 clang-8: *pull_images
pull centos6 gcc-7: *pull_images pull centos6 gcc-7: *pull_images
pull centos7 gcc-7: *pull_images pull centos7 gcc-7: *pull_images
pull centos7 gcc-8: *pull_images pull centos7 gcc-8: *pull_images
@ -100,10 +101,15 @@ builder ubuntu base:
variables: variables:
DOCKER_BASE_IMAGE: ubuntu:bionic DOCKER_BASE_IMAGE: ubuntu:bionic
builder fedora base: builder fedora-29 base:
<<: *docker_base_builder <<: *docker_base_builder
variables: variables:
DOCKER_BASE_IMAGE: fedora:latest DOCKER_BASE_IMAGE: fedora:29
builder fedora-31 base:
<<: *docker_base_builder
variables:
DOCKER_BASE_IMAGE: fedora:31
builder centos6 base: builder centos6 base:
<<: *docker_base_builder <<: *docker_base_builder
@ -148,8 +154,9 @@ builder ubuntu gcc-5: *docker_builder
builder ubuntu gcc-6: *docker_builder builder ubuntu gcc-6: *docker_builder
builder ubuntu gcc-7: *docker_builder builder ubuntu gcc-7: *docker_builder
builder ubuntu gcc-8: *docker_builder builder ubuntu gcc-8: *docker_builder
builder fedora gcc-8: *docker_builder builder fedora-29 gcc-8: *docker_builder
builder fedora clang-7: *docker_builder builder fedora-29 clang-7: *docker_builder
builder fedora-31 clang-8: *docker_builder
builder centos6 gcc-7: *docker_builder builder centos6 gcc-7: *docker_builder
builder centos7 gcc-7: *docker_builder builder centos7 gcc-7: *docker_builder
builder centos7 gcc-8: *docker_builder builder centos7 gcc-8: *docker_builder
@ -194,8 +201,6 @@ builder centos7 clang-5: *docker_builder
- make -j4 - make -j4
.build_variables: &build_variables .build_variables: &build_variables
CC: clang-7
CXX: clang++-7
LINKER_FLAGS: "" LINKER_FLAGS: ""
BUILD_AUDACIOUS: "ON" BUILD_AUDACIOUS: "ON"
BUILD_XMMS2: "ON" BUILD_XMMS2: "ON"
@ -258,26 +263,36 @@ ubuntu gcc-8:
CC: gcc-8 CC: gcc-8
CXX: g++-8 CXX: g++-8
fedora gcc-8: fedora-29 gcc-8:
<<: *build_stages <<: *build_stages
variables: variables:
<<: *build_variables <<: *build_variables
DISTRO: fedora DISTRO: fedora-29
COMPILER: gcc-8 COMPILER: gcc-8
CC: gcc CC: gcc
CXX: g++ CXX: g++
BUILD_AUDACIOUS: "OFF" BUILD_AUDACIOUS: "OFF"
fedora clang-7: fedora-29 clang-7:
<<: *build_stages <<: *build_stages
variables: variables:
<<: *build_variables <<: *build_variables
DISTRO: fedora DISTRO: fedora-29
COMPILER: clang-7 COMPILER: clang-7
CC: clang CC: clang
CXX: clang++ CXX: clang++
BUILD_AUDACIOUS: "OFF" BUILD_AUDACIOUS: "OFF"
fedora-31 clang-8:
<<: *build_stages
variables:
<<: *build_variables
DISTRO: fedora-31
COMPILER: clang-8
CC: clang
CXX: clang++
BUILD_AUDACIOUS: "OFF"
centos6 gcc-7: centos6 gcc-7:
<<: *build_stages <<: *build_stages
variables: variables:
@ -357,11 +372,11 @@ centos7 clang-5:
- stuck_or_timeout_failure - stuck_or_timeout_failure
- unknown_failure - unknown_failure
- api_failure - api_failure
allow_failure: true
tags: tags:
- freebsd12 - freebsd12
before_script: before_script:
- echo $GCS_STORAGE_KEY > $SCCACHE_GCS_KEY_PATH - 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. # Try up to 7 times until installation succeeds. It may be locked.
- > - >
( (
@ -403,8 +418,6 @@ centos7 clang-5:
cmake cmake
-DCMAKE_REQUIRED_INCLUDES="/usr/include;/usr/local/include" -DCMAKE_REQUIRED_INCLUDES="/usr/include;/usr/local/include"
-DCMAKE_EXE_LINKER_FLAGS=$LINKER_FLAGS -DCMAKE_EXE_LINKER_FLAGS=$LINKER_FLAGS
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DMAINTAINER_MODE=ON -DMAINTAINER_MODE=ON
-DBUILD_MYSQL=ON -DBUILD_MYSQL=ON
-DBUILD_LUA_IMLIB2=ON -DBUILD_LUA_IMLIB2=ON
@ -435,11 +448,21 @@ freebsd12 clang-7:
stage: build stage: build
variables: variables:
DISTRO: freebsd12 DISTRO: freebsd12
CC: clang CC: clang70
CXX: clang++ CXX: clang++70
COMPILER_PACKAGE: llvm70 COMPILER_PACKAGE: llvm70
<<: *freebsd_build_script <<: *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 .test_stages: &test_stages
retry: retry:
max: 2 max: 2
@ -456,13 +479,20 @@ freebsd12 clang-7:
- "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\"" - "echo \"Distro: ${DISTRO}\nCompiler: ${COMPILER}\nCC: $CC\nCXX: $CXX\""
- mkdir build - mkdir build
- cd build - cd build
- > - |
cmake if [[ "$DISTRO" == "freebsd12" ]] ; then
-DCMAKE_C_COMPILER_LAUNCHER=sccache cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DBUILD_TESTS=ON \
-DMAINTAINER_MODE=ON -DMAINTAINER_MODE=ON \
-DBUILD_TESTS=ON
.. ..
else
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DBUILD_TESTS=ON \
-DMAINTAINER_MODE=ON \
..
fi
- make -j4 - make -j4
- make -j4 test - 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-txt ; fi
@ -472,13 +502,20 @@ freebsd12 clang-7:
- if [[ "$DISTRO" == "freebsd12" ]] ; then sudo make install ; else make install ; fi - if [[ "$DISTRO" == "freebsd12" ]] ; then sudo make install ; else make install ; fi
- conky -v - conky -v
- find . -iname '*.gcda' -delete - find . -iname '*.gcda' -delete
- > - |
cmake if [[ "$DISTRO" == "freebsd12" ]] ; then
-DCMAKE_C_COMPILER_LAUNCHER=sccache cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DRELEASE=ON \
-DRELEASE=ON
.. ..
else
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DRELEASE=ON \
..
fi
- make -j4 - make -j4
- if [[ "$DISTRO" == "freebsd12" ]] ; then sudo make install ; else make install ; fi - if [[ "$DISTRO" == "freebsd12" ]] ; then sudo make install ; else make install ; fi
- conky -v - conky -v
@ -542,23 +579,33 @@ test ubuntu gcc-8:
CC: gcc-8 CC: gcc-8
CXX: g++-8 CXX: g++-8
test fedora clang-7:
test fedora-29 gcc-8:
<<: *test_stages <<: *test_stages
<<: *test_run <<: *test_run
variables: variables:
DISTRO: fedora DISTRO: fedora-29
COMPILER: gcc-8
CC: gcc
CXX: g++
test fedora-29 clang-7:
<<: *test_stages
<<: *test_run
variables:
DISTRO: fedora-29
COMPILER: clang-7 COMPILER: clang-7
CC: clang CC: clang
CXX: clang++ CXX: clang++
test fedora gcc-8: test fedora-31 clang-8:
<<: *test_stages <<: *test_stages
<<: *test_run <<: *test_run
variables: variables:
DISTRO: fedora DISTRO: fedora-31
COMPILER: gcc-8 COMPILER: clang-8
CC: gcc CC: clang
CXX: g++ CXX: clang++
test centos6 gcc-7: test centos6 gcc-7:
<<: *test_stages <<: *test_stages
@ -615,8 +662,18 @@ test freebsd12 clang-7:
DISTRO: freebsd12 DISTRO: freebsd12
COMPILER: clang-7 COMPILER: clang-7
COMPILER_PACKAGE: llvm70 COMPILER_PACKAGE: llvm70
CC: clang CC: clang70
CXX: clang++ 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: test freebsd12 gcc-8:
<<: *freebsd_deps <<: *freebsd_deps
@ -631,10 +688,10 @@ test freebsd12 gcc-8:
check clang-tidy: check clang-tidy:
<<: *test_stages <<: *test_stages
variables: variables:
COMPILER: clang-7 COMPILER: clang-8
DISTRO: ubuntu DISTRO: ubuntu
CC: clang-7 CC: clang-8
CXX: clang++-7 CXX: clang++-8
script: script:
- mkdir build - mkdir build
- cd build - cd build
@ -651,10 +708,10 @@ check clang-tidy:
check clang-format: check clang-format:
<<: *test_stages <<: *test_stages
variables: variables:
COMPILER: clang-7 COMPILER: clang-8
DISTRO: ubuntu DISTRO: ubuntu
CC: clang-7 CC: clang-8
CXX: clang++-7 CXX: clang++-8
script: script:
- mkdir build - mkdir build
- cd build - cd build
@ -730,6 +787,7 @@ push ubuntu gcc-7: *push_images
push ubuntu gcc-8: *push_images push ubuntu gcc-8: *push_images
push fedora gcc-8: *push_images push fedora gcc-8: *push_images
push fedora clang-7: *push_images push fedora clang-7: *push_images
push fedora clang-8: *push_images
push centos6 gcc-7: *push_images push centos6 gcc-7: *push_images
push centos7 gcc-7: *push_images push centos7 gcc-7: *push_images
push centos7 gcc-8: *push_images push centos7 gcc-8: *push_images

View File

@ -2,6 +2,50 @@
language: cpp language: cpp
matrix: matrix:
include: include:
- os: linux
dist: xenial
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
- llvm-8
- lld-8
- libc++-8-dev
- libc++abi-8-dev
- lcov
- cmake
- docbook2x
- libxdamage-dev
- libx11-dev
- libxft-dev
- libxext-dev
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.3-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
- libmysqlclient-dev
- libical-dev
- libircclient-dev
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
- libpulse-dev
- libcurl4-gnutls-dev
- audacious-dev
- libsystemd-dev
- libxnvctrl-dev
- libircclient-dev
- gawk
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- os: linux - os: linux
dist: xenial dist: xenial
addons: addons:
@ -233,6 +277,6 @@ deploy:
skip_cleanup: true skip_cleanup: true
on: on:
tags: true tags: true
condition: "$CXX = clang++-7" condition: "$CXX = clang++-8"
api_key: api_key:
secure: YGmk5e9am7gwH1pKJVwjHPheaLrSxMIIa5iDvnto9KKaj9VDgsynzPFcwfP6my78qMszdpC7IsjpukpKFBpmifAZ7OQcpEDFp1d91kXcTEM9ILgu3j3kl/gr6nIkzqJO9VAwlYO5H3t5xlD6EZa36FGg0Nlvi2cCuNG7mEyVJy0= secure: YGmk5e9am7gwH1pKJVwjHPheaLrSxMIIa5iDvnto9KKaj9VDgsynzPFcwfP6my78qMszdpC7IsjpukpKFBpmifAZ7OQcpEDFp1d91kXcTEM9ILgu3j3kl/gr6nIkzqJO9VAwlYO5H3t5xlD6EZa36FGg0Nlvi2cCuNG7mEyVJy0=

View File

@ -42,6 +42,8 @@
Author: Carl Worth <cworth@cworth.org> Author: Carl Worth <cworth@cworth.org>
*/ */
$#pragma clang diagnostic push
$#pragma clang diagnostic ignored "-Wdeprecated-declarations"
$#include <glib.h> $#include <glib.h>
$#include <librsvg/rsvg.h> $#include <librsvg/rsvg.h>
$#include "librsvg-helper.h" $#include "librsvg-helper.h"
@ -105,3 +107,27 @@ void g_object_unref(gpointer object);
RsvgHandle * rsvg_create_handle_from_file(const char *); RsvgHandle * rsvg_create_handle_from_file(const char *);
int rsvg_destroy_handle(RsvgHandle *); int rsvg_destroy_handle(RsvgHandle *);
RsvgHandle *rsvg_handle_new_with_flags (RsvgHandleFlags flags);
void rsvg_handle_set_base_gfile (RsvgHandle *handle,
GFile *base_file);
gboolean rsvg_handle_read_stream_sync (RsvgHandle *handle,
GInputStream *stream,
GCancellable *cancellable,
GError **error);
RsvgHandle *rsvg_handle_new_from_gfile_sync (GFile *file,
RsvgHandleFlags flags,
GCancellable *cancellable,
GError **error);
RsvgHandle *rsvg_handle_new_from_stream_sync (GInputStream *input_stream,
GFile *base_file,
RsvgHandleFlags flags,
GCancellable *cancellable,
GError **error);
RsvgHandle *rsvg_handle_new_from_data (const guint8 *data, gsize data_len, GError **error);
RsvgHandle *rsvg_handle_new_from_file (const gchar *filename, GError **error);

View File

@ -1,4 +1,4 @@
FROM fedora:latest FROM fedora:29
ENV SCCACHE_VER=0.2.8 ENV SCCACHE_VER=0.2.8

View File

@ -1,15 +1,15 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/fedora-base:latest FROM ${IMAGE}/builder/fedora-29-base:latest
RUN dnf -y -q install \ RUN dnf -y -q install \
llvm \ llvm \
clang \ clang \
libcxx-devel \ libcxx-devel \
libcxxabi-devel \ libcxxabi-devel \
&& dnf clean all \
&& curl -Ls https://rpm.nodesource.com/setup_11.x -o npm.sh \ && curl -Ls https://rpm.nodesource.com/setup_11.x -o npm.sh \
&& bash npm.sh \ && bash npm.sh \
&& rm npm.sh \ && rm npm.sh \
&& dnf -y -q install npm \ && dnf -y -q install npm \
&& dnf clean all \
&& npm install -g lcov-summary \ && npm install -g lcov-summary \
&& npm cache clean --force && npm cache clean --force

View File

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

View File

@ -0,0 +1,42 @@
FROM fedora:31
ENV SCCACHE_VER=0.2.8
RUN dnf update -y -q \
&& dnf -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 \
openssl-devel \
patch \
pulseaudio-libs-devel \
readline-devel \
systemd-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*

View File

@ -0,0 +1,12 @@
ARG IMAGE=registry.gitlab.com/brndnmtthws-oss/conky
FROM ${IMAGE}/builder/fedora-31-base:latest
RUN dnf -y -q install \
llvm \
clang \
libcxx-devel \
libcxxabi-devel \
npm \
&& dnf clean all \
&& npm install -g lcov-summary \
&& npm cache clean --force

View File

@ -1,7 +0,0 @@
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

@ -11,9 +11,6 @@ RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
lld-7 \ lld-7 \
libc++-7-dev \ libc++-7-dev \
libc++abi-7-dev \ libc++abi-7-dev \
clang-tools-7 \
clang-format-7 \
clang-tidy-7 \
&& apt-get clean \ && 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 \ && wget https://deb.nodesource.com/setup_11.x -O npm.sh \

View File

@ -11,5 +11,8 @@ RUN wget -q https://apt.llvm.org/llvm-snapshot.gpg.key \
lld-8 \ lld-8 \
libc++-8-dev \ libc++-8-dev \
libc++abi-8-dev \ libc++abi-8-dev \
clang-tools-8 \
clang-format-8 \
clang-tidy-8 \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*