ci: Make all filesystem operations inside docker

This commit is contained in:
MarcoFalke 2019-11-09 09:16:16 -05:00
parent 8021392b82
commit fa00393bce
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
4 changed files with 10 additions and 9 deletions

View file

@ -40,7 +40,6 @@ if [ ! -d ${DIR_QA_ASSETS} ]; then
fi
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/"
export ASAN_OPTIONS="detect_stack_use_after_return=1"
export LSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/lsan"
export TSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/tsan:log_path=${BASE_BUILD_DIR}/sanitizer-output/tsan"
@ -85,6 +84,8 @@ if [ "$TRAVIS_OS_NAME" != "osx" ]; then
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
fi
DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/"
if [ "$USE_BUSY_BOX" = "true" ]; then
echo "Setup to use BusyBox utils"
DOCKER_EXEC mkdir -p $BASE_SCRATCH_DIR/bins/

View file

@ -13,13 +13,13 @@ else
DOCKER_EXEC echo \> \$HOME/.bitcoin
fi
mkdir -p depends/SDKs depends/sdk-sources
DOCKER_EXEC mkdir -p depends/SDKs depends/sdk-sources
if [ -n "$OSX_SDK" ] && [ ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
fi
if [ -n "$OSX_SDK" ] && [ -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
DOCKER_EXEC tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
fi
if [[ $HOST = *-mingw32 ]]; then
DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)

View file

@ -19,7 +19,9 @@ else
fi
END_FOLD
# Create folder on host and docker, so that `cd` works
mkdir -p build
DOCKER_EXEC mkdir -p build
# Temporarily disable errexit, because Travis macOS fails without error message
set +o errexit
@ -27,10 +29,12 @@ cd build || (echo "could not enter build directory"; exit 1)
set -o errexit
BEGIN_FOLD configure
DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
END_FOLD
BEGIN_FOLD distdir
# Create folder on host and docker, so that `cd` works
mkdir -p "bitcoin-$HOST"
DOCKER_EXEC make distdir VERSION=$HOST
END_FOLD
@ -39,7 +43,7 @@ cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
set -o errexit
BEGIN_FOLD configure
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
END_FOLD
set -o errtrace

View file

@ -48,7 +48,3 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then
DOCKER_EXEC test/fuzz/test_runner.py -l DEBUG ${DIR_FUZZ_IN}
END_FOLD
fi
set +o errexit
cd ${BASE_BUILD_DIR} || (echo "could not enter travis build dir $BASE_BUILD_DIR"; exit 1)
set -o errexit