forked from pySTEPS/pysteps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
129 lines (109 loc) · 3.2 KB
/
.travis.yml
File metadata and controls
129 lines (109 loc) · 3.2 KB
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
language: python
env:
global:
- MINIMAL_DEPENDENCIES="cython numpy jsmin jsonschema matplotlib netCDF4 opencv pillow pyproj scipy dask"
- OPTIONAL_DEPENDENCIES="dask pyfftw cartopy h5py PyWavelets pygrib"
- TEST_DEPENDENCIES="pytest pytest-cov codecov"
jobs:
include:
- os: linux
python: 3.8
env:
- PYTHON_VERSION=3.8
- RUN_TESTS=false
- os: linux
python: 3.6
env:
- PYTHON_VERSION=3.6
- RUN_TESTS=true
- os: linux
python: 3.7
env:
- PYTHON_VERSION=3.7
- RUN_TESTS=true
- os: linux
python: 3.8
env:
- PYTHON_VERSION=3.8
- RUN_TESTS=true
- os: osx
language: generic
osx_image: xcode12
env:
- PYTHON_VERSION=3.8
- RUN_TESTS=false
- os: osx
language: generic
osx_image: xcode12
env:
- PYTHON_VERSION=3.6
- RUN_TESTS=true
- os: osx
language: generic
osx_image: xcode12
env:
- PYTHON_VERSION=3.7
- RUN_TESTS=true
- os: osx
language: generic
osx_image: xcode12
env:
- PYTHON_VERSION=3.8
- RUN_TESTS=true
before_install:
# Install gcc for MacOSX
# ----------------------
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export HOMEBREW_NO_INSTALL_CLEANUP=1;
brew update-reset;
brew update;
brew install gcc@9;
which gcc-9 ;
export CC=gcc-9 ;
export CXX=g++-9 ;
export CXX1X=g++-9 ;
gcc-9 --version;
fi
# Install miniconda
# -----------------
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
travis_retry wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
travis_retry wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
# Create the basic testing environment
# ------------------------------------
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls yes
- conda config --add channels conda-forge
- conda config --add channels conda-forge/label/testing
- ENV_NAME="test-environment"
- travis_retry conda create -n $ENV_NAME python=$PYTHON_VERSION
- source activate $ENV_NAME
# Customise the testing environment
# ---------------------------------
- export CYTHON_COVERAGE=1;
- if [[ "$RUN_TESTS" == true ]]; then
PACKAGES="$MINIMAL_DEPENDENCIES $OPTIONAL_DEPENDENCIES $TEST_DEPENDENCIES";
travis_retry conda install --quiet $PACKAGES ;
fi;
install:
# Install pysteps
# ---------------
- export PYSTEPS_BUILD_DIR="$( pwd )"
- pip install .
- cd ~
# Check that the pysteps package can be imported
- python -c "import pysteps; print(pysteps.__file__)"
# Check the compiled modules
- python -c "from pysteps import motion"
- python -c "from pysteps.motion import vet"
- python -c "from pysteps.motion import proesmans"
script:
- if [[ "$RUN_TESTS" == true ]]; then
bash $PYSTEPS_BUILD_DIR/ci/run_tests.sh;
fi
after_success:
- if [[ "$RUN_TESTS" == true ]]; then codecov; fi