forked from losonczylab/sima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (67 loc) · 2.65 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
language: python
python:
- "2.7"
# command to install dependencies
# install: "pip install -r requirements.txt"
# command to run tests
env:
- TESTMODE=full
COVERAGE=--coverage
before_install:
- uname -a
- free -m
- df -h
- ulimit -a
- sudo apt-get update -qq
- sudo apt-get install -qq libatlas-dev libatlas-base-dev liblapack-dev gfortran python-libtiff
# install OpenCV
- sudo apt-get install -qq libopencv-dev python-dev unzip
- sudo apt-get install -qq build-essential checkinstall cmake
- wget -O opencv-2.4.9.zip http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download
- unzip opencv-2.4.9.zip
- cd opencv-2.4.9/
- mkdir build
- cd build
- cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_ZLIB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON ..
- make -j2
- sudo make -j2 install
- sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
- sudo ldconfig
- cd ../..
- sudo rm -r opencv*
# done installing OpenCV
- sudo cp /usr/lib/x86_64-linux-gnu/libm.so /usr/lib/x86_64-linux-gnu/libm.so.6
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-3.7.0-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh -O miniconda.sh;
fi
- 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
- conda info -a
- deps='pip numpy>=1.8 scipy>=0.13 nose shapely h5py cython scikit-image pep8 flake8 scikit-learn sphinx numpydoc pandas'
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION $deps
- source activate test-environment
- pip install sphinxcontrib-napoleon
- if [ "${TESTMODE}" == "full" ]; then pip install coverage coveralls; fi
- python -V
- python -c "import h5py; print h5py.__file__"
- echo $PATH
- cp /usr/lib/x86_64-linux-gnu/libm.so /home/travis/miniconda/envs/test-environment/bin/../lib/libm.so.6
- cp /usr/local/lib/python2.7/site-packages/cv* /home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/
- ldconfig -p
- python -c "import cv2; print cv2.__version__; print cv2.__file__"
script:
- flake8 *.py sima --exclude sima/misc/tifffile.py,sima/__init__.py,test*.py,sima/misc/align.py,sima/motion/__init__.py
- python runtests.py --doctests -m $TESTMODE $COVERAGE
- cd doc && make html && cd ..
branches:
only:
- master
- 0.2.x
- 0.3.x
after_success:
- if [ "${TESTMODE}" == "full" ]; then cp build/test/.coverage . && coveralls; fi