forked from coin-or/Dip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (105 loc) · 5.05 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
language: cpp
env:
global:
- secure: G7+GGtBDpP73nuIa7dcWD3sRI+v6jkDubFaOY65wO/S1KxqdbQBHdI10K3oXq3QalOpI6/Kilm+JVA7Xm8B1tbQ34bVSuhPQIEaO45Bz4546xpzjqShX+zXVj5In/BghrSbt75mwYoRFAmsKRCg7VtFXgtTaWgXHyE81Yhcb+SA81tzC45D+9BT8ei8NU++ez7RDo9IA9RXQTRDhgVH6YSvpgDThXGI2RbQ5v5ktMuVDnjIyJTayb/oc6xsR9LRtLMkyOfU0nLq9X9eQkD+Tqb5nkdQRwYKutv/ChSoQiB4fAfp9fI0KEH9RirHXbigFBZWnIo8UdhApRN5KzRMsXzR/BX6fMEH9iT+qK7DOhvBS658XhlTyQwOOHJp3EYu5K+6yXDpLOmuh3Nd+FHFw0IXb3bryVhP9S16mxVvm04i8ZWKXgQ4R5rlNkgcXZU7u/ZvpRAAVT5iPeg0EOAisnqaaPwYZG9GtmAgAhCha7w+N3grUAOIWX3mV37DrvoMDTrE1GUsJ+Z56Ztq1bAFEJXMGRs7hU5miyAgIUt2ejcQNAi2AnK9AK8eOJSVaZDopQpCLf44Dpp5zPOR1Hn6ceYwVP7bPnevleD0vMChFSTpUZZ6tYKcIXeAt6auafKKgOSNotURtC/75hY+0YL8U3tZnHNb2kdWwio3bR3QGxRk=
matrix:
include:
- os: linux
dist: precise
env:
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- gcc-9
- g++-9
- gfortran-9
- libgfortran-9-dev
- liblapack-dev
- libamd2.2.0
- libcholmod1.7.1
- libsuitesparse-dev
- chrpath
install:
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
- sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 90
- sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 90
- os: linux
addons:
apt:
packages:
- gfortran
- liblapack-dev
- libmetis-dev
- os: linux
dist: bionic
addons:
apt:
packages:
- gfortran
- liblapack-dev
- libmetis-dev
- os: osx
osx_image: xcode11
env: OSX=10.14 CC=gcc CXX=g++
compiler: clang
- os: osx
osx_image: xcode11
env: OSX=10.14
compiler: clang
- os: osx
osx_image: xcode10
env: OSX=10.13
compiler: clang
before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep bash` != x'bash' ]; then brew install bash; fi; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ x`brew list | fgrep gcc` != x'gcc' ]; then brew install gcc; fi; fi
- if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc" ]]; then export CC=gcc-9 ; export CXX=g++-9 ; $CC --version; $CXX --version; gfortran --version; fi
- if [[ "$TRAVIS_OS_NAME $CC" == "osx clang" ]]; then export PLATFORM=osx$OSX-x86_64-clang`clang -dumpversion`; fi
- if [[ "$TRAVIS_OS_NAME $CC" == "osx gcc-9" ]]; then export PLATFORM=osx$OSX-x86_64-gcc`gcc-9 -dumpversion`; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PLATFORM=linux-x86_64-gcc`gcc -dumpversion`; fi
- cd ..
- wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
- export PROJECT_URL=https://github.com/$TRAVIS_REPO_SLUG
- export PROJECT=`echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2`
- bash ./coinbrew fetch $PROJECT_URL:$TRAVIS_BRANCH --no-prompt --skip-update
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=3 --tests main --enable-relocatable --skip="ThirdParty/Lapack ThirdParty/Blas"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./coinbrew build $PROJECT --no-prompt --verbosity=3 --tests main --enable-relocatable; fi
after_script:
- if [ $TRAVIS_BRANCH = "master" ]; then export VERSION=master; else export VERSION=`echo $TRAVIS_BRANCH | cut -d "/" -f 2`; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export TGZ_FILE=$PROJECT-$VERSION-$TRAVIS_DIST-$PLATFORM.tgz; else export TGZ_FILE=$PROJECT-$VERSION-$PLATFORM.tgz; fi
- echo $TGZ_FILE
- cp $PROJECT/README.md $PROJECT/LICENSE $PROJECT/$PROJECT/AUTHORS dist
- cd dist
- cd dist
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_DIST" == "precise" ]];
then
# adding required libraries
cp /usr/lib/lapack/liblapack.so.3gf lib/
cp /usr/lib/x86_64-linux-gnu/libgfortran.so.5 lib/
cp /usr/lib/x86_64-linux-gnu/libgfortran.so.3 lib/
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 lib/
cp /usr/lib/libblas/libblas.so.3gf lib/
cp /lib/x86_64-linux-gnu/libreadline.so.6 lib/
cp /lib/x86_64-linux-gnu/libbz2.so.1.0 lib/
cp /lib/x86_64-linux-gnu/libtinfo.so.5 lib/
cp /usr/lib/x86_64-linux-gnu/libquadmath.so.0 lib/
cp /usr/lib/libcholmod.so.1.7.1 lib/
cp /usr/lib/libamd.so.2.2.0 lib/
cp /usr/lib/libcolamd.so.2.7.1 lib/
for libfile in lib/*.so*;
do
chrpath -r ./ $libfile
done
chrpath -r \$\ORIGIN/../lib/ bin/cbc
chrpath -r \$\ORIGIN/../lib/ bin/clp
chrpath -r \$\ORIGIN/../lib/ bin/symphony
chrpath -r \$\ORIGIN/../lib/ bin/dip
fi
- tar -czvf $TGZ_FILE lib/* bin/* include/* share/* README.md LICENSE AUTHORS
- 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