forked from elaird/supy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
62 lines (47 loc) · 2.13 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
# travis-ci.org build & test configuration
language: python
python:
- "2.7"
# - "3.2"
env:
- ROOT=5.34.05
- ROOT=5.32.04
install:
# Check if we are running Python 2 or 3. This is needed for the apt-get package names
- if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then export PYTHON_SUFFIX="3"; fi
# # This is needed for the docs
# - git submodule init
# - git submodule update
# Use system python, not virtualenv, because building the dependencies from source takes too long
- deactivate # the virtualenv
# Needed because sometimes travis' repositories get out of date
- time sudo apt-get update -qq
# Install the dependencies we need
# - time sudo apt-get install -qq python${PYTHON_SUFFIX}-numpy python${PYTHON_SUFFIX}-sphinx python${PYTHON_SUFFIX}-nose
- time sudo apt-get install -qq python${PYTHON_SUFFIX}-numpy
# # matplotlib and PyTables are not available for Python 3 as packages from the main repo yet.
# - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then time sudo apt-get install -qq python${PYTHON_SUFFIX}-matplotlib python${PYTHON_SUFFIX}-tables; fi
# Install a ROOT binary that we custom-built in a 64-bit Ubuntu VM
# for the correct Python / ROOT version
- time wget --no-check-certificate https://dl.dropbox.com/u/4923986/rootpy/64/root_v${ROOT}_Python_${TRAVIS_PYTHON_VERSION}.tar.gz
- time tar zxf root_v${ROOT}_Python_${TRAVIS_PYTHON_VERSION}.tar.gz
- source root_v${ROOT}_Python_${TRAVIS_PYTHON_VERSION}/bin/thisroot.sh
# add supy to pythonpath
- PYTHONPATH=$PYTHONPATH:`pwd`/..
- PATH=$PATH:`pwd`/bin
script:
# Check if root and PyROOT work ok
- time root -l -q
- time python -c 'import ROOT; ROOT.TBrowser()'
# Check that rootpy can be imported
- time python -c 'import supy'
# What if ROOT already been initialized
- time python -c "from ROOT import kTRUE; import supy"
# Give user write access to shared memory to make multiprocessing semaphares work
# https://github.com/rootpy/rootpy/pull/176#issuecomment-13712313
- ls -la /dev/shm
- sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm
#- sudo chmod a+w /dev/shm
- ls -la /dev/shm
# Now run the tests
- supy-test