-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
134 lines (120 loc) · 3.58 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# After changing this file, check it on:
# http://lint.travis-ci.org/
language: cpp
# Run jobs on container-based infrastructure, can be overridden per job
sudo: false
# We do not work on the "trusty" container yet
dist: precise
matrix:
include:
- os: linux
compiler: clang
addons: &1
apt:
sources:
- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- liblapack-dev
- clang-3.6
env:
- CXX_COMPILER='clang++-3.6'
- PYTHON_VER='3.6'
- C_COMPILER='clang-3.6'
- GCOV=''
- os: linux
compiler: gcc
addons: &3
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- liblapack-dev
- g++-4.9
- gcc-4.9
env:
- CXX_COMPILER='g++-4.9'
- PYTHON_VER='3.7'
- C_COMPILER='gcc-4.9'
- GCOV='gcov-4.9'
- os: linux
compiler: gcc
addons: &4
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- liblapack-dev
- g++-6
- gcc-6
env:
- CXX_COMPILER='g++-6'
- PYTHON_VER='3.6'
- C_COMPILER='gcc-6'
- GCOV='gcov-6'
- os: linux
compiler: gcc
addons: &5
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- liblapack-dev
- g++-6
- gcc-6
env:
- CXX_COMPILER='g++-6'
- PYTHON_VER='3.7'
- C_COMPILER='gcc-6'
- GCOV='gcov-6'
before_install:
- uname -a
- free -m
- df -h
- ulimit -a
- source devtools/travis-ci/before_install.sh
- conda info -a
install:
# Build out environment
- python devtools/scripts/conda_env.py -n=tenv -p=$PYTHON_VER devtools/conda-envs/base.yaml
- source activate tenv
- conda list
before_script:
- python -V
- cd ${TRAVIS_BUILD_DIR}
- ${C_COMPILER} --version
- ${CXX_COMPILER} --version
- >
cmake -Bbuild -H.
-DCMAKE_CXX_COMPILER=${CXX_COMPILER}
-DCMAKE_CXX_FLAGS="--coverage"
-DCOVERAGE_COMMAND=$GCOV
-DCMAKE_C_COMPILER=${C_COMPILER}
-DCMAKE_BUILD_TYPE=Release
-DPYTHON_EXECUTABLE="${CONDA_PREFIX}/bin/python"
-DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/Install
-DCMAKE_DISABLE_FIND_PACKAGE_libefp=ON
- cd build
- make -j2
- make install
script:
# test and codecov build
- conda install ci-psi4 psi4 -c psi4/label/dev # interferes with build if earlier
- PYTHONPATH=stage/lib/ pytest -rws --cov-report term-missing --cov=stage/lib/ ../tests/
- test "${GCOV}" = "" || bash <(curl -s https://codecov.io/bash) -x ${GCOV} || echo 'Codecov failed to upload'
# test install
- cd .. && rm -rf pylibefp
- export PYTHONPATH=${TRAVIS_BUILD_DIR}/Install/lib/:$PYTHONPATH
- python -c "import pylibefp; print(pylibefp.__version__)"
#- python -c "import sys, pylibefp; sys.exit(pylibefp.test(extras=['-k', 'not qmefp', '--cov']))"
# works but overcomplicated
#- make pytest VERBOSE=1
##- PYTHONPATH=stage/usr/local/pylibefp/lib/ pytest -v --cov --ignore=external ../tests/
##- cd ../tests && PYTHONPATH=../build/stage/usr/local/pylibefp/lib/ python -m pytest -v --ignore=../build/external --cov
#- cd ${TRAVIS_BUILD_DIR}/build/tests && PYTHONPATH=${TRAVIS_BUILD_DIR}/build/stage/${TRAVIS_BUILD_DIR}/Install/lib/ /home/travis/miniconda/envs/tenv/bin/python -m pytest -rws -v --capture=sys ${TRAVIS_BUILD_DIR}/tests --ignore=${TRAVIS_BUILD_DIR}/build/external --cov
notifications:
email: false