lbrycrd/.travis.yml

140 lines
5.7 KiB
YAML
Raw Normal View History

# The test build matrix (stage: test) is constructed to test a wide range of
# configurations, rather than a single pass/fail. This helps to catch build
# failures and logic errors that present on platforms other than the ones the
# author has tested.
#
# Some builders use the dependency-generator in `./depends`, rather than using
# apt-get to install build dependencies. This guarantees that the tester is
# using the same versions as Gitian, so the build results are nearly identical
# to what would be found in a final release.
#
# In order to avoid rebuilding all dependencies for each build, the binaries
# are cached and re-used when possible. Changes in the dependency-generator
# will trigger cache-invalidation and rebuilds as necessary.
#
# These 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].
2019-08-16 04:12:40 +02:00
# 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
dist: xenial
2014-08-20 19:00:00 +02:00
os: linux
language: minimal
cache:
2018-03-05 23:23:35 +01:00
ccache: true
directories:
- $TRAVIS_BUILD_DIR/depends/built
- $TRAVIS_BUILD_DIR/depends/sdk-sources
- $TRAVIS_BUILD_DIR/ci/scratch/.ccache
stages:
- lint
- test
- extended-lint
2014-08-20 19:00:00 +02:00
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. 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."
before_install:
- 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
install:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/test/04_install.sh
before_script:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/test/05_before_script.sh
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 # Whitelisted repo (90 minutes build time)
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
- 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
- if [ $TRAVIS_REPO_SLUG = "bitcoin/bitcoin" ]; then export CONTINUE=1; fi # Whitelisted repo (90 minutes build time)
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
after_script:
- echo $TRAVIS_COMMIT_RANGE
jobs:
include:
- stage: lint
name: 'lint'
env:
cache: false
language: python
2019-02-21 00:13:43 +01:00
python: '3.5' # Oldest supported version according to doc/dependencies.md
install:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/lint/04_install.sh
before_script:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/lint/05_before_script.sh
script:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/lint/06_script.sh
- stage: extended-lint
name: 'extended lint [runtime >= 60 seconds]'
env:
cache: false
language: python
python: '3.5'
install:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/extended_lint/04_install.sh
before_script:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/lint/05_before_script.sh
script:
2019-08-10 17:32:55 +02:00
- set -o errexit; source ./ci/extended_lint/06_script.sh
- stage: test
name: 'ARM [GOAL: install] [no unit or functional tests]'
env: >-
FILE_ENV="./ci/test/00_setup_env_arm.sh"
- stage: test
name: 'Win64 [GOAL: deploy] [no gui or functional tests]'
env: >-
FILE_ENV="./ci/test/00_setup_env_win64.sh"
- stage: test
name: '32-bit + dash [GOAL: install] [GUI: no BIP70]'
env: >-
FILE_ENV="./ci/test/00_setup_env_i686.sh"
- stage: test
name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]'
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_qt5.sh"
2019-01-28 17:42:59 +01:00
- stage: test
name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]'
2019-01-28 17:42:59 +01:00
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_trusty.sh"
2019-01-28 17:42:59 +01:00
2018-10-20 12:31:56 +02:00
- stage: test
name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]'
2018-10-20 12:31:56 +02:00
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_tsan.sh"
- stage: test
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_asan.sh"
2019-01-16 17:49:01 +01:00
- stage: test
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: fuzzer,address]'
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_fuzz.sh"
2019-01-16 17:49:01 +01:00
- stage: test
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_nowallet.sh"
- stage: test
name: 'macOS 10.10 [GOAL: deploy] [no functional tests]'
env: >-
FILE_ENV="./ci/test/00_setup_env_mac.sh"