Skip to content

use full name with namespace with "tr" #1226

use full name with namespace with "tr"

use full name with namespace with "tr" #1226

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-22.04
environment: SONAR
steps:
- name: Checkout
uses: actions/checkout@v3
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-11 g++-11 libtbb-dev ccache libtool pkg-config
- name: Install meson, ninja, lcov and gcovr via pip
run: pip install meson ninja lcov gcovr
- name: Install libosmscout dependencies
run: "sudo apt-get install -y
libxml2-dev
libprotobuf-dev protobuf-compiler
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 freeglut3 freeglut3-dev
libmarisa-dev"
- name: Prepare Sonar scanner
run: |
wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
unzip -q sonar-scanner-cli-5.0.1.3006-linux.zip
echo "${PWD}/sonar-scanner-5.0.1.3006-linux/bin/" >> $GITHUB_PATH
wget -nv https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip -q build-wrapper-linux-x86.zip
echo "${PWD}/build-wrapper-linux-x86" >> $GITHUB_PATH
- name: Configure build project
run: meson setup --buildtype debugoptimized -Db_coverage=true --unity on debug
env:
CXX: g++-11
CC: gcc-11
- name: Build project
run: build-wrapper-linux-x86-64 --out-dir sonar-build-output ninja -C debug all test coverage
- name: Create gcov files
run: mkdir gcov && cd gcov && gcov -p ../debug//*/*/*
- name: SonarCloud Scan
run: sonar-scanner -Dsonar.cfamily.build-wrapper-output=sonar-build-output -Dsonar.cfamily.gcov.reportsPath=gcov -Dsonar.login=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}