mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
4b24c3962f
97c738ff1b
[tests] Recommend f-strings for formatting, update feature_block to use them (Anthony Towns)8ae9d314e9
Bump minimum python version to 3.6 (Anthony Towns) Pull request description: Python 3.5 has reached [end-of-life](https://devguide.python.org/#status-of-python-branches) as of September 2020, and 3.6 has some moderately nice [features](https://docs.python.org/3/whatsnew/3.6.html): - `f'x = {x}'` as an alternative to `'x = {}'.format(x)` format strings (cf https://github.com/bitcoin/bitcoin/pull/13718#issuecomment-406591027) - underscore separators for large numbers, like `1_234_567` - improvements to async - improvements to typing module Note that 3.6 is not available in xenial (16.04), but is available in bionic (18.04), while focal (20.04) has 3.8. CentOS 7 and 8 have 3.6.8, Debian stable has 3.7.3, and [gentoo and arch already had 3.6 and 3.7 in 2018](https://github.com/bitcoin/bitcoin/pull/14954#issuecomment-447118707). ACKs for top commit: MarcoFalke: re-ACK97c738ff1b
Tree-SHA512: ec7fce68845edde4d61a42de12c065fd49e5217311a6fda1323206f091a0afd50f293645dffc27d420127e4e5deb864e953f1b67eff735a0dfbbedd7899a9d60
76 lines
3.2 KiB
YAML
76 lines
3.2 KiB
YAML
# Travis caches can be manually removed if necessary. This is one of the very
|
|
# few manual operations that is possible with Travis, and it can be done by a
|
|
# Bitcoin Core GitHub member via the Travis web interface [0].
|
|
#
|
|
# Travis CI uploads the cache after the script phase of the build [1].
|
|
# However, the build is terminated without saving the cache if it takes over
|
|
# 50 minutes [2]. Thus, if we spent too much time in early build stages, fail
|
|
# with an error and save the cache.
|
|
#
|
|
# [0] https://travis-ci.org/bitcoin/bitcoin/caches
|
|
# [1] https://docs.travis-ci.com/user/caching/#build-phases
|
|
# [2] https://docs.travis-ci.com/user/customizing-the-build#build-timeouts
|
|
|
|
version: ~> 1.0
|
|
|
|
dist: bionic
|
|
os: linux
|
|
language: minimal
|
|
arch: amd64
|
|
cache:
|
|
directories:
|
|
- $TRAVIS_BUILD_DIR/depends/built
|
|
- $TRAVIS_BUILD_DIR/depends/sdk-sources
|
|
- $TRAVIS_BUILD_DIR/ci/scratch/.ccache
|
|
- $TRAVIS_BUILD_DIR/releases/$HOST
|
|
stages:
|
|
- lint
|
|
- test
|
|
env:
|
|
global:
|
|
- CI_RETRY_EXE="travis_retry"
|
|
- CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. See https://docs.travis-ci.com/user/customizing-the-build#build-timeouts . Please manually re-run this job by using the travis restart button. The next run should not time out because the build cache has been saved."
|
|
before_install:
|
|
- set -o errexit; source ./ci/test/00_setup_env.sh
|
|
- set -o errexit; source ./ci/test/03_before_install.sh
|
|
install:
|
|
- set -o errexit; source ./ci/test/04_install.sh
|
|
before_script:
|
|
# Temporary workaround for https://github.com/bitcoin/bitcoin/issues/16368
|
|
- for i in {1..4}; do echo "$(sleep 500)" ; done &
|
|
- set -o errexit; source ./ci/test/05_before_script.sh &> "/dev/null"
|
|
script:
|
|
- export CONTINUE=1
|
|
- if [ $SECONDS -gt 1200 ]; then export CONTINUE=0; fi # Likely the depends build took very long
|
|
- if [ $TRAVIS_REPO_SLUG = "bitcoin/bitcoin" ]; then export CONTINUE=1; fi # continue on repos with extended build time (90 minutes)
|
|
- if [ $CONTINUE = "1" ]; then set -o errexit; source ./ci/test/06_script_a.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
|
|
- if [[ $SECONDS -gt 50*60-$EXPECTED_TESTS_DURATION_IN_SECONDS ]]; then export CONTINUE=0; fi
|
|
- if [ $TRAVIS_REPO_SLUG = "bitcoin/bitcoin" ]; then export CONTINUE=1; fi # continue on repos with extended build time (90 minutes)
|
|
- if [ $CONTINUE = "1" ]; then set -o errexit; source ./ci/test/06_script_b.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
|
|
after_script:
|
|
- echo $TRAVIS_COMMIT_RANGE
|
|
jobs:
|
|
include:
|
|
|
|
- stage: lint
|
|
name: 'lint'
|
|
env:
|
|
cache: pip
|
|
language: python
|
|
python: '3.6' # Oldest supported version according to doc/dependencies.md
|
|
install:
|
|
- set -o errexit; source ./ci/lint/04_install.sh
|
|
before_script:
|
|
- set -o errexit; source ./ci/lint/05_before_script.sh
|
|
script:
|
|
- set -o errexit; source ./ci/lint/06_script.sh
|
|
|
|
- stage: test
|
|
name: '32-bit + dash [GOAL: install] [CentOS 7] [gui]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_i686_centos.sh"
|
|
|
|
- stage: test
|
|
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
|