source: trunk/.travis.yml @ 3012

Last change on this file since 3012 was 3012, checked in by tkr, 5 months ago

Few modifications to .travis.yml

File size: 8.7 KB
Line 
1language: cpp
2env:
3  global:
4    secure: FoPCwIlEKUUIwpSMGomm+Dfsv/Cp7ITqFVq5u++AAWp6WniX22NkkoPhCnbq3YxXrt0RQhK0P+pe6iJeQNgtm4seYWZO/pWj+frkW52kRWiEgMgKoAWx28vHVvcuqVr5lHAiezMoyrrKrmAJEznO0mTryDc1Ez3fzjSoIoY5r653TZEJNOJ5wU07oTVgGtTkKY9gsHM1s9fNu2ikmKrLQoe8VPJZpkSQPJp5YipghijYQUbeRyHnNMkxWZk34YCRTo2XIRiFBUKfC2efGLPvzGYjwAFYDHQUEKV4lVyg9S6e1BqoFH74vfgF2Vs6DADmWqImwC3RtrADh6wRpxSkADnCv+t3wc3mhuvYX74IDx6H0BFqYvWJwrkmXmnEQonBc/0db/mSiKfz6jp9i7vJl1XEtaYZ3Teic732ziOqUIbm4HjHCBDSqlC4mIlSDJnGAFvVjfZL1W1hbkUPaG1KpmEZ5hiE7mu2kf3DkFjiBdwBSTs5wlgmqmzHvvtAg1P6TdkR2uyIUCCkX4628sWzhfIfTV9XrophJw7jS+PD8dy5tdJclZvIXlw6JbiDPRpF7Vm6orDk/cY5sQ6Sv4+CZd0ml3AaSblR8JkXLCUu21/c2jxJwewYD7MFGNLcLueAK7pycZ9o3YII2zHlfuPRNAWEjS2AjgjCnk52+xhIDW4=
5matrix:
6  include:
7    - os: linux
8      env: BUILD_STATIC=true DEBUG=false ASAN=false
9      addons:
10        apt:
11          packages:
12            - gfortran
13            - libgfortran-5-dev
14            - liblapack-dev
15            - libmetis-dev
16    - os: linux
17      dist: precise
18      env: BUILD_STATIC=false DEBUG=false ASAN=false
19      addons:
20        apt:
21          sources:
22            - sourceline: 'ppa:ubuntu-toolchain-r/test'
23          packages:
24            - gcc-8
25            - g++-8
26            - gfortran-8
27            - libgfortran-8-dev
28            - liblapack-dev
29            - libamd2.2.0
30            - libcholmod1.7.1
31            - libsuitesparse-dev
32            - chrpath
33      install:
34        - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
35        - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90
36        - sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-8 90
37        - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-8 90
38    - os: linux
39      dist: precise
40      env: BUILD_STATIC=false DEBUG=false ASAN=false
41      addons:
42        apt:
43          sources:
44            - sourceline: 'ppa:ubuntu-toolchain-r/test'
45          packages:
46            - gcc-9
47            - g++-9
48            - gfortran-9
49            - libgfortran-9-dev
50            - liblapack-dev
51            - libamd2.2.0
52            - libcholmod1.7.1
53            - libmetis-edf-dev
54            - libsuitesparse-dev
55            - chrpath
56      install:
57        - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
58        - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
59        - sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 90
60        - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 90
61    - os: linux
62      dist: precise
63      env: BUILD_STATIC=false DEBUG=true ASAN=false
64      addons:
65        apt:
66          sources:
67            - sourceline: 'ppa:ubuntu-toolchain-r/test'
68          packages:
69            - gcc-9
70            - g++-9
71            - gfortran-9
72            - libgfortran-9-dev
73            - liblapack-dev
74            - libamd2.2.0
75            - libcholmod1.7.1
76            - libmetis-edf-dev
77            - libsuitesparse-dev
78            - chrpath
79      install:
80        - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
81        - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
82        - sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 90
83        - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 90
84    - os: linux
85      dist: precise
86      env: BUILD_STATIC=false DEBUG=true ASAN=true
87      addons:
88        apt:
89          sources:
90            - sourceline: 'ppa:ubuntu-toolchain-r/test'
91          packages:
92            - gcc-9
93            - g++-9
94            - gfortran-9
95            - libgfortran-9-dev
96            - liblapack-dev
97            - libamd2.2.0
98            - libcholmod1.7.1
99            - libmetis-edf-dev
100            - libsuitesparse-dev
101            - chrpath
102      install:
103        - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
104        - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
105        - sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 90
106        - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 90
107    - os: linux
108      dist: bionic
109      env: BUILD_STATIC=true DEBUG=false ASAN=false
110      addons:
111        apt:
112          packages:
113            - gfortran
114            - liblapack-dev
115            - libmetis-dev
116    - os: osx
117      osx_image: xcode11
118      env: OSX=10.14 CC=gcc CXX=g++ BUILD_STATIC=false DEBUG=false ASAN=false
119      compiler: clang
120    - os: osx
121      osx_image: xcode11
122      env: OSX=10.14  BUILD_STATIC=false DEBUG=false ASAN=false
123      compiler: clang
124    - os: osx
125      osx_image: xcode10
126      env: OSX=10.13  BUILD_STATIC=false DEBUG=false ASAN=false
127      compiler: clang
128before_script:
129  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install metis; fi
130  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep bash` != x'bash' ]; then brew install bash; fi; fi
131  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep gcc` != x'gcc' ]; then brew install gcc; fi; fi
132  - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc" ]]; then export CC=gcc-9 ; export CXX=g++-9 ; $CC --version; $CXX --version; gfortran --version; fi
133  - if [[ "$TRAVIS_OS_NAME $CC" == "osx clang" ]]; then  export PLATFORM=osx$OSX-x86_64-clang`clang -dumpversion`; fi
134  - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc-9" ]]; then  export PLATFORM=osx$OSX-x86_64-gcc`gcc-9 -dumpversion`; fi
135  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then  export PLATFORM=linux-x86_64-gcc`gcc -dumpversion`; fi
136  - cd ..
137  - wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
138  - export PROJECT_URL=https://github.com/$TRAVIS_REPO_SLUG
139  - export PROJECT=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2`
140  - bash ./coinbrew fetch $PROJECT_URL:$TRAVIS_BRANCH --no-prompt --skip-update
141
142script:
143  - export DBGC=""
144  - if [[ $DEBUG == "true" ]]; then export DBGC="--enable-debug"; fi
145  - if [[ $DEBUG == "true" ]]; then export CXXFLAGS="-D_GLIBCXX_DEBUG -Og -g"; fi
146  - if [[ $ASAN == "true" ]]; then export CXXFLAGS="${CXXFLAGS} -fsanitize=address"; fi
147  - if [[ $ASAN == "true" ]]; then export LDFLAGS="-lasan"; fi
148  - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $BUILD_STATIC == "true" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=4 --enable-relocatable --fully-static $DBGC --with-lapack="-llapack -lblas -lgfortran -lquadmath -lm"; fi
149  - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $BUILD_STATIC == "false" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=4 --tests main --enable-relocatable $DBGC; fi
150  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=3 --tests none --enable-relocatable; fi
151
152after_script:
153  - export DBGN=""
154  - export ASN=""
155  - if [[ $DEBUG == "true" ]]; then export DBGN="dbg"; else export DBG=""; fi
156  - if [[ $ASAN == "true" ]]; then export ASN="asan"; else EXPORT ASN=""; fi
157  - if [[ $BUILD_STATIC == "true" ]] then export STATIC="static"; else export STATIC=""; fi
158  - if [ $TRAVIS_BRANCH = "master" ]; then export VERSION=master; else export VERSION=`echo $TRAVIS_BRANCH | cut -d "/" -f 2`; fi
159  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then export TGZ_FILE=$PROJECT-$VERSION-$STATIC-$TRAVIS_DIST-$PLATFORM-$DBGN-$ASN.tgz; else export TGZ_FILE=$PROJECT-$VERSION-$STATIC-$PLATFORM-$DBGN-$ASN.tgz; fi
160  - echo $TGZ_FILE
161  - cp README.md LICENSE AUTHORS dist
162  - cd dist
163  - |
164    if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_DIST" == "precise" ]];
165    then
166      # adding required libraries
167      cp /usr/lib/lapack/liblapack.so.3gf lib/
168      cp /usr/lib/x86_64-linux-gnu/libgfortran.so.5 lib/
169      cp /usr/lib/x86_64-linux-gnu/libgfortran.so.3 lib/
170      cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 lib/
171      cp /usr/lib/libblas/libblas.so.3gf lib/
172      cp /lib/x86_64-linux-gnu/libreadline.so.6 lib/
173      cp /lib/x86_64-linux-gnu/libbz2.so.1.0 lib/
174      cp /lib/x86_64-linux-gnu/libtinfo.so.5 lib/
175      cp /usr/lib/x86_64-linux-gnu/libquadmath.so.0 lib/
176      cp /usr/lib/libcholmod.so.1.7.1 lib/
177      cp /usr/lib/libamd.so.2.2.0 lib/
178      cp /usr/lib/libcolamd.so.2.7.1 lib/
179      cp /usr/lib/libmetis-edf.so.* lib/
180   
181      for libfile in lib/*.so*;
182      do
183        chrpath -r ./ $libfile
184      done
185
186      chrpath -r \$\ORIGIN/../lib/ bin/cbc
187      chrpath -r \$\ORIGIN/../lib/ bin/clp
188      chrpath -r \$\ORIGIN/../lib/ bin/glpsol
189    fi
190  - tar -czvf $TGZ_FILE lib/* bin/* include/* share/* README.md LICENSE AUTHORS
191  - curl -T $TGZ_FILE -utkralphs:$BINTRAY_API -H "X-Bintray-Publish:1" -H "X-Bintray-Override:1" https://api.bintray.com/content/coin-or/download/$PROJECT/$VERSION/$TGZ_FILE
192
193after_failure:
194  - find .. -name config.log -exec tail -n 1000 {} \;
Note: See TracBrowser for help on using the repository browser.