Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ build:eb-aarch64 --config=_common
build:eb-aarch64 --extra_toolchains=@score_ebclfsa_toolchain//:aarch64-linux-sdk_0.1.0-ebclfsa
build:eb-aarch64 --extra_toolchains=@ferrocene_aarch64_ebclfsa//:rust_ferrocene_toolchain
build:eb-aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-sdk_0.1.0-ebclfsa
# GCC-13 emits aarch64 outline-atomic calls (__aarch64_ldadd4_acq_rel, __aarch64_cas*, ...)
# whose helpers live in libgcc.a. Ferrocene rustc drives the final link with -nodefaultlibs,
# so libgcc.a is never pulled in -> undefined references when Rust binaries link C++ libs.
# Force inline atomics instead.
build:eb-aarch64 --copt=-mno-outline-atomics

build:autosd-x86_64 --config=_common
build:autosd-x86_64 --force_pic
Expand Down Expand Up @@ -111,6 +116,13 @@ test:unit-tests --test_tag_filters=-manual,-miri
# Coverage configuration for C++
coverage --features=coverage
coverage --combined_report=lcov
# Exclude tests the modules tag out of coverage (e.g. *_tsan_test): gcov-instrumenting a
# ThreadSanitizer binary reports false data races on the non-atomic __gcov* counters.
# Mirrors the modules' own .bazelrc so central-mode coverage matches in-module coverage.
coverage --test_tag_filters=-no-coverage
# Make gcov counter updates atomic so any remaining multithreaded coverage test is race-free.
coverage --copt=-fprofile-update=atomic
coverage --linkopt=-fprofile-update=atomic

# user specific overrides (like proxy settings)
try-import %workspace%/user.bazelrc
315 changes: 277 additions & 38 deletions .github/workflows/test_and_docs.yml

Large diffs are not rendered by default.

968 changes: 507 additions & 461 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions bazel_common/score_modules_target_sw.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
# Do not edit manually - use scripts/known_good/update_module_from_known_good.py

bazel_dep(name = "score_baselibs")
single_version_override(
git_override(
module_name = "score_baselibs",
commit = "ce204159f37ee7815907369a8f678583bf102306",
patch_strip = 1,
patches = [
"//patches/baselibs:001-restore-trace-library-mock-visibility.patch",
],
version = "0.2.9",
remote = "https://github.com/eclipse-score/baselibs.git",
)

bazel_dep(name = "score_communication")
Expand Down
68 changes: 68 additions & 0 deletions ci/stage2/module.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
#
# DR-008 Stage 2 centralized config. Loaded via --bazelrc with --noworkspace_rc, so it
# replaces the checked-out module's own .bazelrc entirely and must restate every setting
# a module build needs.

# Repository mapping resolves before any --config is applied, so registries must be
# unconditional here — a config-gated --registry leaves modules unresolvable.
common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
common --registry=https://bcr.bazel.build

build --java_language_version=17
build --tool_java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_runtime_version=remotejdk_17

# ─── stage2-base: shared build/test settings ─────────────────────────────────
build:stage2-base --cxxopt=-Wno-error=mismatched-new-delete
build:stage2-base --cxxopt=-Wno-deprecated-declarations

# -miri excluded: ref_int registers only the non-miri ferrocene toolchain (stage2-rust).
test:stage2-base --test_output=errors
test:stage2-base --build_tests_only
test:stage2-base --test_tag_filters=-manual,-miri,-no-coverage
test:stage2-base --test_summary=testcase
test:stage2-base --test_verbose_timeout_warnings
test:stage2-base --test_timeout=1200
test:stage2-base --nocache_test_results

coverage:stage2-base --features=coverage
coverage:stage2-base --combined_report=lcov
# Make gcov counter updates atomic so a multithreaded coverage test is race-free.
coverage:stage2-base --copt=-fprofile-update=atomic
coverage:stage2-base --linkopt=-fprofile-update=atomic

# ─── stage2-linux-x86_64: the mandatory Stage-2 target ───────────────────────
build:stage2-linux-x86_64 --config=stage2-base
build:stage2-linux-x86_64 --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
build:stage2-linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix

# @score_gcc_x86_64_toolchain is generated by each module's own gcc.toolchain() call, and
# the generated target name depends on that call's own attributes, not just its version.
# 7/8 target_sw modules pass identical attributes -> stage2-gcc-default. score_communication
# additionally passes use_base_constraints_only=True, which drops the "-gcc_12.2.0" suffix
# from the generated name -> needs stage2-gcc-base-constraints instead.
build:stage2-gcc-default --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
build:stage2-gcc-base-constraints --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux

# ─── stage2-rust: additive, for modules that declare score_toolchains_rust ───
# score_time doesn't, so it must not be pulled into stage2-base.
build:stage2-rust --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu

# ─── stage2-libclang-*: score_tooling's C++ parser needs a libclang toolchain ──
# score_tooling deliberately registers none for consumers, so each consumer defines its
# own. // resolves against the module in Stage 2, so we point at the module's target.
# Only score_communication has parser-backed targets, hence one config for now.
build:stage2-libclang-communication --extra_toolchains=//bazel/toolchains:score_communication_libclang_toolchain
49 changes: 44 additions & 5 deletions known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"target_sw": {
"score_baselibs": {
"repo": "https://github.com/eclipse-score/baselibs.git",
"version": "0.2.9",
"bazel_patches": [
"//patches/baselibs:001-restore-trace-library-mock-visibility.patch"
],
Expand All @@ -21,8 +20,14 @@
],
"langs": [
"cpp"
],
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-default",
"stage2-rust"
]
}
},
"hash": "ce204159f37ee7815907369a8f678583bf102306"
},
"score_communication": {
"repo": "https://github.com/eclipse-score/communication.git",
Expand All @@ -41,6 +46,12 @@
"//score/mw/com/impl/tracing/configuration:tracing_filter_config_parser_test",
"//score/mw/com/impl/tracing:tracing_runtime_test",
"//score/mw/com/impl/bindings/lola/tracing:tracing_runtime_test"
],
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-base-constraints",
"stage2-rust",
"stage2-libclang-communication"
]
}
},
Expand All @@ -60,7 +71,12 @@
"exclude_test_targets": [
"//src/cpp/tests:bm_kvs_cpp"
],
"rust_coverage_config": "ferrocene-coverage-per"
"rust_coverage_config": "ferrocene-coverage-per",
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-default",
"stage2-rust"
]
}
},
"score_orchestrator": {
Expand All @@ -70,6 +86,11 @@
"code_root_path": "//src/...",
"langs": [
"rust"
],
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-default",
"stage2-rust"
]
}
},
Expand All @@ -80,6 +101,11 @@
"code_root_path": "//src/...",
"langs": [
"rust"
],
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-default",
"stage2-rust"
]
}
},
Expand All @@ -92,6 +118,11 @@
"exclude_test_targets": [
"//score/health_monitor/src/rust:miri_tests",
"//score/launch_manager/src/daemon/src/common/concurrency:mpmc_concurrent_queue_tsan_test"
],
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-default",
"stage2-rust"
]
}
},
Expand All @@ -102,7 +133,6 @@
"//patches/logging:002-needs-json-deps-not-dev-dependency.patch",
"//patches/logging:003-docs-as-code-not-dev-dependency.patch",
"//patches/logging:004-rules-pkg-not-dev-dependency.patch"

],
"metadata": {
"code_root_path": "//score/mw/log/...",
Expand All @@ -116,6 +146,11 @@
],
"exclude_test_targets": [
"//score/mw/log/legacy_non_verbose_api:unit_test"
],
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-default",
"stage2-rust"
]
}
},
Expand All @@ -125,6 +160,10 @@
"metadata": {
"langs": [
"cpp"
],
"bazel_config": [
"stage2-linux-x86_64",
"stage2-gcc-default"
]
}
}
Expand Down Expand Up @@ -165,4 +204,4 @@
}
},
"timestamp": "2026-07-03T00:00:00+00:00Z"
}
}
Loading
Loading