From acf45e7a8e98581ac6407e92940f0281d3c05997 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 15 Oct 2018 00:57:01 +0200 Subject: [PATCH] CI: added clang tests --- .drone.yml | 100 +++++++++++++++++++++++++++++++++++++++++++++++------ README.md | 2 +- 2 files changed, 90 insertions(+), 12 deletions(-) diff --git a/.drone.yml b/.drone.yml index 22b3997..f6d680f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,4 +1,36 @@ pipeline: + gcc7: + image: debian:stretch-slim + pull: true + environment: + - LANG=C.utf8 + commands: + - rm /etc/apt/apt.conf.d/docker-clean + - apt-get update -q + - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release + - echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main" >> /etc/apt/sources.list.d/ubuntu-toolchain-r.list + - apt-get install -qy gnupg + - gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x60c317803a41ba51845e371a1e9377a2ba9ef27f + - gpg --armor --export 0x60c317803a41ba51845e371a1e9377a2ba9ef27f | apt-key add - + - apt-get update -q + - apt-get install -qy build-essential cmake pkg-config + - apt-get install -qy -t xenial g++-7 + - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 100 + - update-alternatives --set g++ /usr/bin/g++-7 + - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default + - apt-get install -qy rpm file + - rm -rf build && mkdir -p build && cd build + - cmake .. + - make VERBOSE=1 + - make install DESTDIR=install + - make package + - cmake -DWITH_DEB=ON .. + - make package + - cmake -DWITH_DEB=OFF -DWITH_RPM=ON .. + - make package + volumes: + - /var/cache/debian-package-cache:/var/cache/apt/archives + gcc8: image: debian:stretch-slim pull: true @@ -31,24 +63,16 @@ pipeline: volumes: - /var/cache/debian-package-cache:/var/cache/apt/archives - gcc7: + clang3: image: debian:stretch-slim pull: true environment: - LANG=C.utf8 + - CXX=clang++ commands: - rm /etc/apt/apt.conf.d/docker-clean - apt-get update -q - - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release - - echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main" >> /etc/apt/sources.list.d/ubuntu-toolchain-r.list - - apt-get install -qy gnupg - - gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x60c317803a41ba51845e371a1e9377a2ba9ef27f - - gpg --armor --export 0x60c317803a41ba51845e371a1e9377a2ba9ef27f | apt-key add - - - apt-get update -q - - apt-get install -qy build-essential cmake pkg-config - - apt-get install -qy -t xenial g++-7 - - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 100 - - update-alternatives --set g++ /usr/bin/g++-7 + - apt-get install -qy build-essential clang cmake pkg-config - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default - apt-get install -qy rpm file - rm -rf build && mkdir -p build && cd build @@ -63,6 +87,60 @@ pipeline: volumes: - /var/cache/debian-package-cache:/var/cache/apt/archives + clang5: + image: debian:stretch-slim + pull: true + environment: + - LANG=C.utf8 + - CXX=clang++-5.0 + commands: + - rm /etc/apt/apt.conf.d/docker-clean + - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release + - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/sid.list + - apt-get update -q + - apt-get install -qy build-essential cmake pkg-config + - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default + - apt-get install -qy rpm file + - apt-get install -qy -t stretch-backports clang-5.0 + - rm -rf build && mkdir -p build && cd build + - cmake .. + - make VERBOSE=1 + - make install DESTDIR=install + - make package + - cmake -DWITH_DEB=ON .. + - make package + - cmake -DWITH_DEB=OFF -DWITH_RPM=ON .. + - make package + volumes: + - /var/cache/debian-package-cache:/var/cache/apt/archives + + clang6: + image: debian:stretch-slim + pull: true + environment: + - LANG=C.utf8 + - CXX=clang++-6.0 + commands: + - rm /etc/apt/apt.conf.d/docker-clean + - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release + - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/sid.list + - apt-get update -q + - apt-get install -qy build-essential cmake pkg-config + - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default + - apt-get install -qy rpm file + - apt-get install -qy -t stretch-backports clang-6.0 + - rm -rf build && mkdir -p build && cd build + - cmake .. + - make VERBOSE=1 + - make install DESTDIR=install + - make package + - cmake -DWITH_DEB=ON .. + - make package + - cmake -DWITH_DEB=OFF -DWITH_RPM=ON .. + - make package + volumes: + - /var/cache/debian-package-cache:/var/cache/apt/archives + gcc6: image: debian:stretch-slim pull: true diff --git a/README.md b/README.md index b0de4db..4a9c132 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Gentoo ebuilds are available via my #### Dependencies * C++ compiler (tested: [gcc](https://gcc.gnu.org/) 6/7/8, - [clang](https://llvm.org/) 6) + [clang](https://llvm.org/) 3/5/6) * [cmake](https://cmake.org/) (at least 3.6) * [vsqlite++](http://vsqlite.virtuosic-bytes.com/) (tested: 0.3.13) * [libxdg-basedir](http://repo.or.cz/w/libxdg-basedir.git) (tested: 1.2)