Fix jenkins/travis CI:

* remove clang builds from jenkins
* disable windows travis cache
* limit make parallelism
* update linux CI image
This commit is contained in:
Mike Ellery
2019-08-19 10:47:09 -07:00
parent 98c4a7a2b1
commit 7fa9b91d23
9 changed files with 115 additions and 122 deletions

View File

@@ -6,7 +6,7 @@ services:
env: env:
global: global:
- DOCKER_IMAGE="mellery451/rippled-ci-builder:2019-07-18" - DOCKER_IMAGE="mellery451/rippled-ci-builder:2019-08-19"
- CMAKE_EXTRA_ARGS="-Dwerr=ON" - CMAKE_EXTRA_ARGS="-Dwerr=ON"
- NINJA_BUILD=true - NINJA_BUILD=true
# change this if we get more VM capacity # change this if we get more VM capacity
@@ -40,90 +40,8 @@ matrix:
- name: tsan, clang-8 - name: tsan, clang-8
# there are a number of UBs caught currently that need triage # there are a number of UBs caught currently that need triage
- name: ubsan, clang-8 - name: ubsan, clang-8
# all of the windows builds are unreliable
# because the travis VMs are currently slow and unreliable
- name: windows, debug
- name: windows, release
- name: windows, visual studio, debug
# these builds are ordered approximately by
# descending build time so that the longest
# builds start first
include: include:
# windows
- &windows
os: windows
name: windows, debug
env:
# caching is pretty flakey on windows...
# put NIH in a non-cached location until
# we come up with a way to stabilize that
# cache on windows (minimize incremental changes)
- NIH_CACHE_ROOT=${TRAVIS_BUILD_DIR}/nih_c
- VCPKG_DEFAULT_TRIPLET="x64-windows-static"
- BOOST_ROOT=${CACHE_DIR}/boost_1_70_0
- MATRIX_EVAL="CC=cl.exe && CXX=cl.exe"
- >-
CMAKE_ADD="
-DBOOST_ROOT=${BOOST_ROOT}/_INSTALLED_
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=x64-windows-static"
install:
- choco upgrade cmake.install
- choco install ninja visualstudio2017-workload-vctools -y
- travis_wait 30 bin/sh/install-vcpkg.sh
- travis_wait ${MAX_TIME_MIN} Builds/containers/shared/install_boost.sh
before_script:
- export BLD_CONFIG=Debug
script:
- . ./bin/sh/setup-msvc.sh
- mkdir -p build.ms && cd build.ms
- cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} ..
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel ${NUM_PROCESSORS} --verbose
- ./rippled.exe --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
- <<: *windows
name: windows, release
before_script:
- export BLD_CONFIG=Release
- <<: *windows
name: windows, visual studio, debug
script:
- mkdir -p build.ms && cd build.ms
- cmake -G "Visual Studio 15 2017 Win64" ${CMAKE_EXTRA_ARGS} ..
- export DESTDIR=${PWD}/_installed_
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel ${NUM_PROCESSORS} --verbose --config ${BLD_CONFIG} --target install
- >-
"./_installed_/Program Files/rippled/bin/rippled.exe" --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
# asan
- compiler: clang-8
name: asan, clang-8
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- BUILD_TYPE=Release
- CMAKE_ADD="-Dsan=address"
- ASAN_OPTIONS="print_stats=true:atexit=true"
#- LSAN_OPTIONS="verbosity=1:log_threads=1"
- PARALLEL_TESTS=false
# ubsan
- compiler: clang-8
name: ubsan, clang-8
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- BUILD_TYPE=Release
- CMAKE_ADD="-Dsan=undefined"
# once we can run clean under ubsan, add halt_on_error=1 to options below
- UBSAN_OPTIONS="print_stacktrace=1:report_error_type=1"
- PARALLEL_TESTS=false
# tsan
- compiler: clang-8
name: tsan, clang-8
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- BUILD_TYPE=Release
- CMAKE_ADD="-Dsan=thread"
- TSAN_OPTIONS="history_size=3 external_symbolizer_path=/usr/bin/llvm-symbolizer verbosity=1"
- PARALLEL_TESTS=false
# coverage builds # coverage builds
- compiler: gcc-8 - compiler: gcc-8
name: coverage, gcc-8 name: coverage, gcc-8
@@ -193,6 +111,35 @@ matrix:
env: env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8" - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- BUILD_TYPE=Debug - BUILD_TYPE=Debug
# asan
- compiler: clang-8
name: asan, clang-8
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- BUILD_TYPE=Release
- CMAKE_ADD="-Dsan=address"
- ASAN_OPTIONS="print_stats=true:atexit=true"
#- LSAN_OPTIONS="verbosity=1:log_threads=1"
- PARALLEL_TESTS=false
# ubsan
- compiler: clang-8
name: ubsan, clang-8
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- BUILD_TYPE=Release
- CMAKE_ADD="-Dsan=undefined"
# once we can run clean under ubsan, add halt_on_error=1 to options below
- UBSAN_OPTIONS="print_stacktrace=1:report_error_type=1"
- PARALLEL_TESTS=false
# tsan
- compiler: clang-8
name: tsan, clang-8
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- BUILD_TYPE=Release
- CMAKE_ADD="-Dsan=thread"
- TSAN_OPTIONS="history_size=3 external_symbolizer_path=/usr/bin/llvm-symbolizer verbosity=1"
- PARALLEL_TESTS=false
# dynamic lib builds # dynamic lib builds
- compiler: gcc-8 - compiler: gcc-8
name: non-static, gcc-8 name: non-static, gcc-8
@@ -224,6 +171,16 @@ matrix:
env: env:
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" - MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
- BUILD_TYPE=Debug - BUILD_TYPE=Debug
- compiler: clang-5.0
name: clang-5
env:
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
- BUILD_TYPE=Debug
- compiler: clang-6.0
name: clang-6
env:
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
- BUILD_TYPE=Debug
- compiler: clang-7 - compiler: clang-7
name: clang-7 name: clang-7
env: env:
@@ -262,7 +219,7 @@ matrix:
script: script:
- mkdir -p build.macos && cd build.macos - mkdir -p build.macos && cd build.macos
- cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} .. - cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} ..
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel ${NUM_PROCESSORS} --verbose - travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose
- ./rippled --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS} - ./rippled --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
- <<: *macos - <<: *macos
name: xcode10, release name: xcode10, release
@@ -277,6 +234,52 @@ matrix:
- <<: *macos - <<: *macos
osx_image: xcode11 osx_image: xcode11
name: xcode11, debug name: xcode11, debug
# windows
- &windows
# caching is unreliable on windows...disable for now
cache: false
os: windows
name: windows, debug
env:
# put NIH in a non-cached location until
# we come up with a way to stabilize that
# cache on windows (minimize incremental changes)
- NIH_CACHE_ROOT=${TRAVIS_BUILD_DIR}/nih_c
- VCPKG_DEFAULT_TRIPLET="x64-windows-static"
- BOOST_ROOT=${CACHE_DIR}/boost_1_70_0
- MATRIX_EVAL="CC=cl.exe && CXX=cl.exe"
- >-
CMAKE_ADD="
-DBOOST_ROOT=${BOOST_ROOT}/_INSTALLED_
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=x64-windows-static"
install:
- choco upgrade cmake.install
- choco install ninja visualstudio2017-workload-vctools -y
- travis_wait 30 bin/sh/install-vcpkg.sh
- travis_wait ${MAX_TIME_MIN} Builds/containers/shared/install_boost.sh
before_script:
- export BLD_CONFIG=Debug
script:
- . ./bin/sh/setup-msvc.sh
- mkdir -p build.ms && cd build.ms
- cmake -G Ninja ${CMAKE_EXTRA_ARGS} -DCMAKE_BUILD_TYPE=${BLD_CONFIG} ..
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose
- ./rippled.exe --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
- <<: *windows
name: windows, release
before_script:
- export BLD_CONFIG=Release
- <<: *windows
name: windows, visual studio, debug
script:
- mkdir -p build.ms && cd build.ms
- cmake -G "Visual Studio 15 2017 Win64" ${CMAKE_EXTRA_ARGS} ..
- export DESTDIR=${PWD}/_installed_
- travis_wait ${MAX_TIME_MIN} cmake --build . --parallel --verbose --config ${BLD_CONFIG} --target install
- >-
"./_installed_/Program Files/rippled/bin/rippled.exe" --unittest --quiet --unittest-log --unittest-jobs ${NUM_PROCESSORS}
cache: cache:
timeout: 900 timeout: 900

View File

@@ -38,17 +38,17 @@ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/opt/local/openssl/lib /opt/local/openssl/b
if [ "${CI_USE}" = true ] ; then if [ "${CI_USE}" = true ] ; then
cd /tmp cd /tmp
wget https://github.com/doxygen/doxygen/archive/Release_1_8_14.tar.gz wget https://github.com/doxygen/doxygen/archive/Release_1_8_16.tar.gz
tar xf Release_1_8_14.tar.gz tar xf Release_1_8_16.tar.gz
cd doxygen-Release_1_8_14 cd doxygen-Release_1_8_16
mkdir build mkdir build
cd build cd build
cmake -G "Unix Makefiles" .. cmake -G "Unix Makefiles" ..
make -j$(nproc) make -j$(nproc)
make install make install
cd ../.. cd ../..
rm -f Release_1_8_14.tar.gz rm -f Release_1_8_16.tar.gz
rm -rf doxygen-Release_1_8_14 rm -rf doxygen-Release_1_8_16
mkdir -p /opt/plantuml mkdir -p /opt/plantuml
wget -O /opt/plantuml/plantuml.jar https://downloads.sourceforge.net/project/plantuml/plantuml.jar wget -O /opt/plantuml/plantuml.jar https://downloads.sourceforge.net/project/plantuml/plantuml.jar
@@ -62,15 +62,15 @@ if [ "${CI_USE}" = true ] ; then
rm -r lcov-1.14 lcov-1.14.tar.gz rm -r lcov-1.14 lcov-1.14.tar.gz
cd /tmp cd /tmp
wget https://github.com/ccache/ccache/releases/download/v3.7.1/ccache-3.7.1.tar.gz wget https://github.com/ccache/ccache/releases/download/v3.7.3/ccache-3.7.3.tar.gz
tar xf ccache-3.7.1.tar.gz tar xf ccache-3.7.3.tar.gz
cd ccache-3.7.1 cd ccache-3.7.3
./configure --prefix=/usr/local ./configure --prefix=/usr/local
make make
make install make install
cd .. cd ..
rm -f ccache-3.7.1.tar.gz rm -f ccache-3.7.3.tar.gz
rm -rf ccache-3.7.1 rm -rf ccache-3.7.3
pip install requests pip install requests
pip install https://github.com/codecov/codecov-python/archive/master.zip pip install https://github.com/codecov/codecov-python/archive/master.zip

View File

@@ -2,9 +2,9 @@
set -ex set -ex
cd /tmp cd /tmp
CM_INSTALLER=cmake-3.13.2-Linux-x86_64.sh CM_INSTALLER=cmake-3.15.2-Linux-x86_64.sh
CM_VER_DIR=/opt/local/cmake-3.13 CM_VER_DIR=/opt/local/cmake-3.15
wget https://cmake.org/files/v3.13/$CM_INSTALLER wget https://cmake.org/files/v3.15/$CM_INSTALLER
chmod a+x $CM_INSTALLER chmod a+x $CM_INSTALLER
mkdir -p $CM_VER_DIR mkdir -p $CM_VER_DIR
ln -s $CM_VER_DIR /opt/local/cmake ln -s $CM_VER_DIR /opt/local/cmake

View File

@@ -110,6 +110,8 @@ deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main
EOF EOF
elif [[ ${VERSION_ID} =~ ^16\. ]] ; then elif [[ ${VERSION_ID} =~ ^16\. ]] ; then
cat << EOF > /etc/apt/sources.list.d/llvm.list cat << EOF > /etc/apt/sources.list.d/llvm.list
@@ -119,6 +121,8 @@ deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main
EOF EOF
fi fi
apt-get -y update apt-get -y update

View File

@@ -61,7 +61,6 @@ endif ()
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang") # both Clang and AppleClang if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang") # both Clang and AppleClang
set (is_clang TRUE) set (is_clang TRUE)
# TODO enable this version check
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message (FATAL_ERROR "This project requires clang 5 or later") message (FATAL_ERROR "This project requires clang 5 or later")

14
Jenkinsfile vendored
View File

@@ -118,25 +118,17 @@ try {
stage ('Parallel Build') { stage ('Parallel Build') {
String[][] variants = [ String[][] variants = [
['gcc.Release' ,'-Dassert=ON' ,'MANUAL_TESTS=true' ], ['gcc.Release' ,'-Dassert=ON' ,'MANUAL_TESTS=true' ],
['gcc.Debug' ,'-Dcoverage=ON' ,'TARGET=coverage_report', 'SKIP_TESTS=true'],
['docs' ,'' ,'TARGET=docs' ], ['docs' ,'' ,'TARGET=docs' ],
['msvc.Debug' ], ['msvc.Debug' ],
['msvc.Debug' ,'' ,'NINJA_BUILD=true' ], ['msvc.Debug' ,'' ,'NINJA_BUILD=true' ],
['msvc.Debug' ,'-Dunity=OFF' ], ['msvc.Debug' ,'-Dunity=OFF' ],
['msvc.Release' ], ['msvc.Release' ],
['clang.Debug' ],
['clang.Debug' ,'-Dunity=OFF' ],
['gcc.Debug' ], ['gcc.Debug' ],
['gcc.Debug' ,'-Dunity=OFF' ], ['gcc.Debug' ,'-Dunity=OFF' ],
['clang.Release' ,'-Dassert=ON' ],
['gcc.Release' ,'-Dassert=ON' ], ['gcc.Release' ,'-Dassert=ON' ],
['gcc.Debug' ,'-Dstatic=OFF' ], ['gcc.Debug' ,'-Dstatic=OFF' ],
['gcc.Debug' ,'-Dstatic=OFF -DBUILD_SHARED_LIBS=ON' ], ['gcc.Debug' ,'-Dstatic=OFF -DBUILD_SHARED_LIBS=ON' ],
['gcc.Debug' ,'' ,'NINJA_BUILD=true' ], ['gcc.Debug' ,'' ,'NINJA_BUILD=true' ],
['clang.Debug' ,'-Dunity=OFF -Dsan=address' ,'PARALLEL_TESTS=false', 'DEBUGGER=false'],
['clang.Debug' ,'-Dunity=OFF -Dsan=undefined' ,'PARALLEL_TESTS=false'],
// TODO - tsan runs currently fail/hang
//['clang.Debug' ,'-Dunity=OFF -Dsan=thread' ,'PARALLEL_TESTS=false'],
] ]
// create a map of all builds // create a map of all builds
@@ -163,10 +155,8 @@ try {
config = 'Release' config = 'Release'
target = 'docs' target = 'docs'
} }
def cc = def cc = 'gcc'
(compiler == 'clang') ? '/opt/llvm-5.0.1/bin/clang' : 'gcc' def cxx = 'g++'
def cxx =
(compiler == 'clang') ? '/opt/llvm-5.0.1/bin/clang++' : 'g++'
def ucc = isNoUnity(cmake_extra) ? 'true' : 'false' def ucc = isNoUnity(cmake_extra) ? 'true' : 'false'
def node_type = def node_type =
(compiler == 'msvc') ? 'rippled-win' : 'rippled-dev' (compiler == 'msvc') ? 'rippled-win' : 'rippled-dev'

View File

@@ -34,7 +34,7 @@ The server software that powers the XRP Ledger is called `rippled` and is availa
## Source Code ## Source Code
[![travis-ci.org: Build Status](https://travis-ci.org/ripple/rippled.png?branch=develop)](https://travis-ci.org/ripple/rippled) [![travis-ci.org: Build Status](https://travis-ci.com/ripple/rippled.svg?branch=develop)](https://travis-ci.org/ripple/rippled)
[![codecov.io: Code Coverage](https://codecov.io/gh/ripple/rippled/branch/develop/graph/badge.svg)](https://codecov.io/gh/ripple/rippled) [![codecov.io: Code Coverage](https://codecov.io/gh/ripple/rippled/branch/develop/graph/badge.svg)](https://codecov.io/gh/ripple/rippled)
### Repository Contents ### Repository Contents

View File

@@ -58,18 +58,16 @@ fi
# dir, otherwise default to the compiler.build_type # dir, otherwise default to the compiler.build_type
# #
: "${BUILD_DIR:=${COMPNAME}.${BUILD_TYPE}}" : "${BUILD_DIR:=${COMPNAME}.${BUILD_TYPE}}"
BUILDARGS="" BUILDARGS="--target ${TARGET} --parallel"
if [[ ${NINJA_BUILD:-} == false ]]; then
BUILDARGS+=" ${JOBS}"
fi
if [[ ${VERBOSE_BUILD:-} == true ]]; then if [[ ${VERBOSE_BUILD:-} == true ]]; then
CMAKE_EXTRA_ARGS+=" -DCMAKE_VERBOSE_MAKEFILE=ON" CMAKE_EXTRA_ARGS+=" -DCMAKE_VERBOSE_MAKEFILE=ON"
BUILDARGS+=" --verbose"
# TODO: if we use a different generator, this
# option to build verbose would need to change:
if [[ ${NINJA_BUILD:-} == true ]]; then
BUILDARGS+=" -v"
else
BUILDARGS+=" verbose=1"
fi
fi fi
if [[ ${USE_CCACHE:-} == true ]]; then if [[ ${USE_CCACHE:-} == true ]]; then
echo "using ccache with basedir [${CCACHE_BASEDIR:-}]" echo "using ccache with basedir [${CCACHE_BASEDIR:-}]"
CMAKE_EXTRA_ARGS+=" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" CMAKE_EXTRA_ARGS+=" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
@@ -84,7 +82,7 @@ pushd "build/${BUILD_DIR}"
${time} cmake ../.. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${CMAKE_EXTRA_ARGS} ${time} cmake ../.. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${CMAKE_EXTRA_ARGS}
# build # build
export DESTDIR=$(pwd)/_INSTALLED_ export DESTDIR=$(pwd)/_INSTALLED_
time ${timeout_cmd} cmake --build . --target ${TARGET} --parallel -- $BUILDARGS time eval ${timeout_cmd} cmake --build . ${BUILDARGS}
if [[ ${TARGET} == "docs" ]]; then if [[ ${TARGET} == "docs" ]]; then
## mimic the standard test output for docs build ## mimic the standard test output for docs build
## to make controlling processes like jenkins happy ## to make controlling processes like jenkins happy

View File

@@ -30,7 +30,6 @@
// been invented (that would involve another several millennia of evolution). // been invented (that would involve another several millennia of evolution).
// We did not mean to shout. // We did not mean to shout.
#define HAS_STRING_VIEW 0
#ifndef HAS_STRING_VIEW #ifndef HAS_STRING_VIEW
# if __cplusplus >= 201703 # if __cplusplus >= 201703
# define HAS_STRING_VIEW 1 # define HAS_STRING_VIEW 1