forked from CEA-COSMIC/pysap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
112 lines (106 loc) · 3.67 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
language: python
sudo: required
addons:
homebrew:
packages: &macos_packages
- cmake
- pkgconfig
- cfitsio
- libomp
update: true
matrix:
include:
- os: linux
dist: xenial
python: 3.5
name: "Linux Xenial Python 3.5"
- os: linux
dist: xenial
python: 3.6
name: "Linux Xenial Python 3.6"
- os: linux
dist: xenial
python: 3.7
name: "Linux Xenial Python 3.7"
- os: linux
dist: xenial
python: 3.8
name: "Linux Xenial Python 3.8"
- os: osx
osx_image: xcode11.3
language: shell
env: PYTHON_VERSION=3.6
name: "macOS 10.14 Python 3.6"
addons:
homebrew:
packages:
- *macos_packages
- os: osx
osx_image: xcode11.3
language: shell
env: PYTHON_VERSION=3.7
name: "macOS 10.14 Python 3.7"
addons:
homebrew:
packages:
- *macos_packages
- os: osx
osx_image: xcode11.3
language: shell
env: PYTHON_VERSION=3.8
name: "macOS 10.14 Python 3.8"
addons:
homebrew:
packages:
- *macos_packages
before_install:
- if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt-get update; fi
- if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo updatedb; fi
- if [ $TRAVIS_OS_NAME = 'osx' ];
then curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh;
else wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [ $TRAVIS_OS_NAME = 'linux' ]; then
export CPLUS_INCLUDE_PATH=$(cd /opt/python/3.*/include/python3.*; pwd);
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- hash -r
- conda update --all -y;
- conda info -a
- if [ $TRAVIS_OS_NAME = 'linux' ]; then sudo apt install -y libnfft3-dev; fi
- if [ $TRAVIS_OS_NAME = 'osx' ]; then echo "backend':' TkAgg" > matplotlibrc; fi
- if [ $TRAVIS_OS_NAME = 'osx' ]; then export MACOSX_DEPLOYMENT_TARGET=10.14; fi
install:
- if [ $TRAVIS_OS_NAME = 'osx' ];
then conda create -n testenv --yes pip python=$PYTHON_VERSION;
else conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION;
fi
- source activate testenv
- pip install --upgrade pip
- python --version
- pip --version
- if [ $TRAVIS_OS_NAME = 'linux' ]; then locate pyconfig.h; fi
- mkdir -p $HOME/.local/share/pysap
- git clone https://github.com/CEA-COSMIC/pysap-data.git $HOME/.local/share/pysap/pysap-data
- ln -s $HOME/.local/share/pysap/pysap-data/pysap-data/* $HOME/.local/share/pysap
- rm $HOME/.local/share/pysap/__init__.py
- ls -l $HOME/.local/share/pysap
- pip install cython numpy
- if [ $TRAVIS_OS_NAME = 'linux' ]; then pip install git+https://github.com/ghisvail/pyNFFT.git; fi
- pip install nose nose-exclude coverage coveralls pycodestyle
- pip install -b $TRAVIS_BUILD_DIR/build -t $TRAVIS_BUILD_DIR/install --no-clean --no-deps .
- ls $TRAVIS_BUILD_DIR/install
- if [ $TRAVIS_OS_NAME = 'osx' ];
then otool -L $TRAVIS_BUILD_DIR/install/pysparse.so;
else ldd $TRAVIS_BUILD_DIR/install/pysparse.so;
fi
- export PYTHONPATH=$TRAVIS_BUILD_DIR/install:$PYTHONPATH
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then pip install "astropy<4.0" "matplotlib<3.0.3"; fi
script:
- python setup.py nosetests
- pycodestyle pysap --ignore="E121,E123,E126,E226,E24,E704,E402,E731,E722,E741,W503,W504,W605"
- pycodestyle examples --ignore="E121,E123,E126,E226,E24,E704,E402,E731,E741,W503,W504,W605"
after_success:
- coveralls