mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
ci: Use ./ci/ on non-travis host
This commit is contained in:
parent
fa31bc35eb
commit
fa6cbdc3c9
3 changed files with 42 additions and 10 deletions
24
.cirrus.yml
24
.cirrus.yml
|
@ -27,3 +27,27 @@ task:
|
|||
- gmake check ${MAKEJOBS} VERBOSE=1
|
||||
functional_test_script:
|
||||
- ./test/functional/test_runner.py --jobs 9 --ci --extended --exclude feature_dbcrash --combinedlogslen=1000 --quiet --failfast
|
||||
task:
|
||||
name: "x86_64 Linux [GOAL: install] [bionic] [Using ./ci/ system]"
|
||||
container:
|
||||
image: ubuntu:18.04
|
||||
cpu: 8
|
||||
memory: 8G
|
||||
timeout_in: 60m
|
||||
env:
|
||||
MAKEJOBS: "-j9"
|
||||
RUN_CI_ON_HOST: "1"
|
||||
CCACHE_SIZE: "200M"
|
||||
CCACHE_DIR: "/tmp/ccache_dir"
|
||||
ccache_cache:
|
||||
folder: "/tmp/ccache_dir"
|
||||
depends_built_cache:
|
||||
folder: "/tmp/cirrus-ci-build/depends/built"
|
||||
depends_sdk_cache:
|
||||
folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
|
||||
install_script:
|
||||
- apt-get update
|
||||
- apt-get -y install git bash ccache
|
||||
- ccache --max-size=${CCACHE_SIZE}
|
||||
ci_script:
|
||||
- ./ci/test_run_all.sh
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue