This repository has been archived by the owner on Dec 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
64 lines (64 loc) · 2.73 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
dist: xenial # required for Python >= 3.7
language: python
python:
- "3.6"
- "3.7"
branches:
only:
- master
os:
- linux
# - osx
sudo: false
install:
# Python 3.x is default
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# Prepare env with Python version
- conda create -n climexp_numerical_wps python=$TRAVIS_PYTHON_VERSION
# Update now the env with our environment
- conda env update -f environment.yml
- source activate climexp_numerical_wps
# Packages for testing
- conda install pytest flake8
# Install climte explorer dependencies, set environment variables
- export MY_CONDA_ENV="$HOME/miniconda/envs/climexp_numerical_wps"
- export gsl_CFLAGS="-I${MY_CONDA_ENV}/include"
- export gsl_LIBS="-L${MY_CONDA_ENV}/lib"
# Install fgsl
- curl -L "https://doku.lrz.de/download/attachments/28051060/fgsl-1.2.0.tar.gz" > fgsl.tar.gz && tar -xzvf fgsl.tar.gz
- cd fgsl-1.2.0 && ./configure --prefix ${MY_CONDA_ENV}/ && make > /dev/null && make install && cd -
# Install lapack
- curl -L "http://www.netlib.org/lapack/lapack-3.8.0.tar.gz" > lapack-3.8.0.tar.gz && tar -xzvf lapack-3.8.0.tar.gz
- cd lapack-3.8.0 && cp make.inc.example make.inc && make lapacklib > /dev/null && cp liblapack.a ${MY_CONDA_ENV}/lib && cd - && rm -rf lapack-3.8.0
# Install climate explorer WPS
- python setup.py install
- wget https://github.com/c3s-magic/climexp_numerical/archive/master.tar.gz -O climexp_numerical-master.tar.gz
- tar -xzvf climexp_numerical-master.tar.gz
- export CPPFLAGS="-I${MY_CONDA_ENV}/include -I${MY_CONDA_ENV}/include/fgsl ${CPPFLAGS}"
- export LDFLAGS="-L${MY_CONDA_ENV}/lib ${LDFLAGS}"
- export FORTRAN_FLAGS="${CPPFLAGS} ${LDFLAGS}"
- export PVM_ARCH="build"
- export LD_LIBRARY_PATH="${MY_CONDA_ENV}:${LD_LIBRARY_PATH}"
- mkdir -p cd climexp_numerical-master/${PVM_ARCH} && cd climexp_numerical-master/${PVM_ARCH}
- cp ../Docker/Makefile.docker Makefile
- make
- cd -
- export CLIMATE_EXPLORER_BUILD=`pwd`"/climexp_numerical-master/build/"
- export CLIMATE_EXPLORER_DATA=`pwd`"/climexp_numerical-master/data"
# Note unable to really test a working explorer, because the required data fields are 2Gb in size.
# Install climate explorers python wrapper
- cd climexp_numerical-master/python && python setup.py install && cd -
before_script:
# Start WPS service on port 5000 on 0.0.0.0
- climexp_numerical_wps start --daemon --bind-host 0.0.0.0 --port 5000
- sleep 2
script:
- pytest
- flake8