forked from NOAA-GFDL/FMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
143 lines (123 loc) · 4.56 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#***********************************************************************
#* GNU Lesser General Public License
#*
#* This file is part of the GFDL Flexible Modeling System (FMS).
#*
#* FMS is free software: you can redistribute it and/or modify it under
#* the terms of the GNU Lesser General Public License as published by
#* the Free Software Foundation, either version 3 of the License, or (at
#* your option) any later version.
#*
#* FMS is distributed in the hope that it will be useful, but WITHOUT
#* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
#* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
#* for more details.
#*
#* You should have received a copy of the GNU Lesser General Public
#* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
#***********************************************************************
# This Travis-CI file for testing the build, and eventually the
# functionality of the libfms library.
#
# This Travis-CI file was created based off the NOAA-GFDL/MOM6
# Travis-CI file.
# FMS is not a c-language project, although there are a few c-language
# sources. However, this is the best choice.
language: c
os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- pkg-config gfortran netcdf-bin libnetcdf-dev libnetcdff-dev openmpi-bin libopenmpi-dev
jobs:
include:
- name: build_with_autotools
env:
- FCFLAGS_ADD='' DISTCHECK_CONFIGURE_FLAGS=''
# Travis sets CC to gcc, but we need to ensure it is not set, so we can use mpicc
before_install:
- test -n "$CC" && unset CC
before_script:
- export CC=mpicc
- export FC=mpif90
- export CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500"
- export FCFLAGS="-Waliasing -fno-range-check ${FCFLAGS_ADD}"
- export LDFLAGS='-L/usr/lib'
- export VERBOSE=1
script:
- autoreconf -i
- ./configure ${DISTCHECK_CONFIGURE_FLAGS}
- make -j distcheck
#build_with_autotools_no_openmp
- name: build_with_autotools_no_openmp
env:
- FCFLAGS_ADD='' DISTCHECK_CONFIGURE_FLAGS='--without-openmp'
before_install:
- test -n "$CC" && unset CC
before_script:
- export CC=mpicc
- export FC=mpif90
- export CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500"
- export FCFLAGS="-Waliasing -fno-range-check ${FCFLAGS_ADD}"
- export LDFLAGS='-L/usr/lib'
- export VERBOSE=1
script:
- autoreconf -i
- ./configure ${DISTCHECK_CONFIGURE_FLAGS}
- make -j distcheck
#build_with_autotools_mixed_mode
- name: build_with_autotools_mixed_mode
env:
- FCFLAGS_ADD='' DISTCHECK_CONFIGURE_FLAGS='--enable-mixed-mode'
before_install:
- test -n "$CC" && unset CC
before_script:
- export CC=mpicc
- export FC=mpif90
- export CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500"
- export FCFLAGS="-Waliasing -fno-range-check ${FCFLAGS_ADD}"
- export LDFLAGS='-L/usr/lib'
- export VERBOSE=1
script:
- autoreconf -i
- ./configure ${DISTCHECK_CONFIGURE_FLAGS}
- make -j distcheck
#build_with_autotools_r8
- name: build_with_autotools_r8
env:
- FCFLAGS_ADD='-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none' DISTCHECK_CONFIGURE_FLAGS='--disable-setting-flags'
before_install:
- test -n "$CC" && unset CC
before_script:
- export CC=mpicc
- export FC=mpif90
- export CPPFLAGS="-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500"
- export FCFLAGS="-Waliasing -fno-range-check ${FCFLAGS_ADD}"
- export LDFLAGS='-L/usr/lib'
- export VERBOSE=1
script:
- autoreconf -i
- ./configure ${DISTCHECK_CONFIGURE_FLAGS}
- make -j distcheck
#build_with_cmake
- name: build_with_cmake
env:
- FCFLAGS_ADD='' DISTCHECK_CONFIGURE_FLAGS=''
before_install:
- test -n "$CC" && unset CC
before_script:
- export CC=mpicc
- export FC=mpif90
- export NetCDF_ROOT=`nc-config --prefix`
- export VERBOSE=1
- export CFLAGS="-DMAXFIELDMETHODS_=500"
- export CPPFLAGS="-DMAXFIELDMETHODS_=500"
script:
- mkdir -p build_cmake
- cd build_cmake
- cmake -DCMAKE_INSTALL_PREFIX=../install_cmake -DOPENMP=OFF -D64BIT=ON -DLARGEFILE=ON ..
- make -j 2
- make install