Page MenuHomePhabricator

[CI] Split build-default into build-diff and build-master
ClosedPublic

Authored by Fabien on Jan 13 2020, 14:24.

Details

Summary

The same build-default configuration is used for 2 different purposes,
with a branch detection mechanism to select what to run.
This diff makes it 2 different configurations instead, making it easier
to follow and easier to maintain.

Apart from the split itself, there is no change in behavior and coverage
remains the same.

Test Plan
ABC_BUILD_NAME=build-diff ./contrib/teamcity/build-configurations.sh
ABC_BUILD_NAME=build-master ./contrib/teamcity/build-configurations.sh

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ci_split_build_default
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8899
Build 15773: Default Diff Build & Tests
Build 15772: arc lint + arc unit

Event Timeline

Snippet of first build failure:

[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git config core.sparseCheckout true
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git config http.sslCAInfo
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git show-ref
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git show-ref refs/tags/phabricator/diff/15399
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git log -n1 --pretty=format:%H%x20%s 5ec47eaf98ac96d6336a3392060f4efc9cfbaee8 --
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git -c credential.helper= checkout -q -f phabricator/diff/15399
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git show-ref refs/tags/phabricator/diff/15399
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] Cleaning Bitcoin ABC Staging in /home/teamcity/buildAgent/work/c4a5708f2bae7929 the file set ALL_UNTRACKED
[14:24:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git clean -f -d -x
[14:24:28] : Build preparation done
[14:24:28]E: Step 1/1: Command Line
[14:24:28] :	 [Step 1/1] Ant JUnit report watcher
[14:24:28] :		 [Ant JUnit report watcher] Watching paths:
[14:24:28] :		 [Ant JUnit report watcher] +:build/test_bitcoin.xml
[14:24:28] :		 [Ant JUnit report watcher] +:test/functional/junit_results.xml
[14:24:28] :		 [Ant JUnit report watcher] +:build/junit_results*.xml
[14:24:28] :	 [Step 1/1] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script2553569309500709762
[14:24:28] :	 [Step 1/1] in directory: /home/teamcity/buildAgent/work/c4a5708f2bae7929
[14:24:28]W:	 [Step 1/1] + : build-default
[14:24:28] :	 [Step 1/1] Running build configuration 'build-default'...
[14:24:28]W:	 [Step 1/1] + '[' -z build-default ']'
[14:24:28]W:	 [Step 1/1] + echo 'Running build configuration '\''build-default'\''...'
[14:24:28]W:	 [Step 1/1] ++ git rev-parse --show-toplevel
[14:24:28]W:	 [Step 1/1] + TOPLEVEL=/home/teamcity/buildAgent/work/c4a5708f2bae7929
[14:24:28]W:	 [Step 1/1] + export TOPLEVEL
[14:24:28]W:	 [Step 1/1] + trap print_sanitizers_log ERR
[14:24:28]W:	 [Step 1/1] +++ dirname ./contrib/teamcity/build-configurations.sh
[14:24:28]W:	 [Step 1/1] ++ cd ./contrib/teamcity
[14:24:28]W:	 [Step 1/1] ++ pwd
[14:24:28]W:	 [Step 1/1] + CI_SCRIPTS_DIR=/home/teamcity/buildAgent/work/c4a5708f2bae7929/contrib/teamcity
[14:24:28]W:	 [Step 1/1] + setup
[14:24:28]W:	 [Step 1/1] + : /home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[14:24:28]W:	 [Step 1/1] + mkdir -p /home/teamcity/buildAgent/work/c4a5708f2bae7929/build/output
[14:24:28]W:	 [Step 1/1] ++ cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[14:24:28]W:	 [Step 1/1] ++ pwd
[14:24:28]W:	 [Step 1/1] + BUILD_DIR=/home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[14:24:28]W:	 [Step 1/1] + export BUILD_DIR
[14:24:28]W:	 [Step 1/1] + TEST_RUNNER_FLAGS=--tmpdirprefix=output
[14:24:28]W:	 [Step 1/1] + cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[14:24:28]W:	 [Step 1/1] ++ nproc
[14:24:28]W:	 [Step 1/1] + THREADS=12
[14:24:28]W:	 [Step 1/1] + export THREADS
[14:24:28]W:	 [Step 1/1] + SAN_SUPP_DIR=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions
[14:24:28]W:	 [Step 1/1] + SAN_LOG_DIR=/tmp/sanitizer_logs
[14:24:28]W:	 [Step 1/1] + mkdir -p /tmp/sanitizer_logs
[14:24:28]W:	 [Step 1/1] + rm -rf '/tmp/sanitizer_logs/*'
[14:24:28]W:	 [Step 1/1] + export ASAN_OPTIONS=malloc_context_size=0:log_path=/tmp/sanitizer_logs/asan.log
[14:24:28]W:	 [Step 1/1] + ASAN_OPTIONS=malloc_context_size=0:log_path=/tmp/sanitizer_logs/asan.log
[14:24:28]W:	 [Step 1/1] + export LSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/lsan:log_path=/tmp/sanitizer_logs/lsan.log
[14:24:28]W:	 [Step 1/1] + LSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/lsan:log_path=/tmp/sanitizer_logs/lsan.log
[14:24:28]W:	 [Step 1/1] + export TSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/tsan:log_path=/tmp/sanitizer_logs/tsan.log
[14:24:28]W:	 [Step 1/1] + TSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/tsan:log_path=/tmp/sanitizer_logs/tsan.log
[14:24:28]W:	 [Step 1/1] + export UBSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:log_path=/tmp/sanitizer_logs/ubsan.log
[14:24:28]W:	 [Step 1/1] + UBSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:log_path=/tmp/sanitizer_logs/ubsan.log
[14:24:28]W:	 [Step 1/1] + case "$ABC_BUILD_NAME" in
[14:24:28]W:	 [Step 1/1] + echo 'Error: Invalid build name '\''build-default'\'''
[14:24:28]W:	 [Step 1/1] + exit 2
[14:24:28] :	 [Step 1/1] Error: Invalid build name 'build-default'
[14:24:28]W:	 [Step 1/1] Process exited with code 2
[14:24:28]E:	 [Step 1/1] Process exited with code 2 (Step: Command Line)
jasonbcox added a subscriber: jasonbcox.

This diff makes it 2 different configurations instead, making it easier to follow and easier to maintain.

I think the most important part is that in addition to easier to maintain and follow, it's easier to test locally. Although testing is part of maintenance, I think this is clearly the most important part of this change.

This revision is now accepted and ready to land.Jan 13 2020, 18:06

This diff makes it 2 different configurations instead, making it easier to follow and easier to maintain.

I think the most important part is that in addition to easier to maintain and follow, it's easier to test locally. Although testing is part of maintenance, I think this is clearly the most important part of this change.

Hah and I just realized it actually makes it possible to test build-master, using CI, on diffs before they're landed. This wasn't actually possible before, go figure.