2020-06-07 03:52:46 +02:00
# Travis caches can be manually removed if necessary. This is one of the very
2019-03-29 00:12:50 +01:00
# 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].
2019-08-16 04:12:40 +02:00
# However, the build is terminated without saving the cache if it takes over
2019-03-29 00:12:50 +01:00
# 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
2020-03-26 17:04:32 +01:00
version : ~> 1.0
2020-06-13 17:55:14 +02:00
dist : bionic
2014-08-20 19:00:00 +02:00
os : linux
2017-10-18 20:24:21 +02:00
language : minimal
2019-11-04 19:57:02 +01:00
arch : amd64
2016-05-17 23:54:41 +02:00
cache :
2018-03-05 23:23:35 +01:00
ccache : true
2016-05-17 23:54:41 +02:00
directories :
2019-06-14 16:49:00 +02:00
- $TRAVIS_BUILD_DIR/depends/built
- $TRAVIS_BUILD_DIR/depends/sdk-sources
2019-08-27 21:53:02 +02:00
- $TRAVIS_BUILD_DIR/ci/scratch/.ccache
2019-01-05 20:20:42 +01:00
- $TRAVIS_BUILD_DIR/releases/$HOST
2019-10-14 23:00:49 +02:00
before_cache :
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
2018-05-07 12:24:19 +02:00
stages :
2018-05-12 21:43:30 +02:00
- lint
2018-05-07 12:24:19 +02:00
- test
2014-08-20 19:00:00 +02:00
env :
global :
2019-08-10 18:56:46 +02:00
- CI_RETRY_EXE="travis_retry"
2019-11-08 18:55:34 +01:00
- 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."
2018-08-02 12:22:55 +02:00
before_install :
2019-08-10 18:56:46 +02:00
- set -o errexit; source ./ci/test/00_setup_env.sh
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/test/03_before_install.sh
2018-08-02 12:22:55 +02:00
install :
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/test/04_install.sh
2018-08-02 12:22:55 +02:00
before_script :
2020-06-14 16:23:57 +02:00
# 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"
2018-08-02 12:22:55 +02:00
script :
2019-03-29 00:12:50 +01:00
- export CONTINUE=1
- if [ $SECONDS -gt 1200 ]; then export CONTINUE=0; fi # Likely the depends build took very long
2020-06-14 16:23:57 +02:00
- if [ $TRAVIS_REPO_SLUG = "bitcoin/bitcoin" ]; then export CONTINUE=1; fi # continue on repos with extended build time (90 minutes)
2019-08-10 17:32:55 +02:00
- if [ $CONTINUE = "1" ]; then set -o errexit; source ./ci/test/06_script_a.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
2019-04-11 19:52:02 +02:00
- if [ $SECONDS -gt 2000 ]; then export CONTINUE=0; fi # Likely the build took very long; The tests take about 1000s, so we should abort if we have less than 50*60-1000=2000s left
2020-06-14 16:23:57 +02:00
- if [ $TRAVIS_REPO_SLUG = "bitcoin/bitcoin" ]; then export CONTINUE=1; fi # continue on repos with extended build time (90 minutes)
2019-08-10 17:32:55 +02:00
- if [ $CONTINUE = "1" ]; then set -o errexit; source ./ci/test/06_script_b.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi
2018-08-02 12:22:55 +02:00
after_script :
2018-08-03 15:39:05 +02:00
- echo $TRAVIS_COMMIT_RANGE
2018-08-02 12:22:55 +02:00
jobs :
include :
2018-12-21 19:37:46 +01:00
2018-08-03 15:39:05 +02:00
- stage : lint
2018-12-21 19:37:46 +01:00
name : 'lint'
2018-08-03 15:39:05 +02:00
env :
2020-04-10 01:59:38 +02:00
cache : pip
2018-08-03 15:39:05 +02:00
language : python
2019-02-21 00:13:43 +01:00
python : '3.5' # Oldest supported version according to doc/dependencies.md
2018-08-03 15:39:05 +02:00
install :
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/lint/04_install.sh
2018-08-03 15:39:05 +02:00
before_script :
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/lint/05_before_script.sh
2018-08-03 15:39:05 +02:00
script :
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/lint/06_script.sh
2018-12-21 19:37:46 +01:00
2018-08-02 12:22:55 +02:00
- stage : test
2019-12-17 21:22:41 +01:00
name: 'ARM [GOAL : install] [buster] [unit tests, functional tests]'
2020-03-26 17:04:32 +01:00
arch : arm64 # Can disable QEMU_USER_CMD and run the tests natively without qemu
2018-08-02 12:22:55 +02:00
env : >-
2019-08-15 22:51:31 +02:00
FILE_ENV="./ci/test/00_setup_env_arm.sh"
2020-03-26 17:04:32 +01:00
QEMU_USER_CMD=""
2018-12-21 19:37:46 +01:00
2020-02-10 12:44:35 +01:00
# s390 build was disabled temporarily because of disk space issues on the Travis VM
#
# - stage: test
# name: 'S390x [GOAL: install] [buster] [unit tests, functional tests]'
2020-03-26 17:04:32 +01:00
# arch: s390x # Can disable QEMU_USER_CMD and run the tests natively without qemu
2020-02-10 12:44:35 +01:00
# env: >-
# FILE_ENV="./ci/test/00_setup_env_s390x.sh"
2020-03-26 17:04:32 +01:00
# QEMU_USER_CMD=""
2019-11-25 13:13:11 +01:00
2018-08-02 12:22:55 +02:00
- stage : test
2019-10-02 23:10:57 +02:00
name: 'Win64 [GOAL : deploy] [unit tests, no gui, no functional tests]'
2018-08-02 12:22:55 +02:00
env : >-
2019-08-15 22:51:31 +02:00
FILE_ENV="./ci/test/00_setup_env_win64.sh"
2018-12-21 19:37:46 +01:00
2018-08-02 12:22:55 +02:00
- stage : test
2020-01-08 23:36:46 +01:00
name: '32-bit + dash [GOAL : install] [CentOS 7] [gui]'
2018-08-02 12:22:55 +02:00
env : >-
2020-01-08 23:36:46 +01:00
FILE_ENV="./ci/test/00_setup_env_i686_centos.sh"
2018-12-21 19:37:46 +01:00
2019-01-28 17:42:59 +01:00
- stage : test
2020-04-30 15:59:07 +02:00
name: 'x86_64 Linux [GOAL : install] [bionic] [C++17, previous releases, uses qt5 dev package and some depends packages] [unsigned char]'
2019-01-28 17:42:59 +01:00
env : >-
2019-11-04 19:57:02 +01:00
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
2019-01-28 17:42:59 +01:00
2018-10-20 12:31:56 +02:00
- stage : test
2020-06-04 01:40:53 +02:00
name: 'x86_64 Linux [GOAL: install] [focal] [depends, sanitizers : thread (TSan), no gui]'
2020-05-18 19:58:23 +02:00
# Not enough memory on travis machines, so feature_block is excluded for now
2018-10-20 12:31:56 +02:00
env : >-
2020-05-18 19:58:23 +02:00
TEST_RUNNER_EXTRA="--exclude feature_block"
2019-11-04 19:57:02 +01:00
FILE_ENV="./ci/test/00_setup_env_native_tsan.sh"
2018-12-21 19:37:46 +01:00
2019-01-16 17:49:01 +01:00
- stage : test
2020-03-31 01:02:01 +02:00
name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers : fuzzer,address,undefined]'
2019-01-16 17:49:01 +01:00
env : >-
2019-11-04 19:57:02 +01:00
FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh"
2019-01-16 17:49:01 +01:00
2019-07-09 20:27:39 +02:00
- stage : test
2020-06-13 15:15:00 +02:00
name: 'x86_64 Linux [GOAL : install] [focal] [multiprocess]'
2019-07-09 20:27:39 +02:00
env : >-
FILE_ENV="./ci/test/00_setup_env_native_multiprocess.sh"
2018-08-02 12:22:55 +02:00
- stage : test
2020-06-13 17:55:14 +02:00
name: 'x86_64 Linux [GOAL : install] [xenial] [no wallet]'
2018-08-02 12:22:55 +02:00
env : >-
2019-11-04 19:57:02 +01:00
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
2018-12-21 19:37:46 +01:00
2018-08-02 12:22:55 +02:00
- stage : test
2019-11-21 17:08:47 +01:00
name: 'macOS 10.12 [GOAL : deploy] [no functional tests]'
2018-08-02 12:22:55 +02:00
env : >-
2019-08-15 22:51:31 +02:00
FILE_ENV="./ci/test/00_setup_env_mac.sh"
2019-10-14 23:00:49 +02:00
- stage : test
2019-10-12 18:49:29 +02:00
name: 'macOS 10.14 native [GOAL : install] [GUI] [no depends]'
2019-10-14 23:00:49 +02:00
os : osx
# Use the most recent version:
2020-03-26 11:28:44 +01:00
# Xcode 11.3.1, macOS 10.14, SDK 10.15
2019-10-14 23:00:49 +02:00
# https://docs.travis-ci.com/user/reference/osx/#macos-version
2020-03-26 11:28:44 +01:00
osx_image : xcode11.3
2020-03-26 13:30:02 +01:00
cache :
directories :
- $TRAVIS_BUILD_DIR/ci/scratch/.ccache
- $TRAVIS_BUILD_DIR/releases/$HOST
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
2020-03-26 11:28:44 +01:00
addons :
homebrew :
packages :
- libtool
- berkeley-db4
- boost
- miniupnpc
- qt
- qrencode
- python3
- ccache
- zeromq
2019-10-14 23:00:49 +02:00
env : >-
2020-04-09 01:59:37 +02:00
DANGER_RUN_CI_ON_HOST=true
2020-03-26 13:30:02 +01:00
CI_USE_APT_INSTALL=no
2019-10-24 18:45:43 +02:00
FILE_ENV="./ci/test/00_setup_env_mac_host.sh"