Skip to content

Commit

Permalink
Run the docs in CI again
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarex authored and Patrick Niklaus committed May 2, 2017
1 parent 2cf6010 commit 1aea100
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,22 @@ matrix:

# Debug Builds
- os: linux
compiler: "format-taginfo"
compiler: "format-taginfo-docs"
env: NODE=6
sudo: false
before_install:
install:
- source $NVM_DIR/nvm.sh
- nvm install $NODE
- nvm use $NODE
- npm --version
- npm install --ignore-scripts
- npm link --ignore-scripts
script:
- ${MASON} install clang-format 3.8.1 && PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh
- ${MASON} install clang-format 3.8.1
- PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh
- ./scripts/check_taginfo.py taginfo.json profiles/car.lua
- npm run docs && ./scripts/error_on_dirty.sh
after_success:

- os: linux
Expand Down Expand Up @@ -332,8 +341,6 @@ install:
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
- make --jobs=${JOBS}
- popd
# building docs only works with npm3+ not with yarn or npm2
#- yarn run docs

script:
- if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi
Expand Down
16 changes: 16 additions & 0 deletions scripts/error_on_dirty.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -o errexit
set -o pipefail
set -o nounset

MSG="The following files have been modified:"
dirty=$(git ls-files --modified)

if [[ $dirty ]]; then
echo $MSG
echo $dirty
exit 1
else
exit 0
fi
11 changes: 0 additions & 11 deletions scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,3 @@ fi

find src include unit_tests example -type f -name '*.hpp' -o -name '*.cpp' \
| xargs -I{} -P ${NPROC} ${CLANG_FORMAT} -i -style=file {}


dirty=$(git ls-files --modified)

if [[ $dirty ]]; then
echo "The following files do not adhere to the .clang-format style file:"
echo $dirty
exit 1
else
exit 0
fi

0 comments on commit 1aea100

Please sign in to comment.