forked from clab/dynet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
90 lines (82 loc) · 2.69 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
82
83
84
85
86
87
88
89
90
language: cpp
matrix:
include:
- os: linux
compiler: gcc
env: CXX=g++-4.8 CC=gcc-4.8 PYVER=3.4 PYNUM=3 PYTHON=python CONDA_PACKAGES="numpy cython"
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- boost-latest
packages:
- gcc-4.8
- g++-4.8
- libboost-filesystem1.55-dev
- libboost-program-options1.55-dev
- libboost-serialization1.55-dev
- libboost-test1.55-dev
- libboost-regex1.55-dev
- os: linux
compiler: gcc
env: CXX=g++-4.8 CC=gcc-4.8 PYVER=2.7 PYNUM=2 PYTHON=python CONDA_PACKAGES="numpy cython"
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- boost-latest
packages:
- gcc-4.8
- g++-4.8
- libboost-filesystem1.55-dev
- libboost-program-options1.55-dev
- libboost-serialization1.55-dev
- libboost-test1.55-dev
- libboost-regex1.55-dev
- os: osx
compiler: clang
env: PYTHON=python PYVER=3.4 PYNUM=3 CONDA_PACKAGES="numpy cython"
- os: osx
compiler: clang
env: PYTHON=python PYVER=2.7 PYNUM=2 CONDA_PACKAGES="numpy cython"
before_install:
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda$PYNUM-latest-Linux-x86_64.sh -O miniconda.sh;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda$PYNUM-latest-MacOSX-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
# Useful for debugging any issues with conda
- conda info -a
install:
- hg clone https://bitbucket.org/eigen/eigen/ -r 346ecdb
- cd eigen
- mkdir build && cd build
- cmake ..
- sudo make install
- cd ../..
before_script:
- cd $TRAVIS_BUILD_DIR
- mkdir build
- cd build
- conda create -q -n dynet-environment python=$PYVER $CONDA_PACKAGES
- source activate dynet-environment
- cmake .. -DEIGEN3_INCLUDE_DIR=/usr/local/include/eigen3 -DPYTHON=`which python`
after_failure:
- cat $TRAVIS_BUILD_DIR/build/CMakeFiles/CMakeError.log
script:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then make -j$(nproc); fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then make -j$(sysctl -n hw.ncpu); fi
- make test
- cd python
- python setup.py install --user
- cd ../../tests/python
- python test.py