Skip to content

Commit c8c67cc

Browse files
authored
Merge pull request #97 from sir-gon/develop
[CONFIG] [Github Actions] moving coverage process from ubuntu to macos based image, due an newer version of lcov is available in homebrew.
2 parents df3c2b2 + 251adf4 commit c8c67cc

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.github/workflows/cpp-coverage.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,29 @@ on: # yamllint disable-line rule:truthy
1313
jobs:
1414
coverage:
1515
name: C++ CMake CI Coverage
16-
runs-on: ubuntu-24.04
16+
runs-on: macos-14
1717

1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2121

2222
- name: Install Tools
23+
shell: bash
2324
run: |
24-
sudo apt update
25-
sudo apt-get install lcov
25+
# Install vcpkg
26+
export VCPKG_VERSION=2025.02.14
27+
git clone \
28+
--depth 1 \
29+
--branch $VCPKG_VERSION \
30+
https://github.com/microsoft/vcpkg.git \
31+
--single-branch \
32+
"$HOME/vcpkg"
33+
export VCPKG_ROOT="$HOME/vcpkg"
34+
echo "$VCPKG_ROOT" >> $GITHUB_PATH
35+
sh $VCPKG_ROOT/bootstrap-vcpkg.sh
36+
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
37+
# lcov is available via homebrew
38+
brew install lcov
2639
2740
- name: Check Tools
2841
run: |

.github/workflows/sonarcloud.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-24.04
1515
env:
1616
# Directory where build-wrapper output will be placed
17-
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
17+
BUILD_WRAPPER_OUT_DIR: build
1818
steps:
1919
- uses: actions/checkout@v5
2020
with:
@@ -64,6 +64,6 @@ jobs:
6464
with:
6565
# Consult https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options
6666
args: >
67-
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
67+
--define sonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json
6868
--define sonar.coverageReportPaths=coverage.xml
6969
# yamllint enable rule:line-length

0 commit comments

Comments
 (0)