forked from klauer/recordwhat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
81 lines (65 loc) · 2.52 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
language: python
sudo: required
dist: trusty
services:
- docker
cache:
directories:
- $HOME/.cache/pip
matrix:
include:
- python: 3.6
before_install:
- export DOCKER0_IP=$(/sbin/ifconfig docker0 |grep 'inet addr' | sed -e 's/.*addr:\([^ ]*\).*/\1/')
- export EPICS_CA_ADDR_LIST=$( echo $DOCKER0_IP | sed -e 's/^\([0-9]\+\)\.\([0-9]\+\)\..*$/\1.\2.255.255/' )
- export EPICS_CA_AUTO_ADDR_LIST="no"
- export EPICS_CA_MAX_ARRAY_BYTES=10000000
- export DOCKERIMAGE="klauer/epics-docker"
- export CONDA_ENV="testenv"
- export NOLIBCA=1
- perl --version
- docker pull ${DOCKERIMAGE}
- docker images
- docker run -d -p $DOCKER0_IP:5064:5064/tcp -p $DOCKER0_IP:5065:5065/udp --name epics_iocs ${DOCKERIMAGE}
- docker ps -a
# INSTALL CONDA
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- "./miniconda.sh -b -p $HOME/mc"
- env
- export PATH=$HOME/mc/bin:$PATH
- conda config --set always_yes true
- conda update conda --yes
- conda install conda-build anaconda-client jinja2
- conda config --add channels lightsource2-tag
- conda config --add channels lightsource2
- conda config --add channels conda-forge
- conda config --add channels soft-matter
- conda create -n $CONDA_ENV python=$TRAVIS_PYTHON_VERSION
- source activate $CONDA_ENV
install:
- "NOLIBCA=1 pip install --no-binary :all: pyepics"
- conda install epics-base
- pip install pytest pytest-cov codecov graphviz pygraphviz parsimonious attrs networkx prettytable pandas numpy ipython
- 'pip install https://github.com/NSLS-II/ophyd/zipball/master#egg=ophyd'
# _really_, pyepics, we don't want your binaries...
- rm -rf $HOME/mc/envs/$CONDA_ENV/lib/python*/site-packages/epics/clibs/linux*
- python setup.py develop
- export PATH=$PATH:$EPICS_BASE/bin/$EPICS_HOST_ARCH
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$EPICS_BASE/lib/$EPICS_HOST_ARCH"
- echo "PATH=$PATH"
script:
- echo "Checking if the motor IOC is running:"
- caget XF:31IDA-OP{Tbl-Ax:X1}Mtr
- echo "Checking if the areaDetector IOC is running:"
- caget XF:31IDA-BI{Cam:Tbl}ROI1:ArrayCounter
# check pyepics
# - export PYEPICS_LIBCA=$EPICS_BASE/lib/$EPICS_HOST_ARCH/libca.so
- python -c "import epics; print(epics.__version__)"
- python -c "import epics.ca; print(epics.ca.find_libca())"
- python -c "import epics; print(epics.caget('XF:31IDA-OP{Tbl-Ax:X1}Mtr'))"
# running tests
- py.test -v --cov=recordwhat --cov-report term-missing
after_success:
- env
- codecov