Skip to content

Commit fae49f6

Browse files
MarcoFalkehebasto
andcommitted
ci: Add and document BASE_BUILD_DIR
Co-Authored-By: Hennadii Stepanov <[email protected]>
1 parent 9e8e813 commit fae49f6

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

ci/test/00_setup_env.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
88

99
# The root dir.
1010
# The ci system copies this folder.
11-
# This is where the build is done (depends and dist).
11+
# This is where the depends build is done.
1212
BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
1313
export BASE_ROOT_DIR
1414

@@ -49,8 +49,10 @@ export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache}
4949
# The depends dir.
5050
# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
5151
export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends}
52-
# Folder where the build is done (bin and lib).
52+
# Folder where the build result is put (bin and lib).
5353
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST}
54+
# Folder where the build is done (dist and out-of-tree build).
55+
export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build}
5456
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST}
5557
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
5658
export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps}

ci/test/04_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
1818
${CI_RETRY_EXE} pip3 install $PIP_PACKAGES
1919
fi
2020

21-
mkdir -p "${BASE_SCRATCH_DIR}"
21+
# Create folders that are mounted into the docker
2222
mkdir -p "${CCACHE_DIR}"
2323
mkdir -p "${PREVIOUS_RELEASES_DIR}"
2424

ci/test/06_script_a.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,18 @@ else
1717
fi
1818
END_FOLD
1919

20-
DOCKER_EXEC mkdir -p build
21-
export P_CI_DIR="$P_CI_DIR/build"
20+
DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}"
21+
export P_CI_DIR="${BASE_BUILD_DIR}"
2222

2323
BEGIN_FOLD configure
24-
DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
24+
DOCKER_EXEC "${BASE_ROOT_DIR}/configure" --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
2525
END_FOLD
2626

2727
BEGIN_FOLD distdir
28-
# Create folder on host and docker, so that `cd` works
29-
mkdir -p "bitcoin-$HOST"
3028
DOCKER_EXEC make distdir VERSION=$HOST
3129
END_FOLD
3230

33-
export P_CI_DIR="$P_CI_DIR/bitcoin-$HOST"
31+
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST"
3432

3533
BEGIN_FOLD configure
3634
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)

ci/test/06_script_b.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fi
3131

3232
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
3333
BEGIN_FOLD unit-tests-seq
34-
DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib "${BASE_ROOT_DIR}/build/bitcoin-*/src/test/test_bitcoin" --catch_system_errors=no -l test_suite
34+
DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib "${BASE_BUILD_DIR}/bitcoin-*/src/test/test_bitcoin*" --catch_system_errors=no -l test_suite
3535
END_FOLD
3636
fi
3737

0 commit comments

Comments
 (0)