Commit 91c7be19 authored by Claudio André's avatar Claudio André

CI: run code analyzers on its own parallel build

They don't need to actually build the code to run.
parent b06240fc
......@@ -17,8 +17,13 @@ before_script:
- $(pwd)/.cache/jhbuild/build/gjs/test-suite.log
script:
# Run static code analysis OR
# Build dependencies and 'make check' gjs
- $(pwd)/test/test-ci.sh GJS
- 'if [[ -n "${CODECHECK}" ]]; then
$(pwd)/test/test-ci.sh "$CODECHECK";
else
$(pwd)/test/test-ci.sh GJS;
fi'
# Run extra tests
- 'if [[ $BUILD_OPTS == *"--enable-installed-tests"* ]]; then
......@@ -43,9 +48,16 @@ fedora_gcc:
BASE: fedora
OS: fedora.26.gcc
CC: gcc
CPPCHECK: "yes"
BUILD_OPTS: "--enable-ubsan"
fedora_cppcheck:
<<: *build
image: claudioandre/spidermonkey:fedora.26.gcc
variables:
BASE: fedora
OS: fedora.26.gcc
CODECHECK: "CPPCHECK"
# Failure routine
on_failure:
stage: failure
......
......@@ -268,13 +268,6 @@ elif [[ $1 == "GJS" ]]; then
echo
jhbuild make --check
if [[ $CPPCHECK == "yes" ]]; then
echo
echo '-- Code analyzer --'
jhbuild run --in-builddir=gjs make cppcheck
echo
fi
elif [[ $1 == "GJS_EXTRA" ]]; then
# Extra testing. It doesn't build, just run the 'Installed Tests'
echo
......@@ -284,6 +277,14 @@ elif [[ $1 == "GJS_EXTRA" ]]; then
xvfb-run jhbuild run dbus-run-session -- gnome-desktop-testing-runner gjs
elif [[ $1 == "CPPCHECK" ]]; then
do_Install_Base_Dependencies
echo
echo '-- Code analyzer --'
cppcheck --enable=warning,performance,portability,information,missingInclude --force -q .
echo
else
echo
echo '-- NOTHING TO DO --'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment