-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
60 lines (57 loc) · 2.25 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
os: trusty
before_install:
- sudo apt-get update
# Install MONC's dependencies
- sudo apt-get install -y mpich fftw3-dev
# Install MONC's python libraries
- sudo apt-get install -y python-numpy python-scipy python-matplotlib ipython ipython-notebook
# install pytest for running tests
- sudo apt-get install -y python-logilab-common
# Install HDF5 compiled for parallel use
- sudo apt-get install -y libhdf5-mpich-dev
# Install GNU m4:
- sudo apt-get install -y m4
install:
- export NETCDF_C_VERSION=4.4.0
- export NETCDF_FORTRAN_VERSION=4.4.3
- export FCM_VERSION=2017.10.0
# Download:
- wget https://github.com/Unidata/netcdf-c/archive/v${NETCDF_C_VERSION}.tar.gz
- tar -xf v${NETCDF_C_VERSION}.tar.gz
- cd netcdf-c-${NETCDF_C_VERSION}/
# Configure:
- CC=mpicc CPPFLAGS=-I/usr/include/hdf5/mpich LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/mpich ./configure --enable-parallel-tests --disable-dap --prefix=/usr
# Build and install:
# - make check
- sudo make install
# change directory to home
- cd
# Build NetCDF Fortran static libraries
# Download:
- wget https://github.com/Unidata/netcdf-fortran/archive/v${NETCDF_FORTRAN_VERSION}.tar.gz
- tar -xf v${NETCDF_FORTRAN_VERSION}.tar.gz
- cd netcdf-fortran-${NETCDF_FORTRAN_VERSION}/
# Configure:
- H5DIR=/usr
- NCDIR=/usr
- NFDIR=/usr
- ODIR=/usr
- CC=mpicc FC=mpif90 F77=mpif77 CPPFLAGS="-I${NCDIR}/include -I${H5DIR}/include/hdf5/mpich -I${ODIR}/include" LDFLAGS="-L${NCDIR}/lib -L${H5DIR}/lib/x86_64-linux-gnu/hdf5/mpich -L${ODIR}/lib" LD_LIBRARY_PATH=${NCDIR}/lib:${H5DIR}/lib:${ODIR}/lib LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz" ./configure --disable-shared --prefix=${NCDIR}
# Build and install:
# - make check
- sudo make install
# change directory to home
- cd
# Install FCM (used for compilation)
- wget https://github.com/metomi/fcm/archive/${FCM_VERSION}.tar.gz
- tar -xf ${FCM_VERSION}.tar.gz
- export PATH=`pwd`/fcm-${FCM_VERSION}/bin:$PATH
# Compile MONC with FCM
# change to where Travis has checked out our repository
- cd $TRAVIS_BUILD_DIR
- ls
- fcm make -f fcm-make/monc-ubuntu-16.04-gnu.cfg
script:
- pytest
# run straka test for now to ensure that MONC runs
- mpirun -np 4 build/bin/monc_driver.exe --config=tests/straka_short.mcf