Skip to content

Commit 078858b

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] trying to collect better coverage to sonarcloud using newer lcov tool available on homebrew.
1 parent 213f7e6 commit 078858b

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on: # yamllint disable-line rule:truthy
1111
jobs:
1212
build:
1313
name: SonarCloud build and run sonar-scanner
14-
runs-on: ubuntu-24.04
14+
runs-on: macos-15-intel
1515
env:
1616
# Directory where build-wrapper output will be placed
1717
BUILD_WRAPPER_OUT_DIR: build
@@ -20,23 +20,21 @@ jobs:
2020
with:
2121
# Shallow clones should be disabled for a better relevancy of analysis
2222
fetch-depth: 0
23-
- name: Setup Cpp
24-
uses: aminya/setup-cpp@v1
25-
with:
26-
compiler: llvm-17
2723
- name: Install Tools
2824
run: |
29-
sudo rm /usr/lib/python3.*/EXTERNALLY-MANAGED
30-
pip install gcovr
31-
#
32-
# Install lcov dependencies
33-
sudo apt-get install libcapture-tiny-perl libdatetime-perl
34-
# Install lcov from source
35-
git clone https://github.com/linux-test-project/lcov.git
36-
cd lcov
37-
git checkout v2.3.2
38-
sudo make install
39-
cd ..
25+
export VCPKG_VERSION=2025.02.14
26+
git clone \
27+
--depth 1 \
28+
--branch $VCPKG_VERSION \
29+
https://github.com/microsoft/vcpkg.git \
30+
--single-branch \
31+
"$HOME/vcpkg"
32+
export VCPKG_ROOT="$HOME/vcpkg"
33+
echo "$VCPKG_ROOT" >> $GITHUB_PATH
34+
sh $VCPKG_ROOT/bootstrap-vcpkg.sh
35+
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
36+
# lcov is available via homebrew
37+
brew install lcov
4038
4139
- name: Check Tools
4240
run: |
@@ -64,7 +62,7 @@ jobs:
6462
- name: Run build-wrapper
6563
run: |
6664
export VCPKG_ROOT=/usr/local/share/vcpkg
67-
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make build
65+
build-wrapper-macosx-x86 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make build
6866
# yamllint enable rule:line-length
6967
- name: Run tests to generate coverage statistics
7068
run: |

0 commit comments

Comments
 (0)