source: trunk/.travis.yml

Last change on this file was 3024, checked in by tkr, 3 months ago

Trying again to get valid YAML files

File size: 8.1 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: bionic
86      env: BUILD_STATIC=true DEBUG=false ASAN=false
87      addons:
88        apt:
89          packages:
90            - gfortran
91            - liblapack-dev
92            - libmetis-dev
93    - os: osx
94      osx_image: xcode11
95      env: OSX=10.14 CC=gcc CXX=g++ BUILD_STATIC=false DEBUG=false ASAN=false
96      compiler: clang
97    - os: osx
98      osx_image: xcode11
99      env: OSX=10.14  BUILD_STATIC=false DEBUG=false ASAN=false
100      compiler: clang
101    - os: osx
102      osx_image: xcode10
103      env: OSX=10.13  BUILD_STATIC=false DEBUG=false ASAN=false
104      compiler: clang
105before_script:
106  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install metis; fi
107  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep bash` != x'bash' ]; then brew install bash; fi; fi
108  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep gcc` != x'gcc' ]; then brew install gcc; fi; fi
109  - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc" ]]; then export CC=gcc-9 ; export CXX=g++-9 ; $CC --version; $CXX --version; gfortran --version; fi
110  - if [[ "$TRAVIS_OS_NAME $CC" == "osx clang" ]]; then  export PLATFORM=osx$OSX-x86_64-clang`clang -dumpversion`; fi
111  - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc-9" ]]; then  export PLATFORM=osx$OSX-x86_64-gcc`gcc-9 -dumpversion`; fi
112  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then  export PLATFORM=linux-x86_64-gcc`gcc -dumpversion`; fi
113  - cd ..
114  - wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
115  - export PROJECT_URL=https://github.com/$TRAVIS_REPO_SLUG
116  - export PROJECT=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2`
117  - bash ./coinbrew fetch $PROJECT_URL:$TRAVIS_BRANCH --no-prompt --skip-update
118
119script:
120  - export DBGC=""
121  - if [[ $DEBUG == "true" ]]; then export DBGC="--enable-debug"; fi
122  - if [[ $DEBUG == "true" ]]; then export CXXFLAGS="-Og -g"; fi
123  - if [[ $ASAN == "true" ]]; then export CXXFLAGS="${CXXFLAGS} -fsanitize=address"; fi
124  - if [[ $ASAN == "true" ]]; then export LDFLAGS="-lasan"; fi
125  - 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
126  - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $BUILD_STATIC == "false" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=4 --tests main --enable-relocatable $DBGC; fi
127  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=3 --tests none --enable-relocatable; fi
128
129after_script:
130  - if [[ $DEBUG == "true" ]]; then export DBGN="-dbg"; else export DBG=""; fi
131  - if [[ $ASAN == "true" ]]; then export ASN="-asan"; else EXPORT ASN=""; fi
132  - if [[ $BUILD_STATIC == "true" ]]; then export STATIC="-static"; else export STATIC=""; fi
133  - if [ $TRAVIS_BRANCH = "master" ]; then export VERSION=master; else export VERSION=`echo $TRAVIS_BRANCH | cut -d "/" -f 2`; fi
134  - 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
135  - echo $TGZ_FILE
136  - cp README.md LICENSE AUTHORS dist
137  - cd dist
138  - |
139    if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_DIST" == "precise" ]];
140    then
141      # adding required libraries
142      cp /usr/lib/lapack/liblapack.so.3gf lib/
143      cp /usr/lib/x86_64-linux-gnu/libgfortran.so.5 lib/
144      cp /usr/lib/x86_64-linux-gnu/libgfortran.so.3 lib/
145      cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 lib/
146      cp /usr/lib/libblas/libblas.so.3gf lib/
147      cp /lib/x86_64-linux-gnu/libreadline.so.6 lib/
148      cp /lib/x86_64-linux-gnu/libbz2.so.1.0 lib/
149      cp /lib/x86_64-linux-gnu/libtinfo.so.5 lib/
150      cp /usr/lib/x86_64-linux-gnu/libquadmath.so.0 lib/
151      cp /usr/lib/libcholmod.so.1.7.1 lib/
152      cp /usr/lib/libamd.so.2.2.0 lib/
153      cp /usr/lib/libcolamd.so.2.7.1 lib/
154      cp /usr/lib/libmetis-edf.so.* lib/
155   
156      for libfile in lib/*.so*;
157      do
158        chrpath -r ./ $libfile
159      done
160
161      chrpath -r \$\ORIGIN/../lib/ bin/cbc
162      chrpath -r \$\ORIGIN/../lib/ bin/clp
163      chrpath -r \$\ORIGIN/../lib/ bin/glpsol
164    fi
165  - tar -czvf $TGZ_FILE lib/* bin/* include/* share/* README.md LICENSE AUTHORS
166  - 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
167  - "while [[ ! `curl -utkralphs:$BINTRAY_API -X PUT -H \"Content-Type: application/json\" -d'{\"list_in_downloads\":true}' https://api.bintray.com/file_metadata/coin-or/download/$TGZ_FILE` =~ success ]]; do echo \"Command failed...trying again 10 seconds\"; sleep 10; done"
168
169after_failure:
170  - find .. -name config.log -exec tail -n 1000 {} \;
Note: See TracBrowser for help on using the repository browser.