mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 10:45:50 +00:00
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:
171
.travis.yml
171
.travis.yml
@@ -6,7 +6,7 @@ services:
|
||||
|
||||
env:
|
||||
global:
|
||||
- DOCKER_IMAGE="mellery451/rippled-ci-builder:2019-07-18"
|
||||
- DOCKER_IMAGE="mellery451/rippled-ci-builder:2019-08-19"
|
||||
- CMAKE_EXTRA_ARGS="-Dwerr=ON"
|
||||
- NINJA_BUILD=true
|
||||
# change this if we get more VM capacity
|
||||
@@ -40,90 +40,8 @@ matrix:
|
||||
- name: tsan, clang-8
|
||||
# there are a number of UBs caught currently that need triage
|
||||
- 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:
|
||||
# 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
|
||||
- compiler: gcc-8
|
||||
name: coverage, gcc-8
|
||||
@@ -193,6 +111,35 @@ matrix:
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||
- 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
|
||||
- compiler: gcc-8
|
||||
name: non-static, gcc-8
|
||||
@@ -224,6 +171,16 @@ matrix:
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
|
||||
- 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
|
||||
name: clang-7
|
||||
env:
|
||||
@@ -262,7 +219,7 @@ matrix:
|
||||
script:
|
||||
- mkdir -p build.macos && cd build.macos
|
||||
- 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}
|
||||
- <<: *macos
|
||||
name: xcode10, release
|
||||
@@ -277,6 +234,52 @@ matrix:
|
||||
- <<: *macos
|
||||
osx_image: xcode11
|
||||
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:
|
||||
timeout: 900
|
||||
|
||||
@@ -38,17 +38,17 @@ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/opt/local/openssl/lib /opt/local/openssl/b
|
||||
|
||||
if [ "${CI_USE}" = true ] ; then
|
||||
cd /tmp
|
||||
wget https://github.com/doxygen/doxygen/archive/Release_1_8_14.tar.gz
|
||||
tar xf Release_1_8_14.tar.gz
|
||||
cd doxygen-Release_1_8_14
|
||||
wget https://github.com/doxygen/doxygen/archive/Release_1_8_16.tar.gz
|
||||
tar xf Release_1_8_16.tar.gz
|
||||
cd doxygen-Release_1_8_16
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make -j$(nproc)
|
||||
make install
|
||||
cd ../..
|
||||
rm -f Release_1_8_14.tar.gz
|
||||
rm -rf doxygen-Release_1_8_14
|
||||
rm -f Release_1_8_16.tar.gz
|
||||
rm -rf doxygen-Release_1_8_16
|
||||
|
||||
mkdir -p /opt/plantuml
|
||||
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
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/ccache/ccache/releases/download/v3.7.1/ccache-3.7.1.tar.gz
|
||||
tar xf ccache-3.7.1.tar.gz
|
||||
cd ccache-3.7.1
|
||||
wget https://github.com/ccache/ccache/releases/download/v3.7.3/ccache-3.7.3.tar.gz
|
||||
tar xf ccache-3.7.3.tar.gz
|
||||
cd ccache-3.7.3
|
||||
./configure --prefix=/usr/local
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
rm -f ccache-3.7.1.tar.gz
|
||||
rm -rf ccache-3.7.1
|
||||
rm -f ccache-3.7.3.tar.gz
|
||||
rm -rf ccache-3.7.3
|
||||
|
||||
pip install requests
|
||||
pip install https://github.com/codecov/codecov-python/archive/master.zip
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
set -ex
|
||||
|
||||
cd /tmp
|
||||
CM_INSTALLER=cmake-3.13.2-Linux-x86_64.sh
|
||||
CM_VER_DIR=/opt/local/cmake-3.13
|
||||
wget https://cmake.org/files/v3.13/$CM_INSTALLER
|
||||
CM_INSTALLER=cmake-3.15.2-Linux-x86_64.sh
|
||||
CM_VER_DIR=/opt/local/cmake-3.15
|
||||
wget https://cmake.org/files/v3.15/$CM_INSTALLER
|
||||
chmod a+x $CM_INSTALLER
|
||||
mkdir -p $CM_VER_DIR
|
||||
ln -s $CM_VER_DIR /opt/local/cmake
|
||||
|
||||
@@ -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 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
|
||||
elif [[ ${VERSION_ID} =~ ^16\. ]] ; then
|
||||
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 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
|
||||
fi
|
||||
apt-get -y update
|
||||
|
||||
@@ -61,7 +61,6 @@ endif ()
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang") # both Clang and AppleClang
|
||||
set (is_clang TRUE)
|
||||
# TODO enable this version check
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||
message (FATAL_ERROR "This project requires clang 5 or later")
|
||||
|
||||
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -118,25 +118,17 @@ try {
|
||||
stage ('Parallel Build') {
|
||||
String[][] variants = [
|
||||
['gcc.Release' ,'-Dassert=ON' ,'MANUAL_TESTS=true' ],
|
||||
['gcc.Debug' ,'-Dcoverage=ON' ,'TARGET=coverage_report', 'SKIP_TESTS=true'],
|
||||
['docs' ,'' ,'TARGET=docs' ],
|
||||
['msvc.Debug' ],
|
||||
['msvc.Debug' ,'' ,'NINJA_BUILD=true' ],
|
||||
['msvc.Debug' ,'-Dunity=OFF' ],
|
||||
['msvc.Release' ],
|
||||
['clang.Debug' ],
|
||||
['clang.Debug' ,'-Dunity=OFF' ],
|
||||
['gcc.Debug' ],
|
||||
['gcc.Debug' ,'-Dunity=OFF' ],
|
||||
['clang.Release' ,'-Dassert=ON' ],
|
||||
['gcc.Release' ,'-Dassert=ON' ],
|
||||
['gcc.Debug' ,'-Dstatic=OFF' ],
|
||||
['gcc.Debug' ,'-Dstatic=OFF -DBUILD_SHARED_LIBS=ON' ],
|
||||
['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
|
||||
@@ -163,10 +155,8 @@ try {
|
||||
config = 'Release'
|
||||
target = 'docs'
|
||||
}
|
||||
def cc =
|
||||
(compiler == 'clang') ? '/opt/llvm-5.0.1/bin/clang' : 'gcc'
|
||||
def cxx =
|
||||
(compiler == 'clang') ? '/opt/llvm-5.0.1/bin/clang++' : 'g++'
|
||||
def cc = 'gcc'
|
||||
def cxx = 'g++'
|
||||
def ucc = isNoUnity(cmake_extra) ? 'true' : 'false'
|
||||
def node_type =
|
||||
(compiler == 'msvc') ? 'rippled-win' : 'rippled-dev'
|
||||
|
||||
@@ -34,7 +34,7 @@ The server software that powers the XRP Ledger is called `rippled` and is availa
|
||||
|
||||
|
||||
## Source Code
|
||||
[](https://travis-ci.org/ripple/rippled)
|
||||
[](https://travis-ci.org/ripple/rippled)
|
||||
[](https://codecov.io/gh/ripple/rippled)
|
||||
|
||||
### Repository Contents
|
||||
|
||||
@@ -58,18 +58,16 @@ fi
|
||||
# dir, otherwise default to the compiler.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
|
||||
CMAKE_EXTRA_ARGS+=" -DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||
|
||||
# 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
|
||||
BUILDARGS+=" --verbose"
|
||||
fi
|
||||
|
||||
if [[ ${USE_CCACHE:-} == true ]]; then
|
||||
echo "using ccache with basedir [${CCACHE_BASEDIR:-}]"
|
||||
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}
|
||||
# build
|
||||
export DESTDIR=$(pwd)/_INSTALLED_
|
||||
time ${timeout_cmd} cmake --build . --target ${TARGET} --parallel -- $BUILDARGS
|
||||
time eval ${timeout_cmd} cmake --build . ${BUILDARGS}
|
||||
if [[ ${TARGET} == "docs" ]]; then
|
||||
## mimic the standard test output for docs build
|
||||
## to make controlling processes like jenkins happy
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
// been invented (that would involve another several millennia of evolution).
|
||||
// We did not mean to shout.
|
||||
|
||||
#define HAS_STRING_VIEW 0
|
||||
#ifndef HAS_STRING_VIEW
|
||||
# if __cplusplus >= 201703
|
||||
# define HAS_STRING_VIEW 1
|
||||
|
||||
Reference in New Issue
Block a user