Skip to content

Commit 7819055

Browse files
committed
.github/workflows/: Fixed dependencies for doxygen_junit and cppcheck-codequality
1 parent 75ec610 commit 7819055

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/cppcheck.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ jobs:
2727
id: run-cppcheck
2828
run: |
2929
echo "${{ github.action }}: Installing dependencies"
30-
dnf install -y -q cppcheck 2>&1 1>/dev/null
31-
# TODO: is cppcheck-codequality required here?
32-
#echo "Running cppcheck-codequality"
33-
#cppcheck-codequality --input-file $BUILD_WORKSPACE/cppcheck.xml --output-file $BUILD_WORKSPACE/cppcheck_report.json
30+
dnf install -y -q cppcheck pipx 2>&1 1>/dev/null
31+
export PATH=$PATH:/root/.local/bin
32+
pipx install cppcheck-codequality
33+
# Convert to a Code Climate quality JSON report
34+
cppcheck-codequality --input-file $BUILD_WORKSPACE/cppcheck.xml --output-file $BUILD_WORKSPACE/cppcheck_report.json
3435
# Fix the file path references so they are relative to the blob and not the buildspace. We use ; as the substitute so don't have to escape every forwardslash
35-
#sed -i "s;${PROJECT_NAME}/src;src;g" $BUILD_WORKSPACE/cppcheck_report.json
36-
#sed -i "s;${PROJECT_NAME}/test;test;g" $BUILD_WORKSPACE/cppcheck_report.json
36+
sed -i "s;${PROJECT_NAME}/src;src;g" $BUILD_WORKSPACE/cppcheck_report.json
37+
sed -i "s;${PROJECT_NAME}/test;test;g" $BUILD_WORKSPACE/cppcheck_report.json
38+
cat $BUILD_WORKSPACE/cppcheck.xml
3739
if [ $(grep -ic "<error " $BUILD_WORKSPACE/cppcheck.xml) -gt 0 ]; then exit 1; fi
3840
- name: cppcheck-artifacts
3941
uses: actions/upload-artifact@v4

.github/workflows/doxygen.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,22 @@ jobs:
3535
path: ${{ github.workspace }}/${{ env.BUILD_WORKSPACE }}/doxygen.tar.gz
3636
- name: doxygen-test
3737
id: doxygen-test
38-
if: false # what package provides doxygen_junit?
3938
run: |
39+
dnf install -y -q pipx 2>&1 1>/dev/null
40+
export PATH=$PATH:/root/.local/bin
41+
pipx install doxygen-junit
4042
chmod 777 scripts/*.sh
4143
echo "${{ github.action }}: Running scripts/doxygen.sh"
4244
scripts/doxygen.sh || true
4345
# Fix the file path references so they are relative to the blob and not the buildspace. We use ; as the substitute so don't have to escape every forwardslash
4446
sed -i "s;${PROJECT_NAME}/src;src;g" $BUILD_WORKSPACE/doxygen/doxygen_warnings.log || exit 1
4547
sed -i "s;${PROJECT_NAME}/test;test;g" $BUILD_WORKSPACE/doxygen/doxygen_warnings.log || exit 1
48+
cat $BUILD_WORKSPACE/doxygen/doxygen_warnings.log
4649
echo "Running doxygen_junit"
4750
doxygen_junit --input $BUILD_WORKSPACE/doxygen/doxygen_warnings.log --output $BUILD_WORKSPACE/doxygen/doxygen_junit.xml || exit 1
4851
grep -iq "<error " "$BUILD_WORKSPACE/doxygen/doxygen_junit.xml" && exit 1 || exit 0
52+
- name: doxygen-artifacts
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: doxygen_junit
56+
path: ${{ github.workspace }}/${{ env.BUILD_WORKSPACE }}/doxygen/doxygen_junit.xml

0 commit comments

Comments
 (0)