Skip to content

Merge pull request #87 from sir-gon/renovate/ubuntu-24.x #296

Merge pull request #87 from sir-gon/renovate/ubuntu-24.x

Merge pull request #87 from sir-gon/renovate/ubuntu-24.x #296

Workflow file for this run

---
name: SonarCloud
on: # yamllint disable-line rule:truthy
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
build:
name: SonarCloud build and run sonar-scanner
runs-on: ubuntu-24.04
env:
# Directory where build-wrapper output will be placed
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
steps:
- uses: actions/checkout@v4
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- name: Install Tools
run: |
sudo rm /usr/lib/python3.*/EXTERNALLY-MANAGED
sudo apt-get install lcov
pip install gcovr
- name: Check Tools
run: |
make --version
cmake --version
vcpkg --version
lcov --version
gcovr --version
- name: Install dependencies
run: |
make dependencies
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@master
# yamllint disable rule:line-length
- name: Run build-wrapper
run: |
export VCPKG_ROOT=/usr/local/share/vcpkg
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make build
# yamllint enable rule:line-length
- name: Run tests to generate coverage statistics
run: |
make coverage
- name: Collect coverage into one XML report
run: |
gcovr -e "src/tests/*" --sonarqube > coverage.xml
# yamllint disable rule:line-length
- name: Analyze with SonarQube / SonarCloud
uses: SonarSource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
# Consult https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options
args: >
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
--define sonar.coverageReportPaths=coverage.xml
# yamllint enable rule:line-length
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy