-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
99 lines (95 loc) · 3.06 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
91
92
93
94
95
96
97
98
99
# Use new trusty images, should yield newer compilers and packages
sudo: required
dist: trusty
# safelist
branches:
only:
- master
- spyJac
# language & environment and matrix spec
language: python
matrix:
include:
- python: "3.6"
env: PYJAC_TEST_LANGS="opencl"
- python: "3.6"
env: PYJAC_TEST_LANGS="c"
- python: "3.6"
env: PYJAC_TEST_LANGS="c" PYJAC_RXN_SORTING="simd"
- python: "3.6"
env: PYJAC_TEST_LANGS="opencl" RUN_LONG_TESTS="1"
- python: "3.6"
env: PYJAC_TEST_LANGS="opencl" RUN_LONG_TESTS="1" PYJAC_UNIQUE_POINTERS="1"
- python: "3.6"
env: PYJAC_TEST_LANGS="c" RUN_LONG_TESTS="1"
- python: "3.6"
env: PYJAC_TEST_LANGS="c" RUN_LONG_TESTS="1" PYJAC_UNIQUE_POINTERS="1"
- python: "3.6"
env: ISFLAKE="1"
# additional packages
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- python-dev
- python-numpy
- python-pip
- python3-dev
- python3-numpy
- python3-setuptools
- libsundials-serial-dev
- liblapack-dev
- libblas-dev
- libboost-dev
# install dependencies
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libltdl3-dev libhwloc-dev
# get conda
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-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
# Useful for debugging any issues with conda
- conda info -a
# add channels
- conda config --add channels conda-forge
- conda config --add channels cantera
# create env
- conda create -y -n test-environment python=$TRAVIS_PYTHON_VERSION llvmdev clangdev cantera ocl-icd=*=h14c3975_1001 islpy pyyaml scipy pyopencl numpy Cython pytables flake8 pep8-naming pocl adept=*=he6fcbdd_3
- source activate test-environment
# get vendor dir
- export OCL_ICD_VENDORS=$CONDA_PREFIX/etc/OpenCL/vendors
# and go back to pyjac
- cd $TRAVIS_BUILD_DIR
# install pyjac
install:
# read from requirements -- install via conda if available
- pip install -r requirements.txt
- pip install -r optional-requirements.txt
# build siteconf.py
- python configure.py --cl-inc-dir="$CONDA_PREFIX/include" --cl-lib-dir="$CONDA_PREFIX/lib" --adept-lib-dir="$CONDA_PREFIX/lib" --adept-inc-dir="$CONDA_PREFIX/include"
# copy in siteconf
- cp siteconf.py pyjac/
- pip install .
before_script:
# openmp
- export OMP_NUM_THREADS=4
- mkdir -p $TRAVIS_BUILD_DIR/working/
- export TMPDIR=$TRAVIS_BUILD_DIR/working/
# run test
script:
if [[ -z "$ISFLAKE" && -z "$RUN_LONG_TESTS" ]]; then
nosetests -A 'not fullkernel and not verylong' -s --with-timer;
elif [[ -z "$ISFLAKE" && -n "$RUN_LONG_TESTS" ]]; then
nosetests -A 'fullkernel' -s --with-timer;
else
python -m flake8 pyjac/ --count;
fi