Skip to content

Commit 96c4fe4

Browse files
committed
Use CICD reusable coverage workflow
1 parent 466bd05 commit 96c4fe4

3 files changed

Lines changed: 50 additions & 42 deletions

File tree

.bazelrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ common:qnx --host_platform=@score_bazel_platforms//:x86_64-linux
4040
common:qnx --credential_helper=*.qnx.com=%workspace%/scripts/internal/qnx_creds.py
4141
common:qnx --sandbox_writable_path=/var/tmp
4242

43+
build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
44+
build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
45+
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/x86_64-unknown-linux-gnu:toolchain_x86_64_linux
46+
47+
build:aarch64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix
48+
build:aarch64-linux --extra_toolchains=@score_gcc_arm64_toolchain//:aarch64-linux-gcc_12.2.0-posix
49+
50+
build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx8_0
51+
build:x86_64-qnx --extra_toolchains=@score_gcc_qnx_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix
52+
53+
build:aarch64-qnx --platforms=@score_bazel_platforms//:arm64-qnx8_0
54+
build:aarch64-qnx --extra_toolchains=@score_gcc_qnx_toolchain//:aarch64-qnx-sdp_8.0.0-posix
55+
build:aarch64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/aarch64-unknown-qnx8_0:toolchain_aarch64_qnx8_0
56+
4357
build:build_qnx8 --platforms=@score_bazel_platforms//:arm64-qnx8_0
4458
build:build_qnx8 --extra_toolchains=@toolchains_qnx_qcc//:qcc_aarch64
4559
build:build_qnx8 --extra_toolchains=@toolchains_qnx_ifs//:ifs_aarch64
Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# *******************************************************************************
2-
# Copyright (c) 2025 Contributors to the Eclipse Foundation
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
33
#
44
# See the NOTICE file(s) distributed with this work for additional
55
# information regarding copyright ownership.
@@ -12,6 +12,7 @@
1212
# *******************************************************************************
1313

1414
name: Code Coverage
15+
1516
on:
1617
pull_request:
1718
types: [opened, reopened, synchronize]
@@ -23,43 +24,6 @@ on:
2324

2425
jobs:
2526
coverage-report:
26-
runs-on: ubuntu-22.04
27-
28-
permissions:
29-
contents: read
30-
31-
steps:
32-
- name: Checkout Repository
33-
uses: actions/checkout@v6
34-
35-
- name: Install lcov
36-
run: |
37-
sudo apt-get update
38-
sudo apt-get install -y lcov
39-
- name: Setup Bazel
40-
uses: bazel-contrib/setup-bazel@0.18.0
41-
with:
42-
bazelisk-cache: true
43-
disk-cache: ${{ github.workflow }}
44-
repository-cache: true
45-
cache-save: ${{ github.event_name != 'pull_request' }}
46-
47-
- name: Run Bazel Coverage
48-
run: |
49-
bazel coverage --config=blcov-x86_64-linux -- //score/... //tests/...
50-
- name: Generate HTML Coverage Report
51-
run: |
52-
genhtml "$(bazel info output_path)/_coverage/_coverage_report.dat" \
53-
-o=cpp_coverage \
54-
--show-details \
55-
--legend \
56-
--function-coverage \
57-
--branch-coverage
58-
shell: bash
59-
60-
- name: Upload Coverage Artifacts
61-
uses: actions/upload-artifact@v6
62-
with:
63-
name: ${{ github.event.repository.name }}_coverage_report
64-
path: cpp_coverage/
65-
retention-days: 30
27+
uses: eclipse-score/cicd-workflows/.github/workflows/cpp-coverage.yml@main
28+
with:
29+
bazel-target: "//..."

MODULE.bazel

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bazel_dep(name = "score_process", version = "1.4.0", dev_dependency = True)
3535
bazel_dep(name = "score_platform", version = "0.5.1", dev_dependency = True)
3636

3737
# Toolchains and extensions
38-
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.0", dev_dependency = True)
38+
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2", dev_dependency = True)
3939
bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = True)
4040
bazel_dep(name = "score_toolchains_qnx", version = "0.0.6", dev_dependency = True)
4141
bazel_dep(name = "score_toolchains_rust", version = "0.4.0", dev_dependency = True)
@@ -53,6 +53,7 @@ git_override(
5353
# Extensions
5454

5555
gcc_cpp = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
56+
5657
gcc_cpp.toolchain(
5758
name = "score_gcc_x86_64_toolchain",
5859
target_cpu = "x86_64",
@@ -62,6 +63,35 @@ gcc_cpp.toolchain(
6263
)
6364
use_repo(gcc_cpp, "score_gcc_x86_64_toolchain")
6465

66+
gcc_cpp.toolchain(
67+
name = "score_gcc_arm64_toolchain",
68+
target_cpu = "aarch64",
69+
target_os = "linux",
70+
version = "12.2.0",
71+
use_default_package = True,
72+
)
73+
use_repo(gcc_cpp, "score_gcc_arm64_toolchain")
74+
75+
gcc_cpp.toolchain(
76+
name = "score_gcc_qnx_x86_64_toolchain",
77+
target_cpu = "x86_64",
78+
target_os = "qnx",
79+
sdp_version = "8.0.0",
80+
version = "12.2.0",
81+
use_default_package = True,
82+
)
83+
use_repo(gcc_cpp, "score_gcc_qnx_x86_64_toolchain")
84+
85+
gcc_cpp.toolchain(
86+
name = "score_gcc_qnx_toolchain",
87+
target_cpu = "aarch64",
88+
target_os = "qnx",
89+
sdp_version = "8.0.0",
90+
version = "12.2.0",
91+
use_default_package = True,
92+
)
93+
use_repo(gcc_cpp, "score_gcc_qnx_toolchain")
94+
6595
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = True)
6696
gcc.toolchain(
6797
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",

0 commit comments

Comments
 (0)