source: trunk/.travis.yml @ 2988

Last change on this file since 2988 was 2988, checked in by unxusr, 4 months ago

change rpath of libraries with chrpath

File size: 6.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=false
9      addons:
10        apt:
11          packages:
12            - gfortran
13            - libgfortran-5-dev
14            - liblapack-dev
15    - os: linux
16      dist: precise
17      env: BUILD_STATIC=false
18      addons:
19        apt:
20          sources:
21            - sourceline: 'ppa:ubuntu-toolchain-r/test'
22          packages:
23            - gcc-8
24            - g++-8
25            - gfortran-8
26            - libgfortran-8-dev
27            - liblapack-dev
28            - libamd2.2.0
29            - libcholmod1.7.1
30            - libsuitesparse-dev
31            - chrpath
32      install:
33        - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
34        - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90
35        - sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-8 90
36        - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-8 90
37    - os: linux
38      dist: precise
39      env: BUILD_STATIC=false
40      addons:
41        apt:
42          sources:
43            - sourceline: 'ppa:ubuntu-toolchain-r/test'
44          packages:
45            - gcc-9
46            - g++-9
47            - gfortran-9
48            - libgfortran-9-dev
49            - liblapack-dev
50            - libamd2.2.0
51            - libcholmod1.7.1
52            - libsuitesparse-dev
53            - chrpath
54      install:
55        - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
56        - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
57        - sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 90
58        - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 90
59    - os: linux
60      dist: bionic
61      env: BUILD_STATIC=true
62      addons:
63        apt:
64          packages:
65            - gfortran
66            - liblapack-dev
67    - os: osx
68      osx_image: xcode11
69      env: OSX=10.14 CC=gcc CXX=g++ BUILD_STATIC=false
70      compiler: clang
71    - os: osx
72      osx_image: xcode11
73      env: OSX=10.14  BUILD_STATIC=false
74      compiler: clang
75    - os: osx
76      osx_image: xcode10
77      env: OSX=10.13  BUILD_STATIC=false
78      compiler: clang
79
80before_script:
81  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
82  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep bash` != x'bash' ]; then brew install bash; fi; fi
83  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep gcc` != x'gcc' ]; then brew install gcc; fi; fi
84  - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc" ]]; then export CC=gcc-9 ; export CXX=g++-9 ; $CC --version; $CXX --version; gfortran --version; fi
85  - if [[ "$TRAVIS_OS_NAME $CC" == "osx clang" ]]; then  export PLATFORM=osx$OSX-x86_64-clang`clang -dumpversion`; fi
86  - if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc-9" ]]; then  export PLATFORM=osx$OSX-x86_64-gcc`gcc-9 -dumpversion`; fi
87  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then  export PLATFORM=linux-x86_64-gcc`gcc -dumpversion`; fi
88  - cd ..
89  - wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
90  - export PROJECT_URL=https://github.com/$TRAVIS_REPO_SLUG
91  - export PROJECT=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2`
92  - bash ./coinbrew fetch $PROJECT_URL:$TRAVIS_BRANCH --no-prompt --skip-update
93
94script:
95  - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $BUILD_STATIC == "true" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=4 --enable-relocatable --fully-static --with-lapack="-llapack -lblas -lgfortran -lquadmath -lm"; fi
96  - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $BUILD_STATIC == "false" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=4 --tests main --enable-relocatable; fi
97  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=3 --tests none --enable-relocatable; fi
98
99after_script:
100  - if [ $TRAVIS_BRANCH = "master" ]; then export VERSION=master; else export VERSION=`echo $TRAVIS_BRANCH | cut -d "/" -f 2`; fi
101  - if [ $BUILD_STATIC = "false" ]; then export TGZ_FILE=$PROJECT-$VERSION-$PLATFORM.tgz; else export TGZ_FILE=$PROJECT-$VERSION-static-$PLATFORM.tgz; fi
102  - echo $TGZ_FILE
103  - cp README.md LICENSE AUTHORS dist
104  - cd dist
105  - |
106    if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_DIST" == "precise" ]];
107    then
108      # adding required libraries
109      cp /usr/lib/lapack/liblapack.so.3gf lib/
110      cp /usr/lib/x86_64-linux-gnu/libgfortran.so.5 lib/
111      cp /usr/lib/x86_64-linux-gnu/libgfortran.so.3 lib/
112      cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 lib/
113      cp /usr/lib/libblas/libblas.so.3gf lib/
114      cp /lib/x86_64-linux-gnu/libreadline.so.6 lib/
115      cp /lib/x86_64-linux-gnu/libbz2.so.1.0 lib/
116      cp /lib/x86_64-linux-gnu/libtinfo.so.5 lib/
117      cp /usr/lib/x86_64-linux-gnu/libquadmath.so.0 lib/
118      cp /usr/lib/libcholmod.so.1.7.1 lib/
119      cp /usr/lib/libamd.so.2.2.0 lib/
120      cp /usr/lib/libcolamd.so.2.7.1 lib/
121   
122      for libfile in lib/*.so*;
123      do
124        chrpath -r ./ $libfile
125      done
126
127      chrpath -r ../lib/ bin/cbc
128      chrpath -r ../lib/ bin/clp
129      chrpath -r ../lib/ bin/glpsol
130    fi
131  - tar -czvf $TGZ_FILE lib/* bin/* include/* share/* README.md LICENSE AUTHORS
132  - 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
133
134after_failure:
135  - find .. -name config.log -exec tail -n 1000 {} \;
Note: See TracBrowser for help on using the repository browser.