ci: Make all filesystem operations inside docker
This commit is contained in:
parent
8021392b82
commit
fa00393bce
4 changed files with 10 additions and 9 deletions
|
@ -40,7 +40,6 @@ if [ ! -d ${DIR_QA_ASSETS} ]; then
|
||||||
fi
|
fi
|
||||||
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
|
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 ASAN_OPTIONS="detect_stack_use_after_return=1"
|
||||||
export LSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/lsan"
|
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"
|
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
|
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/"
|
||||||
|
|
||||||
if [ "$USE_BUSY_BOX" = "true" ]; then
|
if [ "$USE_BUSY_BOX" = "true" ]; then
|
||||||
echo "Setup to use BusyBox utils"
|
echo "Setup to use BusyBox utils"
|
||||||
DOCKER_EXEC mkdir -p $BASE_SCRATCH_DIR/bins/
|
DOCKER_EXEC mkdir -p $BASE_SCRATCH_DIR/bins/
|
||||||
|
|
|
@ -13,13 +13,13 @@ else
|
||||||
DOCKER_EXEC echo \> \$HOME/.bitcoin
|
DOCKER_EXEC echo \> \$HOME/.bitcoin
|
||||||
fi
|
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
|
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
|
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
|
||||||
fi
|
fi
|
||||||
if [ -n "$OSX_SDK" ] && [ -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
|
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
|
fi
|
||||||
if [[ $HOST = *-mingw32 ]]; then
|
if [[ $HOST = *-mingw32 ]]; then
|
||||||
DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)
|
DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)
|
||||||
|
|
|
@ -19,7 +19,9 @@ else
|
||||||
fi
|
fi
|
||||||
END_FOLD
|
END_FOLD
|
||||||
|
|
||||||
|
# Create folder on host and docker, so that `cd` works
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
DOCKER_EXEC mkdir -p build
|
||||||
|
|
||||||
# Temporarily disable errexit, because Travis macOS fails without error message
|
# Temporarily disable errexit, because Travis macOS fails without error message
|
||||||
set +o errexit
|
set +o errexit
|
||||||
|
@ -27,10 +29,12 @@ cd build || (echo "could not enter build directory"; exit 1)
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
BEGIN_FOLD configure
|
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
|
END_FOLD
|
||||||
|
|
||||||
BEGIN_FOLD distdir
|
BEGIN_FOLD distdir
|
||||||
|
# Create folder on host and docker, so that `cd` works
|
||||||
|
mkdir -p "bitcoin-$HOST"
|
||||||
DOCKER_EXEC make distdir VERSION=$HOST
|
DOCKER_EXEC make distdir VERSION=$HOST
|
||||||
END_FOLD
|
END_FOLD
|
||||||
|
|
||||||
|
@ -39,7 +43,7 @@ cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
BEGIN_FOLD configure
|
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
|
END_FOLD
|
||||||
|
|
||||||
set -o errtrace
|
set -o errtrace
|
||||||
|
|
|
@ -48,7 +48,3 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then
|
||||||
DOCKER_EXEC test/fuzz/test_runner.py -l DEBUG ${DIR_FUZZ_IN}
|
DOCKER_EXEC test/fuzz/test_runner.py -l DEBUG ${DIR_FUZZ_IN}
|
||||||
END_FOLD
|
END_FOLD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set +o errexit
|
|
||||||
cd ${BASE_BUILD_DIR} || (echo "could not enter travis build dir $BASE_BUILD_DIR"; exit 1)
|
|
||||||
set -o errexit
|
|
||||||
|
|
Loading…
Reference in a new issue