-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Fix SonarCloud Scan with outdated Java version
SonarCloud Scan does no longer support Java 11. Use `sonarsource/sonarcloud-github-c-cpp` action to install sonarcloud and the build-wrapper directly from the original vendor instead of a third party.
- Loading branch information
Showing
2 changed files
with
47 additions
and
61 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,47 @@ | ||
name: SonarCloud Scan | ||
|
||
on: [push] | ||
|
||
jobs: | ||
sonarcloud: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout code including full history and submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies from APT repository | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install cmake gcovr libcunit1-dev ninja-build unzip wget | ||
- name: Install sonar-scanner and build-wrapper | ||
uses: sonarsource/sonarcloud-github-c-cpp@v2 | ||
|
||
- name: Collect test coverage data | ||
run: | | ||
tools/ci/run_ci.sh \ | ||
--run-build \ | ||
--run-tests \ | ||
--sonarqube build-wrapper-linux-x86-64 | ||
- name: Run SonarCloud Scan | ||
run: | | ||
sonar-scanner \ | ||
-Dsonar.branch.name="${GITHUB_REF_NAME}" \ | ||
-Dsonar.cfamily.build-wrapper-output=build-wakaama/sonar-cloud-build-wrapper-output \ | ||
-Dsonar.cfamily.cache.enabled=false \ | ||
-Dsonar.cfamily.gcov.reportsPath=build-wakaama \ | ||
-Dsonar.cfamily.threads=2 \ | ||
-Dsonar.exclusions="build-wakaama-*/**, .git/**" \ | ||
-Dsonar.host.url=https://sonarcloud.io \ | ||
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \ | ||
-Dsonar.organization=${{ github.repository_owner }} \ | ||
-Dsonar.projectKey="$(echo ${{ github.repository }} | tr / _)" \ | ||
-Dsonar.sourceEncoding=UTF-8 \ | ||
-Dsonar.sources=. | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.