Skip to content

Use of std::format in Progress #1665

Use of std::format in Progress

Use of std::format in Progress #1665

Workflow file for this run

name: Sonar
on:
pull_request:
branches:
- master
push:
branches:
- master
paths-ignore:
- '.github/workflows/**'
workflow_dispatch:
jobs:
sonar_gcc_meson:
name: sonar, gcc and meson
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: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v3
- name: Configure build project
run: meson setup --buildtype debugoptimized -Db_coverage=true --unity on debug
env:
CXX: g++
CC: gcc
- 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: SonarCloud Scan
run: "sonar-scanner
-Dsonar.cfamily.compile-commands=sonar-build-output/compile_commands.json
-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.token=$SONAR_TOKEN"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}