From 709570be6214e5d71dfde273de22eadc008ef621 Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 7 Jan 2020 09:10:12 +0100 Subject: [PATCH] CI: Test with clang. --- .drone.yml | 20 ++++++++++++++++---- README.adoc | 3 ++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index cfe0244..113101a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ trigger: - tag steps: -- name: GCC 8 on Debian buster +- name: GCC 8 / clang 7 image: debian:buster-slim pull: always environment: @@ -25,18 +25,24 @@ steps: - rm /etc/apt/apt.conf.d/docker-clean - alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get' - apt-get update -q - - apt-get install -qq build-essential cmake + - apt-get install -qq build-essential cmake clang - apt-get install -qq catch libcurl4-openssl-dev - rm -rf build && mkdir -p build && cd build - cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. - make VERBOSE=1 - make install DESTDIR=install - cd tests && ctest -V + - cd ../../ + - rm -rf build && mkdir -p build && cd build + - CXX="clang++" cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. + - make VERBOSE=1 + - make install DESTDIR=install + - cd tests && ctest -V volumes: - name: debian-package-cache path: /var/cache/apt/archives -- name: GCC 7 on Ubuntu bionic +- name: GCC 7 / clang 6 image: ubuntu:bionic pull: always environment: @@ -48,13 +54,19 @@ steps: - rm /etc/apt/apt.conf.d/docker-clean - alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get' - apt-get update -q - - apt-get install -qq build-essential cmake + - apt-get install -qq build-essential cmake clang - apt-get install -qq catch libcurl4-openssl-dev - rm -rf build && mkdir -p build && cd build - cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. - make VERBOSE=1 - make install DESTDIR=install - cd tests && ctest -V + - cd ../../ + - rm -rf build && mkdir -p build && cd build + - CXX="clang++" cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. + - make VERBOSE=1 + - make install DESTDIR=install + - cd tests && ctest -V volumes: - name: debian-package-cache path: /var/cache/apt/archives diff --git a/README.adoc b/README.adoc index f272b2c..7b40e52 100644 --- a/README.adoc +++ b/README.adoc @@ -6,6 +6,7 @@ :uri-mastodon-cpp: https://schlomp.space/tastytea/mastodon-cpp :uri-reference: https://doc.schlomp.space/{project}/ :uri-gcc: https://gcc.gnu.org/ +:uti-clang: https://clang.llvm.org/ :uri-cmake: https://cmake.org/ :uri-doxygen: http://www.doxygen.nl/ :uri-catch: https://github.com/catchorg/Catch2 @@ -39,7 +40,7 @@ Have a look at the link:{uri-reference}[reference]. ==== Dependencies * Tested OS: Linux -* C++ compiler (tested: link:{uri-gcc}[GCC] 7/8/9) +* C++ compiler (tested: link:{uri-gcc}[GCC] 7/8/9, link:{uri-lang}[clang] 6/7) * link:{uri-cmake}[CMake] (at least: 3.9) * link:{uri-curl}[curl] (tested: 7.66 / 7.58) * Optional