.travis.yml 4.4 KB
Newer Older
Cory Fields's avatar
Cory Fields committed
1
2
3
# errata:
# - A travis bug causes caches to trample eachother when using the same
#   compiler key (which we don't use anyway). This is worked around for now by
Luke Dashjr's avatar
Luke Dashjr committed
4
5
#   replacing the "compilers" with a build name prefixed by the no-op ":"
#   command. See: https://github.com/travis-ci/casher/issues/6
Cory Fields's avatar
Cory Fields committed
6

TheLazieR Yip's avatar
TheLazieR Yip committed
7
8
9
sudo: false
dist: precise

Cory Fields's avatar
Cory Fields committed
10
11
os: linux
language: cpp
12
compiler: gcc
Cory Fields's avatar
Cory Fields committed
13
14
15
16
17
18
19
20
env:
  global:
    - MAKEJOBS=-j3
    - RUN_TESTS=false
    - CCACHE_SIZE=100M
    - CCACHE_TEMPDIR=/tmp/.ccache-temp
    - CCACHE_COMPRESS=1
    - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
21
    - SDK_URL=https://dash.org/depends-sources/sdks
Cory Fields's avatar
Cory Fields committed
22
23
cache:
  apt: true
TheLazieR Yip's avatar
TheLazieR Yip committed
24
  ccache: true
Cory Fields's avatar
Cory Fields committed
25
  directories:
TheLazieR Yip's avatar
TheLazieR Yip committed
26
27
    - depends/built
    - depends/sdk-sources
Cory Fields's avatar
Cory Fields committed
28
29
30
matrix:
  fast_finish: true
  include:
Luke Dashjr's avatar
Luke Dashjr committed
31
    - compiler: ": ARM"
TheLazieR Yip's avatar
TheLazieR Yip committed
32
33
34
35
36
      env: HOST=arm-linux-gnueabihf DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
      addons:
        apt:
          packages:
            - g++-arm-linux-gnueabihf
UdjinM6's avatar
UdjinM6 committed
37
    - compiler: ": dashd"
Infernoman's avatar
Infernoman committed
38
      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=false GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
TheLazieR Yip's avatar
TheLazieR Yip committed
39
40
41
42
      addons:
        apt:
          packages:
            - bc
Luke Dashjr's avatar
Luke Dashjr committed
43
    - compiler: ": 32-bit + dash"
Infernoman's avatar
Infernoman committed
44
      env: HOST=i686-pc-linux-gnu RUN_TESTS=false GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash"
TheLazieR Yip's avatar
TheLazieR Yip committed
45
46
47
48
49
      addons:
        apt:
          packages:
            - g++-multilib
            - bc
Luke Dashjr's avatar
Luke Dashjr committed
50
    - compiler: ": Cross-Mac"
TheLazieR Yip's avatar
TheLazieR Yip committed
51
52
53
54
55
56
57
58
59
      env: HOST=x86_64-apple-darwin11 OSX_SDK=10.7 GOAL="deploy"
      addons:
        apt:
          packages:
            - gcc-multilib
            - g++-multilib
            - cmake
            - libcap-dev
            - libbz2-dev
Luke Dashjr's avatar
Luke Dashjr committed
60
    - compiler: ": Win64"
Infernoman's avatar
Infernoman committed
61
      env: HOST=x86_64-w64-mingw32 RUN_TESTS=false GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2" WINE=true
TheLazieR Yip's avatar
TheLazieR Yip committed
62
63
64
65
66
67
68
69
70
71
      addons:
        apt:
          packages:
            - nsis
            - gcc-mingw-w64-x86-64
            - g++-mingw-w64-x86-64
            - binutils-mingw-w64-x86-64
            - mingw-w64-dev
            - wine
            - bc
Luke Dashjr's avatar
Luke Dashjr committed
72
    - compiler: ": Win32"
Infernoman's avatar
Infernoman committed
73
      env: HOST=i686-w64-mingw32 RUN_TESTS=false GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2" WINE=true
TheLazieR Yip's avatar
TheLazieR Yip committed
74
75
76
77
78
79
80
81
82
83
      addons:
        apt:
          packages:
            - nsis
            - gcc-mingw-w64-i686
            - g++-mingw-w64-i686
            - binutils-mingw-w64-i686
            - mingw-w64-dev
            - wine
            - bc
84
85
  exclude:
    - compiler: gcc
Cory Fields's avatar
Cory Fields committed
86
87
88
install:
before_script:
    - unset CC; unset CXX
Cory Fields's avatar
Cory Fields committed
89
    - mkdir -p depends/SDKs depends/sdk-sources
90
    - 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
Cory Fields's avatar
Cory Fields committed
91
    - 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
92
    - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
Cory Fields's avatar
Cory Fields committed
93
script:
94
    - if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
Cory Fields's avatar
Cory Fields committed
95
    - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
Infernoman's avatar
Infernoman committed
96
    - BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib --disable-tests"
Cory Fields's avatar
Cory Fields committed
97
98
    - depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
    - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi
99
    - test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
Cory Fields's avatar
Cory Fields committed
100
    - ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
UdjinM6's avatar
UdjinM6 committed
101
102
    - make distdir PACKAGE=dash VERSION=$HOST
    - cd dash-$HOST
Cory Fields's avatar
Cory Fields committed
103
104
    - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
    - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
105
    - export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
TheLazieR Yip's avatar
TheLazieR Yip committed
106
107
    - if [ "$RUN_TESTS" = "true" -a "$WINE" != "true" ]; then make check; fi
    - if [ "$RUN_TESTS" = "true" -a "$WINE" = "true" ]; then wine  src/test/test_dash.exe && wine src/qt/test/test_dash-qt.exe ; fi
Cory Fields's avatar
Cory Fields committed
108
    - if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi
Cory Fields's avatar
Cory Fields committed
109
110
after_script:
    - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi