Skip to content

Hold firefox updates #209

Hold firefox updates

Hold firefox updates #209

Workflow file for this run

name: Sonar
on:
push:
branches:
- main
- sonar
pull_request:
types: [ opened, synchronize, reopened ]
permissions:
contents: read
jobs:
build-and-scan:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
env:
- { cc: clang, cxx: clang++ }
- { cc: gcc, cxx: g++ }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Qt
run: |
sudo apt-mark hold grub-efi-amd64-signed
sudo apt update
sudo apt upgrade
sudo apt install lcov qtbase5{,-doc}-dev qtconnectivity5-{dev,doc-html} qttools5-dev{,-tools}
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v3
- name: Run build-wrapper
env:
CC: ${{ matrix.env.cc }}
CXX: ${{ matrix.env.cxx }}
PROJECT_BUILD_ID: ${{ github.run_number }}.linux.x86-64.${{ matrix.env.cc }}
run: |
cmake -D CMAKE_BUILD_TYPE=Release -D ENABLE_COVERAGE=${{ startsWith(matrix.env.cc, 'gcc') && 'ON' || 'OFF'}} \
-S "$GITHUB_WORKSPACE" -B "$RUNNER_TEMP"
build-wrapper-linux-x86-64 --out-dir "$RUNNER_TEMP/sonar" cmake --build "$RUNNER_TEMP" --config Release
- name: Run sonar-scanner
# Generate only one report for now, since Sonar can only deal with one (could just as easily be clang).
if: matrix.env.cxx == 'g++' && github.actor != 'dependabot[bot]'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define project.settings=.sonar.properties \
--define sonar.cfamily.build-wrapper-output="$RUNNER_TEMP/sonar"