Skip to content

Merge pull request #1703 from Karry/invalidate-route-data #1902

Merge pull request #1703 from Karry/invalidate-route-data

Merge pull request #1703 from Karry/invalidate-route-data #1902

Workflow file for this run

name: Sonar
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master
paths-ignore:
- '.github/workflows/**'
workflow_dispatch:
jobs:
sonar_gcc_meson:
name: sonar, gcc and meson
# secrets are not available for pull requests from forks
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04
environment: SONAR
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update package list
run: sudo apt-get update
- name: Install software-properties-common
run: sudo apt-get install software-properties-common
- name: Install gcc compiler, meson and ninja
run: sudo apt-get -y install gcc g++ libtbb-dev ccache libtool pkg-config
- name: Install meson, ninja, lcov and gcovr via pip
run: pip install --user meson ninja lcov gcovr --break-system-packages
- name: Install libosmscout dependencies
run: "sudo apt-get install -y
catch2
libxml2-dev
libprotobuf-dev protobuf-compiler liblzma-dev
libagg-dev
libfreetype6-dev libcairo2-dev libpangocairo-1.0-0 libpango1.0-dev
qtdeclarative5-dev libqt5svg5-dev qtlocation5-dev qtpositioning5-dev qttools5-dev-tools
qttools5-dev qtmultimedia5-dev
libglm-dev libglew-dev libglut-dev
libmarisa-dev"
- name: Configure build project
run: meson setup --buildtype debugoptimized -Db_coverage=true --unity on debug
env:
CXX: g++
CC: gcc
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6.0.0
- name: Build project
run: build-wrapper-linux-x86-64 --out-dir sonar-build-output ninja -C debug all test coverage
env:
CXX: g++
CC: gcc
- name: Debug output
run: ls -lR sonar-build-output
- name: Debug build
run: ls -lR debug
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.cfamily.build-wrapper-output=sonar-build-output
-Dsonar.cfamily.cppunit.reportsPath=debug/meson-logs/testlog.junit.xml
-Dsonar.coverageReportPaths=debug/meson-logs/sonarqube.xml
-Dsonar.cfamily.cobertura.reportPaths=debug/meson-logs/coverage.xml
-Dsonar.verbose=true