fa569e1a9c
ci: Set LC_ALL=C when running in qemu-s390x (MarcoFalke)fa3d77623e
ci: Use debian to avoid apt install 404 errors (MarcoFalke)fabb946090
ci: Install needed gcc and qemu-user iff cross-compiling (MarcoFalke)faba4672b6
ci: Fix QEMU_USER_CMD parse issues (MarcoFalke)fa5d709fb2
ci: Move wrap-qemu into separate script (MarcoFalke) Pull request description: Now that the ci system no longer propagates files from the docker container back to the host, the wrap-qemu script is broken. To fix it, every statement in the script needs to be executed in the docker (with `DOCKER_EXEC`). Instead of juggling with triple escape sequences like `\\\"`, just move the script to a separate file and call it with `DOCKER_EXEC`. Also, fix a bunch of other bugs that prevent running the ci system in qemu See the `ci/README.md` on how to test. TLDR: Can be tested with (replace `arm` with `s390x` to run the s390x build): ``` FILE_ENV="./ci/test/00_setup_env_arm.sh" MAKEJOBS="-j9" ./ci/test_run_all.sh ``` ACKs for top commit: laanwj: Code review ACKfa569e1a9c
Tree-SHA512: 84ebc44a4f0261ee6c29605a6896a1833ff6c81d729e6d08dd111941f570ce73221422bd3303e1108a266ec5eab2148bd5ee1cf6bc01477d8cc9a6c5bf2b34c2
152 lines
6.3 KiB
YAML
152 lines
6.3 KiB
YAML
# 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].
|
|
# 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
|
|
os: linux
|
|
language: minimal
|
|
arch: amd64
|
|
cache:
|
|
ccache: true
|
|
directories:
|
|
- $TRAVIS_BUILD_DIR/depends/built
|
|
- $TRAVIS_BUILD_DIR/depends/sdk-sources
|
|
- $TRAVIS_BUILD_DIR/ci/scratch/.ccache
|
|
# macOS
|
|
- $HOME/Library/Caches/Homebrew
|
|
- /usr/local/Homebrew
|
|
before_cache:
|
|
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
|
|
stages:
|
|
- lint
|
|
- test
|
|
env:
|
|
global:
|
|
- CI_RETRY_EXE="travis_retry"
|
|
- CI_WAIT="while sleep 500; do echo .; done"
|
|
- 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:
|
|
- 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)
|
|
- 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)
|
|
- 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
|
|
python: '3.5' # 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: 'ARM [GOAL: install] [buster] [unit tests, functional tests]'
|
|
arch: arm64
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_arm.sh"
|
|
QEMU_USER_CMD="" # Can run the tests natively without qemu
|
|
|
|
- stage: test
|
|
name: 'S390x [GOAL: install] [buster] [unit tests, functional tests]'
|
|
arch: s390x
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_s390x.sh"
|
|
QEMU_USER_CMD="" # Can run the tests natively without qemu
|
|
|
|
- stage: test
|
|
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_win64.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] [uses qt5 dev package and some depends packages] [unsigned char]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
|
|
|
|
- stage: test
|
|
name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_native_tsan.sh"
|
|
TEST_RUNNER_EXTRA="--exclude feature_block" # Not enough memory on travis machines
|
|
|
|
- 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_native_asan.sh"
|
|
|
|
- stage: test
|
|
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, valgrind]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_native_valgrind.sh"
|
|
|
|
- stage: test
|
|
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: fuzzer,address,undefined]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh"
|
|
|
|
- stage: test
|
|
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
|
|
|
|
- stage: test
|
|
name: 'macOS 10.12 [GOAL: deploy] [no functional tests]'
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_mac.sh"
|
|
|
|
- stage: test
|
|
name: 'macOS 10.14 native [GOAL: install] [GUI] [no depends]'
|
|
os: osx
|
|
# Use the most recent version:
|
|
# Xcode 11.2.1, macOS 10.14, JDK 13.0.1, SDK 10.15
|
|
# https://docs.travis-ci.com/user/reference/osx/#macos-version
|
|
osx_image: xcode11.2
|
|
env: >-
|
|
FILE_ENV="./ci/test/00_setup_env_mac_host.sh"
|