forked from SciRuby/nmatrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.sh
executable file
·60 lines (51 loc) · 1.44 KB
/
travis.sh
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
#!/bin/bash
set -ev #fail at the first command that returns non-zero exit value
if [ "$1" = "before_install" ]
then
gem install bundler -v '~> 1.6'
sudo apt-get update -qq
if [ -n "$USE_ATLAS" ]
then
sudo apt-get install -y libatlas-base-dev
fi
# travis-ci runs on Ubuntu 12.04, where the openblas package doesn't
# provide a liblapack.so, so we test using the blas from openblas
# and the reference lapack implementation. Not entirely sure if
# this will work.
if [ -n "$USE_OPENBLAS" ]
then
sudo apt-get install -y libopenblas-dev
# Since we install libopenblas first, liblapack won't try to install
# libblas (the reference BLAS implementation).
sudo apt-get install -y liblapack-dev
fi
if [ -n "$USE_REF" ]
then
sudo apt-get install -y liblapack-dev
fi
fi
if [ "$1" = "script" ]
then
if [ -n "$USE_ATLAS" ]
then
# Need to put these commands on separate lines (rather than use &&)
# so that bash set -e will work.
bundle exec rake compile nmatrix_plugins=all
bundle exec rake spec nmatrix_plugins=all
fi
if [ -n "$USE_OPENBLAS" ]
then
bundle exec rake compile nmatrix_plugins=lapacke
bundle exec rake spec nmatrix_plugins=lapacke
fi
if [ -n "$USE_REF" ]
then
bundle exec rake compile nmatrix_plugins=lapacke
bundle exec rake spec nmatrix_plugins=lapacke
fi
if [ -n "$NO_EXTERNAL_LIB" ]
then
bundle exec rake compile
bundle exec rake spec
fi
fi