forked from sourceryinstitute/OpenCoarrays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
122 lines (113 loc) · 3.54 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
111
112
113
114
115
116
117
118
119
120
121
122
language: generic
env:
global:
- CACHE="$HOME/.local"
- MPICH_VER="3.1.4"
- MPICH_URL_HEAD="http://www.mpich.org/static/downloads/$MPICH_VER"
- MPICH_URL_TAIL="mpich-${MPICH_VER}.tar.gz"
- MPICH_DIR="$HOME/.local/usr/mpich"
- MPICH_BOT_URL_HEAD="https://github.com/sourceryinstitute/opencoarrays/files/64308/"
- MPICH_BOT_URL_TAIL="mpich-3.2.yosemite.bottle.1.tar.gz"
- OSX_PACKAGES="gcc cmake"
matrix:
include:
- os: osx
- os: linux
sudo: false
cache:
directories:
- "$CACHE"
- "$HOME/.cache/pip"
addons:
apt:
sources:
- george-edison55-precise-backports
- ubuntu-toolchain-r-test
packages:
- gcc-5
- gfortran-5
- binutils
- cmake-data
- cmake
before_install:
- |
if [[ $TRAVIS ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]]; then
export PATH="$PATH:$HOME/Library/Python/2.7/bin"
else
[[ -d "$CACHE/bin" ]] || mkdir -p "$CACHE/bin"
[[ -d "$MPICH_DIR" ]] || mkdir -p "$MPICH_DIR"
export PATH="$CACHE/bin:$PATH"
export FC=gfortran-5
export CC=gcc-5
$FC --version
$CC --version
cmake --version
fi
install:
- |
if [[ $TRAVIS ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]]; then
brew update > /dev/null
for pkg in $OSX_PACKAGES; do
[[ "$(brew ls --versions $pkg)" ]] || brew install --force-bottle $pkg
brew outdated $pkg || brew upgrade --force-bottle $pkg
done
export FC=gfortran-5
export CC=gcc-5
if ! [[ "$(brew ls --versions mpich)" ]]; then
wget ${MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}
brew install --force-bottle ${MPICH_BOT_URL_TAIL}
if ! [[ "$(brew ls --versions mpich)" ]]; then
brew install --force-bottle mpich
fi
fi
else
if ! ( [[ -x "$HOME/.local/bin/mpif90" ]] && [[ -x "$HOME/.local/bin/mpicc" ]] ); then
# mpich install not cached
if ( [[ $TRAVIS ]] && [[ "X$TRAVIS_BRANCH" == Xbranch-1.* ]] ); then
install_prerequisites/build mpich "$MPICH_VER" "$MPICH_DIR" 4
else
# install_prerequisites/build is broken as of 2015.12.09 / 9d2edbb0 on master
# argument parsing bug fixes haven't made it back into master yet...
wget "${MPICH_URL_HEAD}/${MPICH_URL_TAIL}"
mv "$MPICH_URL_TAIL" "$MPICH_DIR/.."
pushd "$MPICH_DIR/.."
tar -xzvf "$MPICH_URL_TAIL"
cd "${MPICH_URL_TAIL%.tar.gz}"
./configure --prefix="$MPICH_DIR"
make -j 4
make install
popd
fi
for f in "$MPICH_DIR/bin/"*; do
if [[ -x "$f" ]]; then
ln -fs "$f" "$HOME/.local/bin/${f##*/}" && "${f##*/}" --version
fi
done
fi
fi
before_script:
- mpif90 --version
- export FC=mpif90
- mpicc --version
- export CC=mpicc
- cmake --version
script:
- mkdir cmake-build
- cd cmake-build
- cmake -DCMAKE_INSTALL_PREFIX:PATH="$HOME/OpenCoarrays" -DCMAKE_Fortran_FLAGS='-ftest-coverage -fprofile-arcs -O0' -DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage -O0' ..
- make -j 4
- ctest --verbose
- make install
- cd ..
after_success:
- find . -name '*.gcno' -print
- find . -name '*.gcda' -print
- gcov-5 --version
- bash <(curl -s https://codecov.io/bash) -x $(which gcov-5)
notifications:
webhooks:
urls:
- $GITTERHOOK_URL
on_success: change # options: [always|never|change]
on_failure: always
on_start: always