Skip to content

Commit 7096a6d

Browse files
authored
Merge pull request eclipse-score#22 from joshualicht/cpp_implementation
Update Workflows for CPP
2 parents d23a289 + 02fb6ca commit 7096a6d

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/check.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,42 @@ jobs:
4949
- name: Cargo Miri
5050
run: |
5151
cargo +nightly-2024-12-17 miri test
52+
53+
cpp-bazel:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
59+
- name: Setup Bazel with shared caching
60+
uses: bazel-contrib/setup-bazel@0.14.0
61+
with:
62+
disk-cache: true
63+
repository-cache: true
64+
bazelisk-cache: true
65+
66+
- name: Bazel Build
67+
run: bazel build //:kvs_cpp
68+
69+
- name: Bazel Unit Test with Coverage
70+
run: |
71+
bazel coverage //:test_kvs_cpp \
72+
--collect_code_coverage \
73+
--instrument_test_targets \
74+
--combined_report=lcov \
75+
--experimental_generate_llvm_lcov \
76+
--nocache_test_results \
77+
--nostamp
78+
79+
- name: Install lcov
80+
run: |
81+
sudo apt-get update
82+
sudo apt-get install -y lcov
83+
84+
- name: Extract Coverage for kvs.cpp
85+
run: |
86+
REPORT=$(find "$(bazel info output_path)" -name _coverage_report.dat | head -n1)
87+
lcov \
88+
--rc branch_coverage=1 \
89+
--extract "$REPORT" "src/cpp/src/kvs.cpp" \
90+
--output-file kvs_coverage.info

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@ bazel_dep(name = "score-baselibs", version = "0.0.0")
9292
git_override(
9393
module_name = "score-baselibs",
9494
commit = "f0a394a602986ddf7abac6a238b9d44535a4b597",
95-
remote = "git@github.com:eclipse-score/baselibs.git",
95+
remote = "https://github.com/eclipse-score/baselibs.git",
9696
)

0 commit comments

Comments
 (0)