forked from mit-crpg/OpenMOC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (54 loc) · 1.71 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
language: python
python:
- "2.7"
- "3.4"
addons:
apt:
packages:
- swig
env:
global:
- COVERALLS_PARALLEL=true
cache:
directories:
notifications:
webhooks: https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN
before_install:
# ========== Point apt-get to C++11-compatible compiler ==========
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
# ============== Handle Python third-party packages ==============
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-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
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy h5py pandas matplotlib pillow
- source activate test-environment
- pip install coverage
- pip install cpp-coveralls
- pip install coveralls
install:
# ================= Get C++11-compatible compiler ==================
- sudo apt-get install -qq gcc-4.8 g++-4.8
- sudo apt-get install swig
- sudo rm /usr/bin/gcc
- sudo rm /usr/bin/g++
- sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
- sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++
script:
- cd tests
- ./travis.sh
after_success:
- cd ..
- cpp-coveralls -i src -i build/temp.linux*/src/ --exclude-pattern "/usr/*" --dump cpp_cov.json
- cd tests
# Switch to Python version, which can merge reports
- coveralls --merge=../cpp_cov.json
- cd ..