diff --git a/.travis.yml b/.travis.yml index 26be8e25..9476b628 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,11 @@ language: minimal cache: ccache: true directories: - - depends/built - - depends/sdk-sources - - $HOME/.ccache + - "$HOME/.ccache" + - "$TRAVIS_BUILD_DIR/depends/built" + - "$TRAVIS_BUILD_DIR/depends/sdk-sources" + - "$TRAVIS_BUILD_DIR/ci/scratch/.ccache" + - "$TRAVIS_BUILD_DIR/releases/$HOST" git: depth: false # full clone for git subtree check, this works around issue #12388 stages: @@ -24,7 +26,7 @@ env: - CCACHE_TEMPDIR=/tmp/.ccache-temp - CCACHE_COMPRESS=1 - CCACHE_DIR=$HOME/.ccache - - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out + - BASE_OUTDIR=$TRAVIS_BUILD_DIR/releases/$HOST - SDK_URL=https://bitcoincore.org/depends-sources/sdks - WINEDEBUG=fixme-all - DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache" @@ -38,7 +40,7 @@ install: - if [[ $HOST = *-mingw32 ]]; then DOCKER_ADMIN="--cap-add SYS_ADMIN"; fi - DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG) - DOCKER_EXEC () { docker exec $DOCKER_ID bash -c "cd $PWD && $*"; } - - if [ -n "$DPKG_ADD_ARCH" ]; then DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi + - if [ -n "$DPKG_ADD_ARCH" ]; then DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"; fi - travis_retry DOCKER_EXEC apt-get update - travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES before_script: @@ -50,7 +52,7 @@ before_script: - if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS; fi script: - export TRAVIS_COMMIT_LOG=`git log --format=fuller -1` - - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST + - OUTDIR=$BASE_OUTDIR - BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib" - if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC ccache --max-size=$CCACHE_SIZE; fi - BEGIN_FOLD autogen; test -n "$CONFIG_SHELL" && DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh" || DOCKER_EXEC ./autogen.sh; END_FOLD @@ -64,6 +66,15 @@ script: - if [ "$RUN_BENCH" = "true" ]; then BEGIN_FOLD bench; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib $OUTDIR/bin/bench_bitcoin -scaling=0.001 ; END_FOLD; fi - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi - if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi + - if [ "$NAME" = "arm-linux-gnueabihf" ]; then cd $OUTDIR; pwd; tar -czf bitcore-$NAME.tar.gz -C $OUTDIR bin lib; sha256sum bitcore-$NAME.tar.gz > bitcore-$NAME.tar.gz.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "win32" ]; then cp ./src/*.exe $OUTDIR; cd $OUTDIR; pwd; zip -r bitcore-$NAME.zip ./*.exe; sha256sum bitcore-$NAME.zip > bitcore-$NAME.zip.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "win32-qt" ]; then ls; pwd; ls ./src; cp ./src/*.exe $OUTDIR; cd $OUTDIR; pwd; zip -r bitcore-$NAME.zip ./*.exe; sha256sum bitcore-$NAME.zip > bitcore-$NAME.zip.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "win64" ]; then cp ./src/*.exe $OUTDIR; cd $OUTDIR; pwd; zip -r bitcore-$NAME.zip ./*.exe; sha256sum bitcore-$NAME.zip > bitcore-$NAME.zip.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "i686-pc-linux-gnu" ]; then cd $OUTDIR; pwd; tar -czf bitcore-$NAME.tar.gz -C $OUTDIR bin lib; sha256sum bitcore-$NAME.tar.gz > bitcore-$NAME.tar.gz.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "x86_64-linux-gnu_qt5-dev" ]; then cd $OUTDIR; pwd; tar -czf bitcore-$NAME.tar.gz -C $OUTDIR bin lib; sha256sum bitcore-$NAME.tar.gz > bitcore-$NAME.tar.gz.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "x86_64-linux-gnu_qt5_with-libs" ]; then cd $OUTDIR; pwd; tar -czf bitcore-$NAME.tar.gz -C $OUTDIR bin lib; sha256sum bitcore-$NAME.tar.gz > bitcore-$NAME.tar.gz.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "x86_64-linux-gnu_no-wallet" ]; then cd $OUTDIR; pwd; tar -czf bitcore-$NAME.tar.gz -C $OUTDIR bin lib; sha256sum bitcore-$NAME.tar.gz > bitcore-$NAME.tar.gz.sha256.txt; ls $OUTDIR; fi + - if [ "$NAME" = "osx64" ]; then cp BitCore-BTX.dmg $OUTDIR/bitcore-$NAME.dmg; cd $OUTDIR; pwd; sha256sum bitcore-$NAME.dmg > bitcore-$NAME.dmg.sha256.txt; ls $OUTDIR; fi after_script: - echo $TRAVIS_COMMIT_RANGE - echo $TRAVIS_COMMIT_LOG @@ -73,6 +84,7 @@ jobs: - stage: test env: >- HOST=arm-linux-gnueabihf + NAME="arm-linux-gnueabihf" PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" @@ -81,6 +93,7 @@ jobs: - stage: test env: >- HOST=i686-w64-mingw32 + NAME="win32" DPKG_ADD_ARCH="i386" DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32" @@ -91,6 +104,7 @@ jobs: - stage: test env: >- HOST=x86_64-w64-mingw32 + NAME="win64" DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" RUN_TESTS=false @@ -100,6 +114,7 @@ jobs: - stage: test env: >- HOST=i686-pc-linux-gnu + NAME="i686-pc-linux-gnu" PACKAGES="g++-multilib python3-zmq" DEP_OPTS="NO_QT=1" RUN_TESTS=false @@ -110,6 +125,7 @@ jobs: - stage: test env: >- HOST=x86_64-unknown-linux-gnu + NAME="x86_64-linux-gnu_qt5-dev" PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" RUN_TESTS=false @@ -120,6 +136,7 @@ jobs: - stage: test env: >- HOST=x86_64-unknown-linux-gnu + NAME="x86_64-linux-gnu_qt5_with-libs" PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev" NO_DEPENDS=1 RUN_TESTS=false @@ -129,6 +146,7 @@ jobs: - stage: test env: >- HOST=x86_64-unknown-linux-gnu + NAME="x86_64-linux-gnu_no-wallet" PACKAGES="python3" DEP_OPTS="NO_WALLET=1" RUN_TESTS=false @@ -138,6 +156,7 @@ jobs: - stage: test env: >- HOST=x86_64-apple-darwin14 + NAME="osx64" PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" OSX_SDK=10.11 GOAL="all deploy" @@ -153,15 +172,21 @@ jobs: # - git fetch --unshallow - git fetch --depth=10000 script: -# - if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then test/lint/commit-script-check.sh $TRAVIS_COMMIT_RANGE; fi -# - test/lint/git-subtree-check.sh src/crypto/ctaes -# - test/lint/git-subtree-check.sh src/secp256k1 -# - test/lint/git-subtree-check.sh src/univalue -# - test/lint/git-subtree-check.sh src/leveldb - test/lint/check-doc.py - test/lint/check-rpc-mappings.py . - test/lint/lint-all.sh -# - if [ "$TRAVIS_REPO_SLUG" = "limxdev/core17base" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then -# while read LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys && -# travis_wait 50 contrib/verify-commits/verify-commits.py; -# fi +deploy: + provider: releases + api_key: + secure: "LNpQaiBHd0GsSbN+WI/5i8JTXfwiuXwJBdswDoMrIHmcaVWIIRnr/2e4JW9vXq6QwrVgAy4QjynyH0P0W4KwxjWmvvGY/SLLQN6oKUAFcaPoFlWSigfm1A4V9Dym/xFDpROEfxynwjbu6S/TjnvysMrJ23ceSCe70InyTxGamaJuPKT2ARrTIj3X8WWH9swjfmyNbomigY5N6JJysx7EDMyCz6MtevTsh21Q/d+mzbALnWb7jrv8/A69x7SNZSdPt7sR7270SCteZzw8Y0uGKGeIPMKvGiPYtDRGe8OlvouRxmLLY34g12TEJEOZcICdB8CgzQjazETAYwp1LIZYHUUSmOtcWUo0MHtmDV7aQeKefimuQUHqBJjS4B/qYc8yN0AerGe8+Lz1yszVPlXyhPAAFnMH9K6AmsaDf7ou869NsOljlwhulk7AgBbU5vifB1TkTThUxr67XyoTe+navFceddWQPZt3/K/TtDx/Ghgpffb4QGMJwbJHZHGsHwYVWwQ+Cvzcqtpv4CTG64A8AiiETA6z2lh23bKZiSwdV6HxeH6UPd+/v4oSsaPOihGo2DPg2HVG3Atl3UKlG0W3ZZWEG4oFU+L9+loB4suFgArFr1GNDUB+uojFz7Z+y4YrpQyXnNfGnfYi7/kos88V2TBJ2OIHyrCYxlOGyFnL2IY=" + file_glob: true + file: + - "$OUTDIR/*.tar.gz" + - "$OUTDIR/*.tar.gz.sha256.txt" + - "$OUTDIR/*.zip" + - "$OUTDIR/*.zip.sha256.txt" + - "$OUTDIR/*.dmg" + - "$OUTDIR/*.dmg.sha256.txt" + skip_cleanup: true + on: + tags: true