aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-01-06 17:15:14 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-01-06 17:15:17 +0100
commit95833c012e14a747135fde584b1040f2dc0ae605 (patch)
tree92dbbb2c8d3b75a80511990ed47833c27c5c462e /ci
parente9415075002862c684095a7679ad8ad64ae03f6f (diff)
parent0b7c55f157514e1845934fff3f9c66e862c526ca (diff)
downloadbitcoin-95833c012e14a747135fde584b1040f2dc0ae605.tar.xz
Merge bitcoin/bitcoin#23938: ci: Clone entire bitcoin-core/qa-assets repo only when run fuzzing
0b7c55f157514e1845934fff3f9c66e862c526ca ci: Clone entire bitcoin-core/qa-assets repo only when run fuzzing (Hennadii Stepanov) Pull request description: This PR speeds up CI tasks that run unit tests but do not run fuzzing. On my machine: ``` $ time git clone --depth=1 https://github.com/bitcoin-core/qa-assets Cloning into 'qa-assets'... remote: Enumerating objects: 289750, done. remote: Counting objects: 100% (289750/289750), done. remote: Compressing objects: 100% (207687/207687), done. remote: Total 289750 (delta 16863), reused 275449 (delta 12092), pack-reused 0 Receiving objects: 100% (289750/289750), 1.39 GiB | 4.79 MiB/s, done. Resolving deltas: 100% (16863/16863), done. Updating files: 100% (294515/294515), done. real7m43,417s user2m39,771s sys0m43,272s ``` ACKs for top commit: MarcoFalke: cr ACK 0b7c55f157514e1845934fff3f9c66e862c526ca Tree-SHA512: 8f8dd63e361c3d9c64a2b31f207f59beea7d2e4142363f7762ec724a61152323fda0c6b98a36386e15f2ca4ef3f7412da763baef65e862fc7f48cdeda8c40e09
Diffstat (limited to 'ci')
-rwxr-xr-xci/test/04_install.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh
index 308d216562..491a587b70 100755
--- a/ci/test/04_install.sh
+++ b/ci/test/04_install.sh
@@ -87,13 +87,17 @@ fi
DOCKER_EXEC echo "Free disk space:"
DOCKER_EXEC df -h
-if [ "$RUN_FUZZ_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
- if [ ! -d "${DIR_QA_ASSETS}" ]; then
+if [ "$RUN_FUZZ_TESTS" = "true" ]; then
+ export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
+ if [ ! -d "$DIR_FUZZ_IN" ]; then
DOCKER_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
fi
-
- export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
+elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
+ if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
+ DOCKER_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
+ DOCKER_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
+ fi
fi
DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"