Travis testing - examples use stricter CFLAGS and CXXFLAGS
This commit is contained in:
parent
ab86f8a8f5
commit
5990872cf7
1 changed files with 30 additions and 1 deletions
31
.travis.yml
31
.travis.yml
|
|
@ -67,6 +67,35 @@ before_install:
|
||||||
- if test "$SWIGLANG" = "python" -a "$PY3" -a -z "$VER"; then sudo apt-get install -qq python3-dev; fi
|
- if test "$SWIGLANG" = "python" -a "$PY3" -a -z "$VER"; then sudo apt-get install -qq python3-dev; fi
|
||||||
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi
|
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi
|
||||||
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
|
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
|
||||||
|
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
|
||||||
|
- declare -A CFLAGS_EXAMPLES && CFLAGS_EXAMPLES=(
|
||||||
|
["csharp"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["go"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["guile"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["java"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["javascript"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["lua"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["octave"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["perl5"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["php"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["python"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["ruby"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["tcl"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
)
|
||||||
|
- declare -A CXXFLAGS_EXAMPLES && CXXFLAGS_EXAMPLES=(
|
||||||
|
["csharp"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["go"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["guile"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["java"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["javascript"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["lua"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["octave"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["perl5"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
["php"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["python"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["ruby"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
|
||||||
|
["tcl"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
|
||||||
|
)
|
||||||
- $CC --version
|
- $CC --version
|
||||||
- $CXX --version
|
- $CXX --version
|
||||||
script:
|
script:
|
||||||
|
|
@ -81,7 +110,7 @@ script:
|
||||||
- if test -z "$SWIGLANG"; then sudo make -s install && swig -version && ccache-swig -V; fi
|
- if test -z "$SWIGLANG"; then sudo make -s install && swig -version && ccache-swig -V; fi
|
||||||
- echo -en 'travis_fold:end:script.2\\r'
|
- echo -en 'travis_fold:end:script.2\\r'
|
||||||
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
|
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
|
||||||
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
|
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples CFLAGS="${CFLAGS_EXAMPLES[$SWIGLANG]}" CXXFLAGS="${CXXFLAGS_EXAMPLES[$SWIGLANG]}"; fi
|
||||||
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
|
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
|
||||||
- echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
|
- echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
|
||||||
- make maintainer-clean && ../../configure $CONFIGOPTS
|
- make maintainer-clean && ../../configure $CONFIGOPTS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue