From 349a3bd51f641b35931eaa550c8b4e6ed28d99cf Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Tue, 2 Sep 2025 17:49:06 -0400 Subject: [PATCH 1/2] [CONFIG] [Github Actions] moving coverage process from ubuntu to macos based image, due an newer version of lcov is available in homebrew. --- .github/workflows/cpp-coverage.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cpp-coverage.yml b/.github/workflows/cpp-coverage.yml index 1c5c496..19a5831 100644 --- a/.github/workflows/cpp-coverage.yml +++ b/.github/workflows/cpp-coverage.yml @@ -13,16 +13,29 @@ on: # yamllint disable-line rule:truthy jobs: coverage: name: C++ CMake CI Coverage - runs-on: ubuntu-24.04 + runs-on: macos-14 steps: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - name: Install Tools + shell: bash run: | - sudo apt update - sudo apt-get install lcov + # Install vcpkg + export VCPKG_VERSION=2025.02.14 + git clone \ + --depth 1 \ + --branch $VCPKG_VERSION \ + https://github.com/microsoft/vcpkg.git \ + --single-branch \ + "$HOME/vcpkg" + export VCPKG_ROOT="$HOME/vcpkg" + echo "$VCPKG_ROOT" >> $GITHUB_PATH + sh $VCPKG_ROOT/bootstrap-vcpkg.sh + echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV + # lcov is available via homebrew + brew install lcov - name: Check Tools run: | From 251adf4f5c4d55e3600f7f54b639d1713d83d1b0 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Tue, 2 Sep 2025 18:06:20 -0400 Subject: [PATCH 2/2] [BUGFIX] [Github Actions] BUILD_WRAPPER_OUT_DIR environment variable fixed. https://github.com/SonarSource/sonarqube-scan-action/blob/f932b66/README.md --- .github/workflows/sonarcloud.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 6298c3d..e126f4b 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-24.04 env: # Directory where build-wrapper output will be placed - BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory + BUILD_WRAPPER_OUT_DIR: build steps: - uses: actions/checkout@v5 with: @@ -64,6 +64,6 @@ jobs: 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.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json --define sonar.coverageReportPaths=coverage.xml # yamllint enable rule:line-length