Commit b8b62a14 authored by Alexey Sokolov's avatar Alexey Sokolov

Merge branch '1.7.x'

parents 413f0d30 33a6f742
......@@ -10,7 +10,8 @@ env:
# These linux-specific parameters could be moved into matrix.include items, but that's lots of repetition
sudo: required
dist: xenial
dist: bionic
arch: amd64
services:
- docker
......@@ -18,36 +19,43 @@ matrix:
fast_finish: true
include:
- os: linux
dist: bionic
dist: xenial
compiler: gcc
env: BUILD_TYPE=normal BUILD_WITH=cmake COVERAGE=gcov
env: BUILD_TYPE=normal BUILD_WITH=cmake
- os: linux
compiler: gcc
env: BUILD_TYPE=normal BUILD_WITH=autoconf COVERAGE=gcov
env: BUILD_TYPE=normal BUILD_WITH=autoconf
- os: linux
compiler: clang
env: BUILD_TYPE=asan BUILD_WITH=cmake COVERAGE=gcov
env: BUILD_TYPE=asan BUILD_WITH=cmake
- os: linux
compiler: clang
env: BUILD_TYPE=tsan BUILD_WITH=cmake COVERAGE=gcov
- os: osx
osx_image: xcode8.3 # macOS 10.12
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=cmake COVERAGE=llvm
env: BUILD_TYPE=tsan BUILD_WITH=cmake
# TODO: enable
# - os: linux
# compiler: clang
# env: BUILD_TYPE=msan BUILD_WITH=cmake
# - os: linux
# compiler: clang
# env: BUILD_TYPE=ubsan BUILD_WITH=cmake
- os: linux
compiler: gcc
env: BUILD_TYPE=normal BUILD_WITH=cmake
arch: arm64
- os: osx
osx_image: xcode9.3 # macOS 10.13
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=cmake COVERAGE=llvm
env: BUILD_TYPE=normal BUILD_WITH=cmake
- os: osx
osx_image: xcode9.3 # macOS 10.13
compiler: clang
env: BUILD_TYPE=normal BUILD_WITH=autoconf COVERAGE=llvm
env: BUILD_TYPE=normal BUILD_WITH=autoconf
- os: linux
compiler: gcc
env: BUILD_TYPE=tarball BUILD_WITH=cmake COVERAGE=gcov
env: BUILD_TYPE=tarball BUILD_WITH=cmake
- os: linux
compiler: gcc
env: BUILD_TYPE=tarball BUILD_WITH=autoconf COVERAGE=gcov
env: BUILD_TYPE=tarball BUILD_WITH=autoconf
- stage: deploy
os: linux
before_install:
......@@ -72,8 +80,6 @@ matrix:
- stage: deploy
os: linux
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
install:
- if [[ "$TRAVIS_REPO_SLUG" == "znc/znc" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then ATTEMPT_DEPLOY=yes; else ATTEMPT_DEPLOY=no; fi
- if [[ "$ATTEMPT_DEPLOY" == "yes" ]]; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; fi
......@@ -92,16 +98,16 @@ before_install:
- if [[ "$BUILD_TYPE" == "tarball" ]]; then CFGFLAGS+=" --with-gtest=$TRAVIS_BUILD_DIR/third_party/googletest/googletest --with-gmock=$TRAVIS_BUILD_DIR/third_party/googletest/googlemock --disable-swig"; fi
- if [[ "$BUILD_TYPE" == "asan" ]]; then MYCXXFLAGS+=" -fsanitize=address -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fPIE" MYLDFLAGS+=" -fsanitize=address -pie"; fi
- if [[ "$BUILD_TYPE" == "tsan" ]]; then MYCXXFLAGS+=" -fsanitize=thread -O1 -fPIE" MYLDFLAGS+=" -fsanitize=thread"; fi
- if [[ "$BUILD_TYPE" == "msan" ]]; then MYCXXFLAGS+=" -fsanitize=memory -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins" MYLDFLAGS+=" -fsanitize=memory"; fi
- if [[ "$BUILD_TYPE" == "ubsan" ]]; then MYCXXFLAGS=" -fsanitize=undefined -O1 -fPIE -fno-sanitize-recover" MYLDFLAGS="-fsanitize=undefined -pie -fno-sanitize-recover"; fi
- if [[ "$BUILD_WITH" == "cmake" ]]; then CFGSUFFIX=.sh UNITTEST=unittest INTTEST=inttest; else CFGSUFFIX= UNITTEST=test INTTEST=test2; fi
- if [[ "$COVERAGE" == "gcov" ]]; then MYCXXFLAGS+=" --coverage" MYLDFLAGS+=" --coverage"; fi
- if [[ "$COVERAGE" == "llvm" ]]; then MYCXXFLAGS+=" -fprofile-instr-generate -fcoverage-mapping" MYLDFLAGS+=" -fprofile-instr-generate"; fi
# UBSan randomly crashes clang, and very often :(
# CFGFLAGS= MYCXXFLAGS="-fsanitize=undefined -O1 -fPIE -fno-sanitize-recover" MYLDFLAGS="-fsanitize=undefined -pie -fno-sanitize-recover"
- if [[ "$CC" == "gcc" ]]; then MYCXXFLAGS+=" --coverage" MYLDFLAGS+=" --coverage"; fi
- if [[ "$CC" == "clang" ]]; then MYCXXFLAGS+=" -fprofile-instr-generate -fcoverage-mapping" MYLDFLAGS+=" -fprofile-instr-generate"; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cat /proc/cpuinfo /proc/meminfo; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then lsb_release -a; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libperl-dev tcl-dev libsasl2-dev libicu-dev swig3.0 qt5-default libboost-locale-dev python3-pip; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libperl-dev tcl-dev libsasl2-dev libicu-dev swig qtbase5-dev libboost-locale-dev python3-pip cpanminus; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_WITH" == "cmake" ]]; then sudo apt-get install -y cmake; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib); fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cpanm --notest Devel::Cover::Report::Clover; fi
......@@ -139,14 +145,13 @@ script:
after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ~/perl5/bin/cover --no-gcov --report=clover; fi
- |
if [[ "$COVERAGE" == "llvm" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then llvm-profdata() { xcrun llvm-profdata "$@"; }; llvm-cov() { xcrun llvm-cov "$@"; }; fi
llvm-profdata merge unittest.profraw -o unittest.profdata
llvm-profdata merge inttest.profraw -o inttest.profdata
llvm-cov show -show-line-counts-or-regions -instr-profile=unittest.profdata test/unittest_bin > unittest-cmake-coverage.txt
llvm-cov show -show-line-counts-or-regions -instr-profile=unittest.profdata unittest > unittest-autoconf-coverage.txt
llvm-cov show -show-line-counts-or-regions -instr-profile=inttest.profdata /usr/local/bin/znc > inttest-znc-coverage.txt
find /usr/local/lib/znc -name '*.so' -or -name '*.bundle' | while read f; do llvm-cov show -show-line-counts-or-regions -instr-profile=inttest.profdata $f > inttest-$(basename $f)-coverage.txt; done
if [[ "$TRAVIS_OS_NAME" == "osx" && "$CC" == "clang" ]]; then
xcrun llvm-profdata merge unittest.profraw -o unittest.profdata
xcrun llvm-profdata merge inttest.profraw -o inttest.profdata
xcrun llvm-cov show -show-line-counts-or-regions -instr-profile=unittest.profdata test/unittest_bin > unittest-cmake-coverage.txt
xcrun llvm-cov show -show-line-counts-or-regions -instr-profile=unittest.profdata unittest > unittest-autoconf-coverage.txt
xcrun llvm-cov show -show-line-counts-or-regions -instr-profile=inttest.profdata /usr/local/bin/znc > inttest-znc-coverage.txt
find /usr/local/lib/znc -name '*.so' -or -name '*.bundle' | while read f; do xcrun llvm-cov show -show-line-counts-or-regions -instr-profile=inttest.profdata $f > inttest-$(basename $f)-coverage.txt; done
fi
- bash <(curl -s https://codecov.io/bash)
notifications:
......
......@@ -85,7 +85,7 @@ externalproject_add(inttest_bin
# CMAKE_CXX_COMPILER is passed for the case if the main cmake was called
# with -DCMAKE_CXX_COMPILER but without -DCMAKE_TOOLCHAIN_FILE.
"-DCMAKE_TOOLCHAIN_FILE:path=${CMAKE_TOOLCHAIN_FILE}"
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
"-DCMAKE_CXX_COMPILER:string=${CMAKE_CXX_COMPILER}"
"-DGTEST_ROOT:path=${GTEST_ROOT}"
"-DGMOCK_ROOT:path=${GMOCK_ROOT}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment