forked from G-Node/nixpy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
90 lines (82 loc) · 1.93 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
sudo: required
dist: trusty
language: python
env:
global:
- NIX_BRANCH=master
matrix:
include:
- python: "2.7"
os: linux
env: pymajor=2
- python: "3.6"
os: linux
env: pymajor=3
- python: "3.7"
os: linux
env: pymajor=3 coverage=1
dist: xenial
sudo: true
- language: generic
os: osx
env: pymajor=2
addons:
homebrew:
packages:
- python2
- cmake
- cppunit
- hdf5
- numpy
update: true
- language: generic
os: osx
env: pymajor=3
addons:
homebrew:
packages:
- python3
- cmake
- cppunit
- hdf5
- numpy
update: true
addons:
apt:
packages:
- cmake
- libcppunit-dev
- libhdf5-serial-dev
- libboost-all-dev
before_install:
- nixprefix="/usr/local"
- export NIX_INCDIR=${nixprefix}/include/nixio-1.0
- export NIX_LIBDIR=${nixprefix}/lib
- export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${nixprefix}/lib/pkgconfig
# For macOS python3
- export PATH="/usr/local/opt/[email protected]/bin:$PATH"
- alias pip2='pip'
- if [[ "${TRAVIS_OS_NAME}" != "osx" ]]; then pip${pymajor} install --upgrade numpy; fi
- pip${pymajor} install --upgrade h5py pytest pytest-xdist pytest-cov six;
- if [[ "${pymajor}" == 2 ]]; then pip${pymajor} install enum34; fi
- git clone --branch ${NIX_BRANCH} https://github.com/G-Node/nix /tmp/libnix
- pushd /tmp/libnix
- mkdir build
- pushd build
- cmake -DCMAKE_INSTALL_PREFIX=${nixprefix} ..
- make
- sudo make install
- popd
- popd
- which pip${pymajor}
- which python${pymajor}
- python${pymajor} --version
install:
- python${pymajor} setup.py build
script:
- pytest --cov=nixio --nix-compat -nauto;
after_success:
- if [[ "${coverage}" == 1 ]]; then
pip install codecov;
codecov;
fi