Skip to content

Commit

Permalink
Re-enable Linux/musl/gcc test in CI; CI updates (#421)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey H. Johnson <[email protected]>
  • Loading branch information
johnsonjh authored May 7, 2024
1 parent 040a4bd commit dfd4017
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Linux/i686 (G++, GCC):

################################################################################

.Linux/x86_64 (musl-libc, G++, GCC):
Linux/x86_64 (musl-libc, GCC, C-only):
stage: build_linux
needs:
- job: Style check
Expand All @@ -270,17 +270,18 @@ Linux/i686 (G++, GCC):
# Start of Build ...
echo -e "section_start:`date +%s`:Build_section[collapsed=true]\r\e[0K\033[0;36mBuild ...\033[0m" || true
- export CC="musl-gcc"
- export LDFLAGS="-static"
- ${CC:?} --version
- make
- make SIR_NO_PLUGINS=1
- |
# End of Build ...
echo -e "section_end:`date +%s`:Build_section\r\e[0K" || true
- *BuildInformation
- |
# Start of Test ...
echo -e "section_start:`date +%s`:Test_section[collapsed=true]\r\e[0K\033[0;36mTest ...\033[0m" || true
- ./build/bin/sirexample
- ./build/bin/sirtests
- stdbuf -o L ./build/bin/sirexample
- stdbuf -o L ./build/bin/sirtests
- |
# End of Test ...
echo -e "section_end:`date +%s`:Test_section\r\e[0K" || true
Expand Down
9 changes: 6 additions & 3 deletions .lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ test_cppcheck()
--enable="all" \
--inline-suppr \
--inconclusive \
--check-level=exhaustive \
--library=posix \
--platform=unix64 \
--suppress=checkersReport \
Expand All @@ -524,6 +525,7 @@ test_cppcheck()
--suppress=knownConditionTrueFalse \
--suppress=unmatchedSuppression \
--suppress=unreadVariable \
--suppress=unusedStructMember \
--suppress=*:/usr/include/* \
-DCLOCK_REALTIME=1 \
-DCLOCK_MONOTONIC=6 \
Expand Down Expand Up @@ -552,7 +554,7 @@ test_cppcheck()
getconf _NPROCESSORS_ONLN 2> /dev/null || \
nproc 2> /dev/null || printf '%s\n' 4)" \
$(find . -name '*.[ch]' -o -name '*.cc' -o -name '*.hh' \
| grep -Ev '(mcmb\.c|\.git/.*)') \
| grep -Ev '(mcmb\.c|\.git/.*|\.gitlab-ci/.*)') \
--xml --xml-version=2 2> cppcheck.xml \
&& cppcheck-htmlreport --source-dir="." \
--report-dir="./cppcheck" \
Expand Down Expand Up @@ -650,13 +652,14 @@ test_pvs_real()
# shellcheck disable=SC2015
plog-converter -a "GA:1,2,3;OP:1,2,3;64:1,2,3;CS:1,2,3;MISRA:1,2,3;OWASP:1,2,3;AUTOSAR:1,2,3" \
-t fullhtml log.pvs -o pvsreport 2>&1 | tee /dev/stderr | \
grep -q 'Exception: No valid messages' && \
grep -Eq '(Exception: No valid messages|No messages generated)' && \
{ mkdir -p ./pvsreport;
echo OK;
printf '%s\n' "Congratulations!" > ./pvsreport/index.html;
} || true
mkdir -p ./pvsreport || true
touch ./pvsreport/index.html
grep -q 'Congratulations!' ./pvsreport/index.html \
grep -Eq '(Congratulations!|No messages generated)' ./pvsreport/index.html \
|| {
printf '%s\n' "ERROR: PVS-Studio failed ..."
printf '\n%s\n' "Review output in ./pvsreport ..."
Expand Down

0 comments on commit dfd4017

Please sign in to comment.