Run header guards check at the start of the CI script

This commit is contained in:
heinrich5991 2018-07-08 19:41:22 +02:00
parent 6381a33344
commit 1abe6b0a0b
3 changed files with 5 additions and 4 deletions

View file

@ -11,6 +11,7 @@ addons:
- libgtest-dev - libgtest-dev
- libsdl2-dev - libsdl2-dev
script: script:
- python scripts/check_header_guards.py
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_EXTRA_ARGS="-DDOWNLOAD_GTEST=ON"; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_EXTRA_ARGS="-DDOWNLOAD_GTEST=ON"; fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then CMAKE_EXTRA_ARGS="-DGTEST_LIBRARY=../gtest_build/libgtest.a -DGTEST_MAIN_LIBRARY=../gtest_build/libgtest_main.a"; mkdir gtest_build; cmake -E chdir gtest_build cmake /usr/src/gtest; cmake --build gtest_build; fi - if [ "$TRAVIS_OS_NAME" != "osx" ]; then CMAKE_EXTRA_ARGS="-DGTEST_LIBRARY=../gtest_build/libgtest.a -DGTEST_MAIN_LIBRARY=../gtest_build/libgtest_main.a"; mkdir gtest_build; cmake -E chdir gtest_build cmake /usr/src/gtest; cmake --build gtest_build; fi
- mkdir build; cd build - mkdir build; cd build
@ -23,7 +24,6 @@ script:
- make run_tests - make run_tests
- cd .. - cd ..
- build/DDNet-Server shutdown - build/DDNet-Server shutdown
- python scripts/check_header_guards.py
env: env:
global: global:
- CFLAGS="-Wdeclaration-after-statement -Werror" - CFLAGS="-Wdeclaration-after-statement -Werror"

View file

@ -4,6 +4,8 @@ before_build:
- cmd: | - cmd: |
git submodule update --init git submodule update --init
scripts\check_header_guards.py
md build32 & cd build32 md build32 & cd build32
cmake -Werror=dev -G "Visual Studio 14 2015" .. cmake -Werror=dev -G "Visual Studio 14 2015" ..
cd .. cd ..
@ -29,7 +31,6 @@ test_script:
cd build64 cd build64
Release\DDNet-Server shutdown Release\DDNet-Server shutdown
cd .. cd ..
- cmd: scripts\check_header_guards.py
after_build: after_build:
- cmd: cmake --build build32 --config Release --target package - cmd: cmake --build build32 --config Release --target package

View file

@ -13,6 +13,8 @@ checkout:
## Customize test commands ## Customize test commands
compile: compile:
override: override:
- python scripts/check_header_guards.py
- | - |
mkdir build mkdir build
cd build cd build
@ -26,8 +28,6 @@ test:
make run_tests make run_tests
./DDNet-Server shutdown ./DDNet-Server shutdown
- python scripts/check_header_guards.py
- | - |
cd build cd build
make package make package