mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-29 03:57:16 +02:00
Merge bitcoin/bitcoin#27976: ci: Start with clean env
fa15f7e082
ci: Remove no longer applicable section (MarcoFalke)fa378bed56
ci: Start with clean env (MarcoFalke)fa8c250c2f
ci: Limit scope of some env vars (MarcoFalke) Pull request description: Starting with a clean `env` should help to avoid non-determinism, such as the one fixed in https://github.com/bitcoin/bitcoin/pull/27739#issuecomment-1564529747 ACKs for top commit: dergoegge: utACKfa15f7e082
Tree-SHA512: 716b264217557b6524dab92d5a2a8d61ecb982dff475bd0cf5a763070b4c5916cd5995e764eb5d67d9cf2428c29d5fc2f42b32941b54c7c3053123ce448171e5
This commit is contained in:
10
ci/README.md
10
ci/README.md
@@ -20,10 +20,11 @@ requires `bash`, `docker`, and `python3` to be installed. To install all require
|
|||||||
sudo apt install bash docker.io python3
|
sudo apt install bash docker.io python3
|
||||||
```
|
```
|
||||||
|
|
||||||
To run the test stage with a specific configuration,
|
It is recommended to run the ci system in a clean env. To run the test stage
|
||||||
|
with a specific configuration,
|
||||||
|
|
||||||
```
|
```
|
||||||
FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
|
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configurations
|
### Configurations
|
||||||
@@ -38,14 +39,11 @@ the system package manager to install build dependencies. This guarantees that
|
|||||||
the tester is using the same versions as the release builds, which also use
|
the tester is using the same versions as the release builds, which also use
|
||||||
`./depends`.
|
`./depends`.
|
||||||
|
|
||||||
If no `FILE_ENV` has been specified or values are left out, `00_setup_env.sh`
|
|
||||||
is used as the default configuration with fallback values.
|
|
||||||
|
|
||||||
It is also possible to force a specific configuration without modifying the
|
It is also possible to force a specific configuration without modifying the
|
||||||
file. For example,
|
file. For example,
|
||||||
|
|
||||||
```
|
```
|
||||||
MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
|
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
|
||||||
```
|
```
|
||||||
|
|
||||||
The files starting with `0n` (`n` greater than 0) are the scripts that are run
|
The files starting with `0n` (`n` greater than 0) are the scripts that are run
|
||||||
|
@@ -67,7 +67,6 @@ export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build}
|
|||||||
# The folder for previous release binaries.
|
# The folder for previous release binaries.
|
||||||
# This folder exists only on the ci guest, and on the ci host as a volume.
|
# This folder exists only on the ci guest, and on the ci host as a volume.
|
||||||
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}
|
export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}
|
||||||
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
|
||||||
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison}
|
export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison}
|
||||||
export GOAL=${GOAL:-install}
|
export GOAL=${GOAL:-install}
|
||||||
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
|
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
|
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
||||||
|
|
||||||
export CONTAINER_NAME=ci_macos_cross
|
export CONTAINER_NAME=ci_macos_cross
|
||||||
export CI_IMAGE_NAME_TAG=ubuntu:22.04
|
export CI_IMAGE_NAME_TAG=ubuntu:22.04
|
||||||
export HOST=x86_64-apple-darwin
|
export HOST=x86_64-apple-darwin
|
||||||
|
@@ -6,11 +6,6 @@
|
|||||||
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
|
|
||||||
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
|
|
||||||
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan"
|
|
||||||
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
|
|
||||||
|
|
||||||
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
||||||
# Export all env vars to avoid missing some.
|
# Export all env vars to avoid missing some.
|
||||||
# Though, exclude those with newlines to avoid parsing problems.
|
# Though, exclude those with newlines to avoid parsing problems.
|
||||||
|
@@ -8,6 +8,11 @@ export LC_ALL=C.UTF-8
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
|
||||||
|
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
|
||||||
|
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan"
|
||||||
|
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
|
||||||
|
|
||||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||||
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
|
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
|
||||||
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
|
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
|
||||||
|
Reference in New Issue
Block a user