Skip to content

Commit 61ca480

Browse files
committed
travis: add an extra dmake job which will not fail the entire build if the makefile needs to be regenerated
1 parent 26188eb commit 61ca480

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ env:
1818
- CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL" MAKEFLAGS="HAVE_RULES=yes" SRCDIR=build VERIFY=1
1919
- SRCDIR=build CHECK_CLANG=yes VERIFY=1
2020
- SRCDIR=build CHECK_LLVM=yes VERIFY=1
21+
- CHECK_MAKEFILE_REGEN=true
2122

2223
matrix:
2324
# do notify immediately about it when a job of a build fails.
@@ -28,6 +29,11 @@ matrix:
2829
env: SRCDIR=build CHECK_CLANG=yes VERIFY=1
2930
- compiler: gcc
3031
env: SRCDIR=build CHECK_LLVM=yes VERIFY=1
32+
- compiler: gcc
33+
env: CHECK_MAKEFILE_REGEN=true
34+
allow_failures:
35+
- compiler: clang
36+
env: CHECK_MAKEFILE_REGEN=true
3137

3238
before_install:
3339
# install needed deps
@@ -41,6 +47,10 @@ script:
4147
- if [[ "$CHECK_CLANG" == "yes" ]] && [[ "$CC" == "clang" ]]; then wget "https://github.com/llvm-mirror/clang/archive/bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip" & make -j 4 & wait; unzip bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea.zip > /dev/null; touch /tmp/clang.cppcheck; cd ./clang-bcaf7f2abe47b0dab055f1a0ec011ed9c2a3d3ea ; ../cppcheck . --max-configs=1 --enable=all --inconclusive --exception-handling --template="{callstack} ({severity}) {message} [{id}]" -iINPUTS -itest/Driver/Inputs/gen-response.c -itest/Index/index-many-logical-ops.c -itest/Sema/many-logical-ops.c -j 2 |& tee /tmp/clang.cppcheck; cd ../ ; echo "CLANG" ; ! grep "process crashed with signal\|Internal error\. compiled" /tmp/clang.cppcheck; exit; fi
4248
# check llvm as well
4349
- if [[ "$CHECK_LLVM" == "yes" ]] && [[ "$CC" == "clang" ]]; then wget "https://github.com/llvm-mirror/llvm/archive/7733e74e5454d6f18da28c06be917c1e73d12d01.zip" & make -j 4 & wait; unzip 7733e74e5454d6f18da28c06be917c1e73d12d01.zip > /dev/null; touch /tmp/llvm.cppcheck; cd ./llvm-7733e74e5454d6f18da28c06be917c1e73d12d01 ; ../cppcheck . --max-configs=1 --enable=all --inconclusive --exception-handling --template="{callstack} ({severity}) {message} [{id}]" -j 2 |& tee /tmp/llvm.cppcheck; cd ../ ; echo "LLVM" ; ! grep "process crashed with signal\|Internal error\. compiled" /tmp/llvm.cppcheck; exit; fi
50+
# check if dmake needs to be rerun but if yes, don't fail the build but notify us.
51+
# to update dmake: "make dmake; ./dmake; and commit
52+
- echo "If the following commmand fails, run 'make dmake; make run-dmake' and commit the resulting change."
53+
- if [[ "$CHECK_MAKEFILE_REGEN" == "true" ]]; then make -s dmake; make -s run-dmake ; git diff --exit-code; exit; fi
4454
# check with TEST_MATHLIB_VALUE enabled
4555
- touch lib/mathlib.cpp test/testmathlib.cpp
4656
- echo $CXXFLAGS
@@ -110,13 +120,6 @@ script:
110120
# check addons/misra.py
111121
# - ./cppcheck --dump addons/misra-test.c
112122
# - python addons/misra.py -verify addons/misra-test.c.dump
113-
# check if Makefile needs to be regenerated
114-
- git clean -dfx
115-
- echo $CXXFLAGS
116-
- make -s dmake
117-
- make -s run-dmake
118-
# now, if dmake modified the makefile, return false!
119-
- git diff --exit-code
120123

121124
notifications:
122125
irc:

0 commit comments

Comments
 (0)