/
.travis.yml
75 lines (66 loc) · 1.72 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
language: generic
sudo: false
matrix:
include:
- os: linux
env:
- PYTHON_VER='3.7'
- CONDA_PLATFORM='Linux'
- COMPILERS='gcc_linux-64 gxx_linux-64'
- os: linux
env:
- PYTHON_VER='3.8'
- CONDA_PLATFORM='Linux'
- COMPILERS='gcc_linux-64 gxx_linux-64'
- os: osx
env:
- PYTHON_VER='3.7'
- CONDA_PLATFORM='MacOSX'
- COMPILERS='clang_osx-64 clangxx_osx-64
- os: osx
env:
- PYTHON_VER='3.8'
- CONDA_PLATFORM='MacOSX'
- COMPILERS='clang_osx-64 clangxx_osx-64'
install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-${CONDA_PLATFORM}-x86_64.sh -O miniconda.sh;
- 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
- conda info -a
- conda create -n pnab -c conda-forge python=$PYTHON_VER numpy cmake
${COMPILERS} openbabel eigen pybind11 pyyaml
pytest pytest-cov codecov
- source activate pnab
- conda list
before_script:
- python -V
script:
- pwd
- PREFIX=$CONDA_PREFIX
- SRC_DIR=./
- PY_ABBR="python${PYTHON_VER}m"
- SP_DIR=$PREFIX/lib/python${PYTHON_VER}/site-packages
- ${PREFIX}/bin/cmake
-H${SRC_DIR}
-Bbuild
-DCMAKE_BUILD_TYPE=Release
-DPYTHON_EXECUTABLE="${PREFIX}/bin/python"
-DPYTHON_LIBRARY="${PREFIX}/lib/lib${PY_ABBR}${SHLIB_EXT}"
-DPYTHON_INCLUDE_DIR="${PREFIX}/include/${PY_ABBR}"
-DOPENBABEL_DIR="${PREFIX}"
- cd build
- make
- cp bind.*so ../pnab
- cd ..
- cp -R pnab ${SP_DIR}
- cp build/bind.*.so ${SP_DIR}/pnab
- ls -l ${SP_DIR}/pnab
- mv tests/* pnab
- pytest -s --cov
notifications:
email: false
after_success:
- codecov