From c106d430eb9651a60376a20d4a7fe9a60cd39cd8 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 5 Nov 2019 23:59:59 +0000 Subject: [PATCH 1/4] Fix my recent fix and pass the parameter correctly --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 44cb147e..a691630e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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}" From d9dbae2321bd387ca209a020cd8ec47b65a52a55 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 5 Nov 2019 22:19:21 +0000 Subject: [PATCH 2/4] Travis: remove xcode8.3, add xcode11.2 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1785f7f4..5f7aca58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,10 +33,6 @@ matrix: - os: linux compiler: clang env: BUILD_TYPE=tsan BUILD_WITH=cmake COVERAGE=no - - os: osx - osx_image: xcode8.3 # macOS 10.12 - compiler: clang - env: BUILD_TYPE=normal BUILD_WITH=cmake COVERAGE=llvm - os: osx osx_image: xcode9.3 # macOS 10.13 compiler: clang @@ -45,6 +41,10 @@ matrix: osx_image: xcode9.3 # macOS 10.13 compiler: clang env: BUILD_TYPE=normal BUILD_WITH=autoconf COVERAGE=llvm + - os: osx + osx_image: xcode11.2 # macOS 10.14 + compiler: clang + env: BUILD_TYPE=normal BUILD_WITH=cmake COVERAGE=llvm - os: linux compiler: gcc env: BUILD_TYPE=tarball BUILD_WITH=cmake COVERAGE=gcov From 9c1a7c3c997d6f775062eb9ac576ecef1af295ab Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 5 Nov 2019 23:05:36 +0000 Subject: [PATCH 3/4] Travis: update linux builds * Use bionic 18.04 instead of trusty 14.04 * Add ARM * Remove several workarounds which are not needed anymore --- .travis.yml | 57 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5f7aca58..7ac9031b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,47 +10,56 @@ env: # These linux-specific parameters could be moved into matrix.include items, but that's lots of repetition sudo: required -dist: trusty +dist: bionic +arch: amd64 services: - docker -# See https://github.com/google/sanitizers/issues/856 -group: deprecated-2017Q3 - # TODO: add Linux LLVM coverage; clang 3.5.0 on ubuntu trusty is too old. matrix: fast_finish: true include: - os: linux 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=no + env: BUILD_TYPE=asan BUILD_WITH=cmake - os: linux compiler: clang - env: BUILD_TYPE=tsan BUILD_WITH=cmake COVERAGE=no + 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: osx osx_image: xcode11.2 # macOS 10.14 compiler: clang - env: BUILD_TYPE=normal BUILD_WITH=cmake COVERAGE=llvm + env: BUILD_TYPE=normal BUILD_WITH=cmake - 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: @@ -75,8 +84,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 @@ -95,25 +102,17 @@ 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 add-apt-repository -y ppa:teward/swig3.0; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:beineri/opt-qt551-trusty; fi # default qt5.2 from trusty doesn't support QByteArray::toStdString() - - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_WITH" == "cmake" ]]; then sudo add-apt-repository -y ppa:george-edison55/cmake-3.x; 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 qt55base libboost-locale-dev; fi - # Clang 3.5 TSan is broken on Travis Ubuntu 14.04. Clang 3.8 seems to work, but only without -pie (https://github.com/google/sanitizers/issues/503) - - if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_TYPE" == "tsan" ]]; then sudo apt-get install -y clang-3.8; export CC=clang-3.8 CXX=clang++-3.8; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt55/bin/qt55-env.sh; 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 source ~/virtualenv/python3.5/bin/activate; fi # for pip3 - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PKG_CONFIG_PATH="/opt/python/3.5/lib/pkgconfig:$PKG_CONFIG_PATH" LD_LIBRARY_PATH="/opt/python/3.5/lib:$LD_LIBRARY_PATH"; 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 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export ZNC_MODPERL_COVERAGE=1; fi @@ -150,7 +149,7 @@ script: after_success: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ~/perl5/bin/cover --no-gcov --report=clover; fi - | - if [[ "$TRAVIS_OS_NAME" == "osx" && "$COVERAGE" == "llvm" ]]; then + 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 From 1de18ed4caebb6523c8c137f8840792d8f57a286 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Wed, 6 Nov 2019 01:30:06 +0000 Subject: [PATCH 4/4] Travis: remove new xcode image for now --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ac9031b..0731274f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,10 +50,6 @@ matrix: osx_image: xcode9.3 # macOS 10.13 compiler: clang env: BUILD_TYPE=normal BUILD_WITH=autoconf - - os: osx - osx_image: xcode11.2 # macOS 10.14 - compiler: clang - env: BUILD_TYPE=normal BUILD_WITH=cmake - os: linux compiler: gcc env: BUILD_TYPE=tarball BUILD_WITH=cmake