mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
ci: Use ./ci/ on non-travis host
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
|
||||
# Add llvm-symbolizer directory to PATH. Needed to get symbolized stack traces from the sanitizers.
|
||||
PATH=$PATH:/usr/lib/llvm-6.0/bin/
|
||||
export PATH
|
||||
|
||||
@@ -6,13 +6,8 @@
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
free -m -h
|
||||
echo "Number of CPUs (nproc): $(nproc)"
|
||||
|
||||
ccache echo "Creating ccache dir if it didn't already exist"
|
||||
|
||||
${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG"
|
||||
|
||||
if [ ! -d ${DIR_QA_ASSETS} ]; then
|
||||
git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}
|
||||
fi
|
||||
@@ -29,11 +24,25 @@ if [[ $HOST = *-mingw32 ]]; then
|
||||
elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
|
||||
DOCKER_ADMIN="--cap-add SYS_PTRACE"
|
||||
fi
|
||||
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$BASE_BUILD_DIR,dst=$BASE_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $BASE_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)
|
||||
|
||||
DOCKER_EXEC () {
|
||||
docker exec $DOCKER_ID bash -c "cd $PWD && $*"
|
||||
}
|
||||
if [ -z "$RUN_CI_ON_HOST" ]; then
|
||||
echo "Creating $DOCKER_NAME_TAG container to run in"
|
||||
${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG"
|
||||
|
||||
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$BASE_BUILD_DIR,dst=$BASE_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $BASE_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)
|
||||
|
||||
DOCKER_EXEC () {
|
||||
docker exec $DOCKER_ID bash -c "cd $PWD && $*"
|
||||
}
|
||||
else
|
||||
echo "Running on host system without docker wrapper"
|
||||
DOCKER_EXEC () {
|
||||
bash -c "cd $PWD && $*"
|
||||
}
|
||||
fi
|
||||
|
||||
DOCKER_EXEC free -m -h
|
||||
DOCKER_EXEC echo "Number of CPUs \(nproc\): $(nproc)"
|
||||
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
|
||||
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES
|
||||
|
||||
Reference in New Issue
Block a user