- set -o errexit; source .travis/test_03_before_install.sh
install:
- set -o errexit; source .travis/test_04_install.sh
before_script:
- set -o errexit; source .travis/test_05_before_script.sh
script:
- 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.sh; fi
after_script:
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT_LOG
jobs:
include:
# build depends
- <<:*builddepends
name:depends-arm-linux
env:BUILD_TARGET=arm-linux
- <<:*builddepends
name:depends-win64
env:BUILD_TARGET=win64
- <<:*builddepends
name:depends-linux32
env:BUILD_TARGET=linux32
- <<:*builddepends
name:depends-linux64
env:BUILD_TARGET=linux64
- <<:*builddepends
name:depends-linux64_nowallet
env:BUILD_TARGET=linux64_nowallet
- <<:*builddepends
name:depends-linux64_release
env:
- BUILD_TARGET=linux64_release
- DOCKER_BUILD=true
- <<:*builddepends
name:depends-mac
env:BUILD_TARGET=mac
# build source
- <<:*buildsrc
name:src-arm-linux
env:BUILD_TARGET=arm-linux
- <<:*buildsrc
name:src-win64
env:BUILD_TARGET=win64
- <<:*buildsrc
name:src-linux32
env:BUILD_TARGET=linux32
- <<:*buildsrc
name:src-linux64
env:BUILD_TARGET=linux64
- <<:*buildsrc
name:src-linux64_nowallet
env:BUILD_TARGET=linux64_nowallet
- <<:*buildsrc
name:src-linux64_release
env:
- BUILD_TARGET=linux64_release
- DOCKER_BUILD=true
- <<:*buildsrc
name:src-mac
env:BUILD_TARGET=mac
# run tests (no tests for arm-linux and mac)
- <<:*runtests
name:tests-win64
env:BUILD_TARGET=win64
- <<:*runtests
name:tests-linux32
env:BUILD_TARGET=linux32
- <<:*runtests
name:tests-linux64
env:BUILD_TARGET=linux64
- <<:*runtests
name:tests-linux64_nowallet
env:BUILD_TARGET=linux64_nowallet
- <<:*runtests
name:tests-linux64_release
env:
- BUILD_TARGET=linux64_release
- DOCKER_BUILD=true
# build docker
- <<:*builddocker
name:docker-linux64_release
env:
- BUILD_TARGET=linux64_release
- DOCKER_BUILD=true
before_cache:
# Save builder image
- docker save dash-builder-$BUILD_TARGET-$TRAVIS_JOB_NUMBER $(docker history -q dash-builder-$BUILD_TARGET-$TRAVIS_JOB_NUMBER | grep -v \<missing\>) | gzip -2 > $HOME/cache/docker/dash-builder-$BUILD_TARGET.tar.gz
install:
# Fix annoying Travis bug: a branch with a single commit has an empty TRAVIS_COMMIT_RANGE sometimes
- if [ -z "$TRAVIS_COMMIT_RANGE" ]; then export TRAVIS_COMMIT_RANGE="HEAD~..HEAD"; fi
# Keep this as it makes caching related debugging easier
- ls -lah $HOST_CACHE_DIR && ls -lah $HOST_CACHE_DIR/depends && ls -lah $HOST_CACHE_DIR/ccache && ls -lah $HOST_CACHE_DIR/docker
# Load cached builder image
- if [ -f $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz ]; then zcat $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz | docker load || true; fi
# Build docker image only for develop branch of the main repo
- if [ "$TRAVIS_REPO_SLUG" != "dashpay/dash" -o "$TRAVIS_BRANCH" != "develop" -o "$TRAVIS_PULL_REQUEST" != "false" ]; then export DOCKER_BUILD="false"; echo DOCKER_BUILD=$DOCKER_BUILD; fi
# TODO: Check keys and signed commits
#- if [ "$TRAVIS_REPO_SLUG" = "dashpay/dash" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then while read LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys; fi
#- if [ "$TRAVIS_REPO_SLUG" = "dashpay/dash" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then travis_wait 30 contrib/verify-commits/verify-commits.py; fi
TEST_RUNNER_EXTRA="--coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash