forked from panoptes/POCS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
94 lines (89 loc) · 3.08 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
dist: xenial
sudo: required
language: python
services:
- mongodb
python:
- "3.6"
env:
- PANDIR=$HOME POCS=$TRAVIS_BUILD_DIR PANUSER=$USER ARDUINO_VERSION=1.8.1
before_install:
- mkdir -p $PANDIR/logs
- mkdir -p $PANDIR/astrometry/data
- ln -s $POCS $PANDIR/POCS
- pip install -U pip
- pip install coveralls
# Install arudino files
- cd $PANDIR
- export DISPLAY=:1.0
- export
- wget http://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz
- tar xf arduino-${ARDUINO_VERSION}-linux64.tar.xz
- sudo mv arduino-${ARDUINO_VERSION} /usr/local/share/arduino
- sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino
# Install miniconda
- 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:$PANDIR/astrometry/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a # Useful for debugging any issues with conda
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- conda install numpy scipy
# Install astrometry.net
- wget https://github.com/dstndstn/astrometry.net/releases/download/0.78/astrometry.net-0.78.tar.gz
- tar zxvf astrometry.net-0.78.tar.gz && cd astrometry.net-0.78
- make && make py && make install INSTALL_DIR=$PANDIR/astrometry
- echo 'add_path $PANDIR/astrometry/data' | sudo tee --append $PANDIR/astrometry/etc/astrometry.cfg
addons:
apt:
packages:
- gphoto2
- libcairo2-dev
- libnetpbm10-dev
- netpbm
- libpng12-dev
- libjpeg-dev
- python-numpy
- python-pyfits
- python-dev
- zlib1g-dev
- libbz2-dev
- swig
- libcfitsio-bin
- libcfitsio-dev
install:
- cd $PANDIR
# install POCS and requirements
- cd $POCS
- pip install -r requirements.txt
- pip install -r docs/requirements.txt
- pip install -e .
# Force creation of config file.
- python -c "import astroplan"
# Custom IERS urls in config file.
- |
echo "\
[utils.iers.iers]
iers_auto_url = https://storage.googleapis.com/panoptes-resources/iers/ser7.dat
iers_auto_url_mirror = https://storage.googleapis.com/panoptes-resources/iers/ser7.dat
" >> $HOME/.astropy/config/astropy.cfg
# Download IERS and astroetry.net files.
- python pocs/utils/data.py --folder $PANDIR/astrometry/data
script:
- export BOARD="arduino:avr:micro"
- arduino --verify --board $BOARD resources/arduino_files/camera_board/camera_board.ino
- arduino --verify --board $BOARD resources/arduino_files/power_board/power_board.ino
- arduino --verify --board $BOARD resources/arduino_files/telemetry_board/telemetry_board.ino
- export PYTHONPATH="$PYTHONPATH:$POCS/scripts/coverage"
- export COVERAGE_PROCESS_START=.coveragerc
- coverage run $(which pytest) -v --test-databases all
- coverage combine
cache:
pip: true
directories:
- $PANDIR/astrometry/
after_success:
- bash <(curl -s https://codecov.io/bash)