Skip to content

Commit 23712f8

Browse files
author
MarcoFalke
committed
Merge #15693: travis: Switch to ubuntu keyserver to avoid timeouts
fa2056a travis: Properly cache and error on timeout (MarcoFalke) fa36a33 travis: Switch to ubuntu keyserver to avoid timeouts (MarcoFalke) Pull request description: The other keyserver is consistently timing out on travis: https://travis-ci.org/bitcoin/bitcoin/jobs/512689710#L405 Attempt to fix it by using a different server. Also: * fixes #15372 * fixes #15738 ACKs for commit fa2056: ryanofsky: utACK fa2056a. All good changes (changing keyserver, getting rid of keyserver while loop, clarifying travis error, moving travis documentation to code comment). Tree-SHA512: ac8436616ecfee0ed579114e19f03c53ceb688fbcd95a60cffe8f15b4e569772a6ba673f353bbd789e79fe27fc5626c77fab4086768844dd51e0c6c108b52fb2
2 parents f9f6c11 + fa2056a commit 23712f8

File tree

4 files changed

+34
-46
lines changed

4 files changed

+34
-46
lines changed

.travis.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# The test build matrix (stage: test) is constructed to test a wide range of
2+
# configurations, rather than a single pass/fail. This helps to catch build
3+
# failures and logic errors that present on platforms other than the ones the
4+
# author has tested.
5+
#
6+
# Some builders use the dependency-generator in `./depends`, rather than using
7+
# apt-get to install build dependencies. This guarantees that the tester is
8+
# using the same versions as Gitian, so the build results are nearly identical
9+
# to what would be found in a final release.
10+
#
11+
# In order to avoid rebuilding all dependencies for each build, the binaries
12+
# are cached and re-used when possible. Changes in the dependency-generator
13+
# will trigger cache-invalidation and rebuilds as necessary.
14+
#
15+
# These caches can be manually removed if necessary. This is one of the very
16+
# few manual operations that is possible with Travis, and it can be done by a
17+
# Bitcoin Core GitHub member via the Travis web interface [0].
18+
#
19+
# Travis CI uploads the cache after the script phase of the build [1].
20+
# However, the build is terminated without saving the chache if it takes over
21+
# 50 minutes [2]. Thus, if we spent too much time in early build stages, fail
22+
# with an error and save the cache.
23+
#
24+
# [0] https://travis-ci.org/bitcoin/bitcoin/caches
25+
# [1] https://docs.travis-ci.com/user/caching/#build-phases
26+
# [2] https://docs.travis-ci.com/user/customizing-the-build#build-timeouts
27+
128
dist: xenial
229
os: linux
330
language: minimal
@@ -26,15 +53,19 @@ env:
2653
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
2754
- WINEDEBUG=fixme-all
2855
- DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache"
56+
- CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. Please manually re-run this job by using the travis restart button or asking a bitcoin maintainer to restart. The next run should not time out because the build cache has been saved."
2957
before_install:
3058
- set -o errexit; source .travis/test_03_before_install.sh
3159
install:
3260
- set -o errexit; source .travis/test_04_install.sh
3361
before_script:
3462
- set -o errexit; source .travis/test_05_before_script.sh
3563
script:
36-
- if [ $SECONDS -gt 1200 ]; then set +o errexit; echo "Travis early exit to cache current state"; false; else set -o errexit; source .travis/test_06_script_a.sh; fi
37-
- if [ $SECONDS -gt 1800 ]; then set +o errexit; echo "Travis early exit to cache current state"; false; else set -o errexit; source .travis/test_06_script_b.sh; fi
64+
- export CONTINUE=1
65+
- if [ $SECONDS -gt 1200 ]; then export CONTINUE=0; fi # Likely the depends build took very long
66+
- if [ $CONTINUE = "1" ]; then set -o errexit; source .travis/test_06_script_a.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
67+
- if [ $SECONDS -gt 1800 ]; then export CONTINUE=0; fi # Likely the build took very long
68+
- if [ $CONTINUE = "1" ]; then set -o errexit; source .travis/test_06_script_b.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
3869
after_script:
3970
- echo $TRAVIS_COMMIT_RANGE
4071
- echo $TRAVIS_COMMIT_LOG

.travis/lint_06_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ test/lint/lint-all.sh
2020

2121
if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
2222
git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
23-
while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
23+
travis_retry gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $(<contrib/verify-commits/trusted-keys) &&
2424
./contrib/verify-commits/verify-commits.py --clean-merge=2;
2525
fi

doc/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ The Bitcoin repo's [root README](/README.md) contains relevant information on th
5757
- [Source Code Documentation (External Link)](https://dev.visucore.com/bitcoin/doxygen/)
5858
- [Translation Process](translation_process.md)
5959
- [Translation Strings Policy](translation_strings_policy.md)
60-
- [Travis CI](travis-ci.md)
6160
- [JSON-RPC Interface](JSON-RPC-interface.md)
6261
- [Unauthenticated REST Interface](REST-interface.md)
6362
- [Shared Libraries](shared-libraries.md)

doc/travis-ci.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)