-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·75 lines (75 loc) · 3.98 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
75
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=200M
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- MAKEJOBS="-j8"
- 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 libdb4.8-dev
libdb4.8++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler
libqrencode-dev"
matrix:
- HOST=x86_64-unknown-linux-gnu PACKAGES="
- 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=i686-w64-mingw32 PACKAGES="g++-mingw-w64-i686 mingw-w64-i686-dev"
- HOST=x86_64-w64-mingw32 PACKAGES="g++-mingw-w64-x86-64 mingw-w64-x86-64-dev"
- HOST=x86_64-apple-darwin11 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev" BITCOIN_CONFIG="--enable-reduce-exports" OSX_SDK=10.11 GOAL="deploy"
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" |
sed "s|::|:|g")
install:
- echo -e '<?xml version="1.0" encoding="UTF-8"?>\n<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n <mirrors>\n <mirror>\n <id>mvnsearch-unavailable</id>\n <name>mvnsearch-unavailable</name>\n <mirrorOf>mvnsearch</mirrorOf>\n <url>http://repo1.maven.org/maven2</url>\n </mirror>\n </mirrors>\n <profiles>\n <profile>\n <id>no-mvnsearch</id>\n <repositories>\n <repository>\n <id>mvnsearch</id>\n <url>http://www.mvnsearch.org/maven2</url>\n <releases>\n <enabled>true</enabled>\n </releases>\n <snapshots>\n <enabled>true</enabled>\n </snapshots>\n </repository>\n </repositories>\n </profile>\n </profiles>\n <activeProfiles>\n <activeProfile>no-mvnsearch</activeProfile>\n </activeProfiles>\n</settings>' > $HOME/.m2/settings.xml
- cat $HOME/.m2/settings.xml
- 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 3500 ./build.sh
# Convert the timeout exit code to 0.
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "trip"
- git config --local user.email "dev@tripcoin.live"
- git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
- "./pre-deploy.sh"
deploy:
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: tripwallets
skip_cleanup: true
local_dir: $TRAVIS_BUILD_DIR/out/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
upload-dir: $TRAVIS_JOB_NUMBER
acl: public_read
on:
repo: maketripcoin/trip
cache_control: "max-age=21600"
on:
all_branches: true