forked from tango-controls/pytango
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (51 loc) · 1.78 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
sudo: false
language: python
os: linux
branches:
only:
- master
- develop
python:
- 2.7
- 3.4
- 3.5
cache:
directories:
- ./miniconda # Conda environment
- ./.eggs # pytest eggs
- ./build # Build environment
- ./cached_ext # Previous extension
before_install:
# Add conda to path
- export PATH="$PWD/miniconda/bin:$PATH"
# Install miniconda if not in cache
- conda -V || wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- conda -V || bash miniconda.sh -b -p ./miniconda -f
# Update conda
- conda update --yes conda
# Create build environment if it doesn't exist
- source activate buildenv || conda create --yes --name buildenv python=$TRAVIS_PYTHON_VERSION
# Activate build environment
- source activate buildenv
install:
# Install build dependencies
- conda install --yes boost
- conda install --yes -c vxgmichel tango=9.2.2
- conda install --yes numpy # Not a strong requirement yet
# Use conda prefix as root for the dependencies
- export BOOST_ROOT=$CONDA_PREFIX TANGO_ROOT=$CONDA_PREFIX ZMQ_ROOT=$CONDA_PREFIX OMNI_ROOT=$CONDA_PREFIX
# Uncomment the following line if the tests are running in parrallel
# with pytest-xdist (see https://github.com/pytest-dev/pytest-xdist/issues/41):
# - pip install -U pytest pytest-xdist six mock
before_script:
# Make sure old_ext exists
- mkdir -p cached_ext
# Touch the .so files if the extension hasn't changed
- diff cached_ext ext && find build -name _tango*.so -printf "touching %p\n" -exec touch {} + || true
script:
# Build the package
- python setup.py build
# The build directory has been updated, cached_ext needs to be synchronized too
- rsync -a --delete ext/ cached_ext/
# Run the tests
- python setup.py test