Skip to content

Commit

Permalink
add doxy generation to travis (QC-148) (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barthelemy authored May 28, 2019
1 parent d00fd47 commit 2212b2e
Showing 1 changed file with 39 additions and 10 deletions.
49 changes: 39 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,47 @@ matrix:
packages:
- clang-format-7
compiler: clang
- os: linux
if: branch = master
dist: xenial
env: TOOL=docs
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_API_TOKEN
local_dir: build/doc/html
on:
branch: master
script:
- if [[ $TOOL == "clang-format" ]] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
cd $TRAVIS_BUILD_DIR;
BASE_COMMIT=$(git rev-parse $TRAVIS_BRANCH);
COMMIT_FILES=$(git diff --name-only $BASE_COMMIT | grep -i -v LinkDef);
RESULT_OUTPUT="$(git-clang-format-7 --commit $BASE_COMMIT --diff --binary `which clang-format-7` $COMMIT_FILES)";
if [ "$RESULT_OUTPUT" == "no modified files to format" ] || [ "$RESULT_OUTPUT" == "clang-format did not modify any files" ] ; then
exit 0;
else
echo "$RESULT_OUTPUT";
exit 1;
fi
cd $TRAVIS_BUILD_DIR;
BASE_COMMIT=$(git rev-parse $TRAVIS_BRANCH);
COMMIT_FILES=$(git diff --name-only $BASE_COMMIT | grep -i -v LinkDef);
RESULT_OUTPUT="$(git-clang-format-7 --commit $BASE_COMMIT --diff --binary `which clang-format-7` $COMMIT_FILES)";
if [ "$RESULT_OUTPUT" == "no modified files to format" ] || [ "$RESULT_OUTPUT" == "clang-format did not modify any files" ] ; then
exit 0;
else
echo "$RESULT_OUTPUT";
exit 1;
fi
fi
- if [[ $TOOL == "docs" ]]; then
echo "add_subdirectory(doc)" > CMakeLists.txt;
mkdir build;
cd build;
cmake ..;
make doc;
fi
notifications:
email: false

0 comments on commit 2212b2e

Please sign in to comment.