-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
39 lines (31 loc) · 1 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
# Set the build language to Python
language: python
os:
- linux
dist:
- xenial
matrix:
include:
- os: osx
language: generic
# Disable sudo to speed up the build.
sudo: false
# Set the python versions.
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install llvm && brew install libomp; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -s /usr/local/opt/llvm/bin/clang /usr/local/bin/clang-omp; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CPP=/usr/local/opt/llvm/bin/clang && export CPPFLAGS="-I/usr/local/opt/llvm/include -Xpreprocessor -fopenmp -lomp" && export LDFLAGS="-L/usr/local/opt/llvm/lib"; fi
install:
- pip install -r requirements.txt
- python setup.py install
- pip install coverage
# Run the unit test
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then nosetests -v --with-coverage --cover-tests --cover-package=tests; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python setup.py test; fi