-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (44 loc) · 1.66 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
sudo: false
# dist: trusty
language: python
python:
- 2.7
branches:
only:
- master
before_install:
- if [[ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p /home/travis/mc
- export PATH=/home/travis/mc/bin:$PATH
- git clone https://github.com/yxqd/dotmantid ~/.mantid
install:
- export GIT_FULL_HASH=`git rev-parse HEAD`
- export GIT_VER=`git describe --tags`
- export VERSION=`python -c "print '$GIT_VER'.split('-')[0][1:]"`
- echo ${TRAVIS_PYTHON_VERSION}
- conda config --set always_yes true
- conda update conda
- conda config --add channels conda-forge
- conda config --add channels diffpy
- conda config --add channels mantid
- conda config --add channels mcvine
- conda install -n root conda-build
- conda create -n testenv python=$TRAVIS_PYTHON_VERSION anaconda-client pytest
- source activate testenv
- conda config --set anaconda_upload no
- conda install -c mcvine/label/unstable mcvine-core
- conda install tqdm multiphonon periodictable
- export SRC=$PWD
- export EXPORT_ROOT=$CONDA_PREFIX
- export MCVINE_PHONON_BLD_ROOT=$SRC/build
- mkdir -p $MCVINE_PHONON_BLD_ROOT && cd $MCVINE_PHONON_BLD_ROOT
- cmake -DCMAKE_INSTALL_PREFIX=$EXPORT_ROOT -DPYTHON_LIBRARY=$CONDA_PREFIX/lib/libpython2.7.so -DPYTHON_INCLUDE_DIR=$CONDA_PREFIX/include/python2.7 $SRC
- make install
- cd -
script:
- cd tests && py.test -s
notifications:
email:
on_success: change
on_failure: always