forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can't run this on github, yet. I'll add the license key later and run it as post-submit.
- Loading branch information
Showing
5 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM ubuntu:22.04 | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
gcc \ | ||
g++ \ | ||
libconfig-dev \ | ||
libopus-dev \ | ||
libsodium-dev \ | ||
libvpx-dev \ | ||
ninja-build \ | ||
strace \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl -o pvs-studio.deb https://cdn.pvs-studio.com/pvs-studio-7.29.79138.387-amd64.deb \ | ||
&& dpkg -i pvs-studio.deb \ | ||
&& rm pvs-studio.deb | ||
ARG LICENSE_USER="[email protected]" LICENSE_KEY="" | ||
RUN pvs-studio-analyzer credentials "$LICENSE_USER" "$LICENSE_KEY" | ||
|
||
WORKDIR /work/c-toxcore | ||
COPY . /work/c-toxcore/ | ||
|
||
RUN cmake . -B_build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_SHARED=OFF | ||
|
||
# MISRA | ||
RUN echo 'analysis-mode=32' > pvs.cfg | ||
RUN pvs-studio-analyzer analyze --cfg pvs.cfg -f _build/compile_commands.json -j"$(nproc)" -o misra.log | ||
|
||
# General Analysis | ||
RUN echo 'analysis-mode=0' > pvs.cfg | ||
RUN pvs-studio-analyzer analyze --cfg pvs.cfg -f _build/compile_commands.json -j"$(nproc)" -o pvs.log | ||
|
||
# Show MISRA errors | ||
RUN plog-converter \ | ||
-E "other;testing;toxav;third_party" \ | ||
-d "V2501,V2511,V2514,V2516,V2519,V2520,V2537,V2547,V2568,V2571,V2572,V2575,V2578,V2594,V2611,V2614,V2620" \ | ||
-a "MISRA:1,2" \ | ||
-t "tasklist" \ | ||
-o "misra.tasks" \ | ||
"misra.log" | ||
RUN cat misra.tasks | ||
|
||
# Show MISRA errors | ||
RUN plog-converter \ | ||
-E "other;testing;toxav;third_party" \ | ||
-d "V501,V547,V641,V802,V1037,V1042,V1051,V1086" \ | ||
-a "GA:1,2,3;OP:1,2,3" \ | ||
-t "tasklist" \ | ||
-o "pvs.tasks" \ | ||
"pvs.log" | ||
RUN cat pvs.tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ===== common ===== | ||
# Ignore everything ... | ||
**/* | ||
# ... except sources | ||
!**/*.[ch] | ||
!**/*.cc | ||
!**/*.hh | ||
!CHANGELOG.md | ||
!LICENSE | ||
!README.md | ||
!auto_tests/data/* | ||
!other/bootstrap_daemon/bash-completion/** | ||
!other/bootstrap_daemon/tox-bootstrapd.* | ||
!other/proxy/*.mod | ||
!other/proxy/*.sum | ||
!other/proxy/*.go | ||
# ... and CMake build files (used by most builds). | ||
!**/CMakeLists.txt | ||
!.github/scripts/flags*.sh | ||
!cmake/*.cmake | ||
!other/pkgconfig/* | ||
!other/rpm/* | ||
!so.version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
DOCKERFLAGS=("--build-arg" "LICENSE_KEY=$(echo -n "$(cat $HOME/.pvs-license)")") | ||
. "$(cd "$(dirname "${BASH_SOURCE[0]}")/../sources" && pwd)/run.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters