Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/cetlvast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis by sonarqube.
- name: Install sonar-scanner
uses: SonarSource/sonarcloud-github-c-cpp@v3

- name: Cache ext modules
uses: actions/cache@v4
with:
Expand All @@ -186,10 +183,29 @@ jobs:
- name: Check for SONAR_TOKEN
if: ${{ env.SONAR_TOKEN == '' && github.event_name != 'pull_request' }}
run: echo "::error file=cetlvast.yml,line=191,col=8,endColumn=80,title=SONAR_TOKEN-missing::SONAR_TOKEN was empty or not found."
- name: Run sonar-scanner
- name: Run build for sonar-scanner
if: ${{ env.SONAR_TOKEN != '' }}
working-directory: cetlvast
run: cmake --workflow --preset manual-sonar-scan-gcc-native-cpp-14-offline
run: cmake --workflow --preset manual-coverage-gcc-native-cpp-14-offline
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5.3.0
if: ${{ env.SONAR_TOKEN != '' }}
with:
args: >
-Dsonar.organization=opencyphal
-Dsonar.projectKey=OpenCyphal_CETL
-Dsonar.projectName=CETLVaSt
-Dsonar.verbose=true
-Dsonar.cfamily.compile-commands=cetlvast/build/compile_commands.json
-Dsonar.cfamily.cobertura.reportPaths=cetlvast/build/suites/unittest/coverage.xml
-Dsonar.testExecutionReportPaths=cetlvast/build/suites/unittest/unittest-sonarqube.xml
-Dsonar.sources="include,cetlvast/suites/unittest/sonar.cpp"
-Dsonar.tests="cetlvast/suites/unittest"
-Dsonar.test.inclusions="**/test_*.cpp"
-Dsonar.cfamily.ignoreHeaderComments=false
-Dsonar.coverage.exclusions="cetlvast/**/*,**/sonar.cpp"
-Dsonar.cpd.exclusions="cetlvast/**/*,**/sonar.cpp"
-Dsonar.cfamily.reportingCppStandardOverride=c++14

deploy-docs:
if: >
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cmake.configureOnOpen": false,
"cmake.configureOnEdit": false,
"cmake.buildDirectory": "${workspaceFolder}/build",
"cmake.sourceDirectory": "${workspaceFolder}/cetlvast",
"cmake.buildBeforeRun": true,
"editor.wordWrapColumn": 120,
Expand Down
113 changes: 57 additions & 56 deletions cetlvast/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,21 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
"name": "manual-Coverage-no-scan-gcc-native-cpp-14-offline",
"configurePreset": "configure-gcc-native-cpp-14-offline",
"configuration": "Coverage",
"targets": [
"build",
"run_unittests",
"gcovr_html_report_for_unittest",
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand Down Expand Up @@ -1714,8 +1727,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1729,8 +1741,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1744,8 +1755,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1759,8 +1769,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1774,8 +1783,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1789,8 +1797,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1804,8 +1811,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1819,8 +1825,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1834,8 +1839,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1849,8 +1853,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1864,8 +1867,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1879,8 +1881,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1894,8 +1895,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1909,8 +1909,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1924,8 +1923,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1939,8 +1937,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1954,8 +1951,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1969,8 +1965,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1984,8 +1979,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -1999,8 +1993,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -2014,8 +2007,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -2029,8 +2021,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -2044,8 +2035,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -2059,8 +2049,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -2074,8 +2063,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
{
Expand All @@ -2089,8 +2077,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
}
],
Expand Down Expand Up @@ -2140,6 +2127,21 @@
}
]
},
{
"name": "manual-coverage-gcc-native-cpp-14-offline",
"displayName": "gcc native cpp 14 offline (Coverage only).",
"description": "Hand-managed workflow for generating coverage data for sonarqube scans.",
"steps": [
{
"type": "configure",
"name": "configure-gcc-native-cpp-14-offline"
},
{
"type": "build",
"name": "manual-Coverage-no-scan-gcc-native-cpp-14-offline"
}
]
},
{
"name": "lint-workflow-clang-native-cpp-14-online",
"displayName": "clang native cpp 14 online lint workflow.",
Expand Down Expand Up @@ -3053,8 +3055,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
"preset-groups": {
Expand Down
3 changes: 1 addition & 2 deletions cetlvast/CMakePresetsVendorTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"gcovr_sonarqube_report_for_unittest",
"run_examples",
"gcovr_html_report_for_examples",
"gcovr_sonarqube_report_for_examples",
"sonar-cloud-scan-OpenCyphal_CETL"
"gcovr_sonarqube_report_for_examples"
]
},
"preset-groups": {
Expand Down
Loading