forked from CompPhysVienna/n2p2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (99 loc) · 2.67 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
dist: bionic
sudo: false
language: python
python:
- "3.6"
branches:
only:
# Build all branches (but not gh-pages)
- /.*/
#- master
addons:
apt:
packages:
########
# DOCS #
########
# Use default doxygen (1.8.11) on "xenial" (The doxygen version on "trusty" was too old (1.8.6)).
- doxygen
# Generating graphs with doxygen requires dot.
- graphviz
# Generating formulae with doxygen requires latex and dvips.
- texlive-latex-base
# Generating formulae with doxygen requires gs.
- ghostscript
#########
# BUILD #
#########
# MPI
- openmpi-bin
- libopenmpi-dev
# BLAS
- libblas3
- libblas-dev
# Eigen library
- libeigen3-dev
# GSL library
- libgsl-dev
#########
# TESTS #
#########
# Boost Test for C++ testing
- libboost-test-dev
# Boost Filesytem for C++ testing
- libboost-filesystem-dev
# Coverage for C++
- lcov
before_install:
# Set doxygen environment variables.
#- export DOXYGEN_VER=1_8_14
#- export DOXYGEN_TAR=https://github.com/doxygen/doxygen/archive/Release_${DOXYGEN_VER}.tar.gz
#- export DOXYGEN_DIR=doxygen-Release_${DOXYGEN_VER}
install:
- pip install sphinx
- pip install sphinx_rtd_theme
- pip install breathe
#- pip install exhale
- pip install cython
- pip install pytest
- pip install pytest-cov
- pip install coverage==4.5.4
before_script:
# Remember directory.
- export REPO_DIR=$(pwd)
# Need to manually compile doxygen.
#- wget -O - ${DOXYGEN_TAR} | tar -xz -C ${TMPDIR-/tmp}
#- cd ${TMPDIR-/tmp}/${DOXYGEN_DIR} && mkdir build && cd build && cmake -G "Unix Makefiles" .. && make
#- export PATH="${TMPDIR-/tmp}/${DOXYGEN_DIR}/build/bin:$PATH"
script:
- cd ${REPO_DIR}
- cd src
# C++ build and tests
- make MODE=test -j
- make doc
- make MODE=test lammps-nnp
# Prevent GitHub Jekyll to interfere with Sphinx theme.
- touch ../doc/sphinx/html/.nojekyll
- cd ../test/
- make cpp
- cd cpp
- make coverage
# Python build and tests
- cd ../../src/
- make pynnp MODE=test
- cd ../test/
- make python
after_success:
- cd ${REPO_DIR}/test/cpp/ && rm *.gcda *.gcno
- cd ${REPO_DIR}
- bash <(curl -s https://codecov.io/bash) -f ${REPO_DIR}/test/cpp/tests.info -F cpp -c || echo "Codecov did not collect coverage reports"
- cd ${REPO_DIR}/test/python/
- bash <(curl -s https://codecov.io/bash) -F python -c || echo "Codecov did not collect coverage reports"
deploy:
provider: pages
skip_cleanup: true
local_dir: doc/sphinx/html
github_token: $GH_REPO_TOKEN
on:
all_branches: true
#branch: master