forked from LHEEA/HOS-ocean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (47 loc) · 1.47 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
sudo: required
dist: trusty
language: fortran
matrix:
include:
- os: linux
compiler: clang
env: BTYPE=RelWithDebInfo
- os: linux
compiler: clang
env: BTYPE=Debug
- os: linux
compiler: gcc
env: BTYPE=Coverage
- os: osx
compiler: clang
env: BTYPE=RelWithDebInfo
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get --yes update; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get --yes install gfortran; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get --yes install liblapack-dev; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get --yes install fftw3; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get --yes install libfftw3-dev; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install gcc; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install fftw --with-fortran; fi
install:
- mkdir hosocean-build && cd hosocean-build
# Configure
- cmake $TRAVIS_BUILD_DIR/cmake -DCMAKE_BUILD_TYPE=$BTYPE -DCMAKE_INSTALL_PREFIX=~/hosocean
# Build
- make
script:
# Test the program
- make test
# Create package
- make package
# Make sure we can install with no issues.
- make install
# Create coverage report
- if [[ "$BTYPE" == "Coverage" ]];
then
echo "Coverage";
find $TRAVIS_BUILD_DIR -type f -name "*.gcno";
find $TRAVIS_BUILD_DIR -type f -name "*.gcna";
make coverage;
bash <(curl -s https://codecov.io/bash) -X gcov;
fi