-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
74 lines (74 loc) · 3.48 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
sudo: required
dist: trusty
os: linux
language: minimal
cache:
directories:
- depends/built
- depends/work
- depends/sdk-sources
- $HOME/.ccache
env:
global:
- SDK_URL=https://bitcoincore.org/depends-sources/sdks
- CCACHE_SIZE=400M
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- MAKEJOBS=-j4
- BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
- BASE_PACKAGES="zlib1g-dev zip git build-essential libtool autotools-dev automake pkg-config libevent-dev libssl-dev bsdmainutils curl libboost-all-dev libdb5.1-dev libdb5.1++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
matrix:
#- HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" OPT="NO_QT=1" CONF="--without-gui"
#- HOST=aarch64-linux-gnu PACKAGES="g++-aarch64-linux-gnu" OPT="NO_QT=1" CONF="--without-gui"
- HOST=x86_64-unknown-linux-gnu PACKAGES="" OPT="" GOAL=""
- HOST=x86_64-apple-darwin11 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev" OSX_SDK=10.11 OPT="" GOAL="deploy"
- HOST=x86_64-w64-mingw32 PACKAGES="g++-mingw-w64-x86-64 mingw-w64-x86-64-dev" OPT="" GOAL=""
- HOST=i686-w64-mingw32 PACKAGES="g++-mingw-w64-i686 mingw-w64-i686-dev" OPT="" GOAL=""
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
install:
- sudo add-apt-repository -y ppa:bitcoin/bitcoin
- sudo apt-get update
- travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $BASE_PACKAGES
- if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
before_script:
- unset CC; unset CXX
- cd $TRAVIS_BUILD_DIR
- mkdir -p depends/SDKs depends/sdk-sources
- if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz;
fi
- if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz;
fi
script:
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
- |
timeout 250000 ./build.sh
# Convert the timeout exit code to 0.
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
before_deploy:
- ./pre-deploy.sh
- JOB_PLATFORM="$(cut -d'.' -f2 <<<$TRAVIS_JOB_NUMBER)"
- CONFIG_FILE=$TRAVIS_BUILD_DIR/src/config/liberty-config.h
- VERSION_MAJOR=`sed -n 's/#define CLIENT_VERSION_MAJOR \([0-9]*$\)/\1/p' $CONFIG_FILE`
- VERSION_MINOR=`sed -n 's/#define CLIENT_VERSION_MINOR \([0-9]*$\)/\1/p' $CONFIG_FILE`
- VERSION_REVISION=`sed -n 's/#define CLIENT_VERSION_REVISION \([0-9]*$\)/\1/p' $CONFIG_FILE`
- VERSION_BUILD=`sed -n 's/#define CLIENT_VERSION_BUILD \([0-9]*$\)/\1/p' $CONFIG_FILE`
- CLIENT_VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_REVISION.$VERSION_BUILD"
- wget https://s3.amazonaws.com/liberty-assets/discord-travis-notification.sh
- chmod +x discord-travis-notification.sh
- ./discord-travis-notification.sh $TRAVIS_TEST_RESULT $WEBHOOK_URL $CLIENT_VERSION $JOB_PLATFORM
- echo CLIENT_VERSION=$CLIENT_VERSION
- echo JOB_PLATFORM=$JOB_PLATFORM
deploy:
provider: s3
access_key_id: $S3_ACCESS_KEY
secret_access_key: $S3_SECRET
bucket: $S3_BUCKET
skip_cleanup: true
local_dir: $OUTDIR/zip
upload-dir: $CLIENT_VERSION
acl: public_read
on:
all_branches: true