Skip to content

build: adopt baselibs-style toolchain settings - #5

Merged
FScholPer merged 20 commits into
mainfrom
fix/adopt-baselibs-toolchain-settings
Jul 7, 2026
Merged

build: adopt baselibs-style toolchain settings#5
FScholPer merged 20 commits into
mainfrom
fix/adopt-baselibs-toolchain-settings

Conversation

@FScholPer

@FScholPer FScholPer commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Aligns .bazelrc and MODULE.bazel with the build configuration used in eclipse-score/baselibs so that code compiles with the correct S-CORE certified toolchains (GCC 12.2.0 / Ferrocene Rust).

Changes

MODULE.bazel

  • Add score_bazel_cpp_toolchains GCC extension — declares score_gcc_x86_64_toolchain (x86_64/Linux, GCC 12.2.0) and score_gcc_aarch64_toolchain
  • Add score_toolchains_rust 0.8.0 (Ferrocene Rust toolchain)
  • Add platforms + score_bazel_platforms dependencies
  • Upgrade score_docs_as_code to 2.0.3 (compatibility level 2, required by transitive score_process dependency — fixes ERROR: score_process@1.3.2 depends on score_docs_as_code@2.0.3 with compatibility level 2)
  • Align rules_python, rules_rust, rules_cc, googletest, score_tooling, aspect_rules_lint, buildifier_prebuilt to versions actually resolved by the dependency graph (removes all --check_direct_dependencies warnings)

.bazelrc

  • Add HTTP retry / timeout settings matching baselibs (http_connector_attempts, http_timeout_scaling)
  • Register GCC x86_64 + Ferrocene as common extra toolchains for host (required for proc-macro metadata compatibility)
  • Add _bl_stub config: baselibs required flags (nlohmann JSON backend, use_typedshmd=False, warning features)
  • Add _bl_toolchain_common config: incompatible_strict_action_env, host_platform=@score_bazel_platforms//:x86_64-linux
  • Add bl-x86_64-linux named build config targeting x86_64-linux-gcc_12.2.0-posix

Verified

bazel build --config=bl-x86_64-linux //score/...
INFO: Found 19 targets...
INFO: 77 processes: 31 internal, 46 processwrapper-sandbox.
INFO: Build completed successfully, 77 total actions

Related

Frank Scholter Peres frank.scholter_peres@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information

  • Assisted by Copilot

Aligns .bazelrc and MODULE.bazel with the toolchain configuration
used in eclipse-score/baselibs so that code compiles with the
correct S-CORE certified toolchains.

MODULE.bazel changes:
- Add score_bazel_cpp_toolchains GCC extension: declares
  score_gcc_x86_64_toolchain (x86_64/Linux, GCC 12.2.0) and
  score_gcc_aarch64_toolchain
- Add score_toolchains_rust 0.8.0 (Ferrocene Rust toolchain)
- Add platforms + score_bazel_platforms dependencies
- Upgrade score_docs_as_code to 2.0.3 (compat level 2, required
  by transitive score_process dependency)
- Align rules_python, rules_rust, rules_cc, googletest,
  score_tooling, aspect_rules_lint, buildifier_prebuilt to the
  versions actually resolved by the dependency graph

.bazelrc changes:
- Add HTTP retry/timeout settings matching baselibs
- Register GCC x86_64 + Ferrocene as common extra toolchains for host
- Add _bl_stub config (baselibs flags: nlohmann JSON backend,
  use_typedshmd=False, warning features)
- Add _bl_toolchain_common config (incompatible_strict_action_env,
  host_platform=x86_64-linux)
- Add bl-x86_64-linux named config targeting
  score_bazel_platforms x86_64-linux-gcc_12.2.0-posix

Build command:
  bazel build --config=bl-x86_64-linux //score/...

Verified: 19 targets, 77 actions, Build completed successfully.
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
2026/07/07 06:49:00 Downloading https://releases.bazel.build/8.6.0/release/bazel-8.6.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 3e68805c-568f-4dee-b3bb-2f8d810924f8
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (24 packages loaded, 10 targets configured)

Analyzing: target //:license-check (81 packages loaded, 10 targets configured)

Analyzing: target //:license-check (87 packages loaded, 10 targets configured)

Analyzing: target //:license-check (138 packages loaded, 2607 targets configured)

Analyzing: target //:license-check (157 packages loaded, 3855 targets configured)

Analyzing: target //:license-check (163 packages loaded, 8132 targets configured)

Analyzing: target //:license-check (163 packages loaded, 8133 targets configured)

Analyzing: target //:license-check (163 packages loaded, 8133 targets configured)

Analyzing: target //:license-check (163 packages loaded, 8133 targets configured)

Analyzing: target //:license-check (163 packages loaded, 8133 targets configured)

Analyzing: target //:license-check (167 packages loaded, 10142 targets configured)

Analyzing: target //:license-check (168 packages loaded, 10262 targets configured)

Analyzing: target //:license-check (168 packages loaded, 10262 targets configured)

Analyzing: target //:license-check (168 packages loaded, 10262 targets configured)

Analyzing: target //:license-check (168 packages loaded, 10262 targets configured)

INFO: Analyzed target //:license-check (169 packages loaded, 11841 targets configured).
[11 / 16] [Prepa] Expanding template external/score_tooling+/dash/tool/formatters/_dash_format_converter_stage2_bootstrap.py [for tool]
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 207.280s, Critical Path: 2.37s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

- add pre-commit configuration and shared tools/run_tool.sh wrapper
- import missing local link-check action from docs-as-code
- fix gitlint workflow/action metadata for actionlint compatibility
- refresh MODULE/MODULE.lock after tidy and extension resolution
- apply auto-fixes produced by repository hooks (copyright/eof)
@FScholPer

FScholPer commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Pushed follow-up commit to make the branch pre-commit clean.

What was added/fixed:

  • Added
  • Added
  • Imported missing local action: from docs-as-code
  • Fixed gitlint workflow/action metadata for actionlint compatibility
  • Refreshed + after tidy/update
  • Included auto-fixes applied by hooks (copyright/eof)

@FScholPer

FScholPer commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Pushed follow-up commit c909c5f to make this branch pre-commit clean.

@FScholPer
FScholPer requested a review from antonkri June 24, 2026 12:30
Add a minimal GitHub Actions workflow aligned with baselibs that
builds the repository with --config=bl-x86_64-linux on PRs, main
pushes, and merge groups.
@FScholPer

Copy link
Copy Markdown
Contributor Author

Added a basic Linux build workflow in this PR:

  • .github/workflows/build_linux.yml

It is aligned with baselibs style and now compiles the project in CI using:

  • bazel build --config=bl-x86_64-linux -- //score/... //src/... //tests/...

Triggers:

  • pull_request (opened/reopened/synchronize)
  • push to main
  • merge_group
  • workflow_dispatch

I also ran actionlint locally for this workflow and it passes.

Include //score/... only when score/ contains Bazel packages, so CI
works both before and after migration to baselibs-like source layout.
Comment thread score/mw/diag/design/diag_api_rust.svg Outdated
Comment thread tests/cpp/test_main.cpp Outdated
Comment thread .github/actions/link-check/link_parser.py
Comment thread .bazelrc Outdated
Comment thread MODULE.bazel Outdated
Comment on lines +81 to +85
# FIXME: To be removed after https://github.com/eclipse-score/baselibs/issues/266 is resolved
single_version_override(
module_name = "grpc-java",
version = "1.70.0",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need that in the inc_diagnostics repo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because this is still a problem coming from baselibs that it expect this in that version

Comment thread .bazelrc Outdated
Comment thread tests/cpp/test_main.cpp Outdated
@sagovic

sagovic commented Jun 29, 2026

Copy link
Copy Markdown

@FScholPer the repository is based on this template https://github.com/eclipse-score/module_template
Meanwhile the structure changed and my integration eclipse-opensovd/opensovd#108 proposal is based on the latest template version..

Does it make sense to sync so we do not diverge too much?

@RolandJentschETAS what is your opinion on re-syncing.

Comment thread .github/workflows/build_linux.yml
Comment thread .github/workflows/build_linux.yml
Comment thread .bazelrc
Comment thread .github/workflows/daily.yml Outdated
@FScholPer

Copy link
Copy Markdown
Contributor Author

@FScholPer the repository is based on this template https://github.com/eclipse-score/module_template Meanwhile the structure changed and my integration eclipse-opensovd/opensovd#108 proposal is based on the latest template version..

Does it make sense to sync so we do not diverge too much?

@RolandJentschETAS what is your opinion on re-syncing.

I can add the automatic synching via bot or we do it manually. Whats your opinion?

Updated the daily maintenance workflow to streamline permissions and job structure.

Signed-off-by: Frank Scholter Peres(MBTI) <145544737+FScholPer@users.noreply.github.com>
@lh-sag

lh-sag commented Jul 1, 2026

Copy link
Copy Markdown

@FScholPer the repository is based on this template https://github.com/eclipse-score/module_template Meanwhile the structure changed and my integration eclipse-opensovd/opensovd#108 proposal is based on the latest template version..
Does it make sense to sync so we do not diverge too much?
@RolandJentschETAS what is your opinion on re-syncing.

I can add the automatic synching via bot or we do it manually. Whats your opinion?

We might need both:

  1. A manual sync - just once
  2. Automatic sync via the bot in the future if we find it useful

The bot was introduced after the repository was created and maybe we need the manual sync first

@FScholPer

Copy link
Copy Markdown
Contributor Author

@FScholPer the repository is based on this template https://github.com/eclipse-score/module_template Meanwhile the structure changed and my integration eclipse-opensovd/opensovd#108 proposal is based on the latest template version..
Does it make sense to sync so we do not diverge too much?
@RolandJentschETAS what is your opinion on re-syncing.

I can add the automatic synching via bot or we do it manually. Whats your opinion?

We might need both:

  1. A manual sync - just once
  2. Automatic sync via the bot in the future if we find it useful

The bot was introduced after the repository was created and maybe we need the manual sync first

We can directly use https://github.com/eclipse-score/cicd-workflows/blob/main/.github/workflows/template-sync.yml if we want. But many of the repos do not sync at all or rely on the template. There are other proposals in discussion like:

-> https://chatgpt.com/share/6a399423-a560-83ed-ae15-435f68b5b3ca

@lh-sag

lh-sag commented Jul 1, 2026

Copy link
Copy Markdown

@FScholPer the repository is based on this template https://github.com/eclipse-score/module_template Meanwhile the structure changed and my integration eclipse-opensovd/opensovd#108 proposal is based on the latest template version..
Does it make sense to sync so we do not diverge too much?
@RolandJentschETAS what is your opinion on re-syncing.

I can add the automatic synching via bot or we do it manually. Whats your opinion?

We might need both:

  1. A manual sync - just once
  2. Automatic sync via the bot in the future if we find it useful

The bot was introduced after the repository was created and maybe we need the manual sync first

We can directly use https://github.com/eclipse-score/cicd-workflows/blob/main/.github/workflows/template-sync.yml if we want. But many of the repos do not sync at all or rely on the template. There are other proposals in discussion like:

-> https://chatgpt.com/share/6a399423-a560-83ed-ae15-435f68b5b3ca

How about having an initial sync (by whatever mean) and postpone the question about continuously keeping it in sync in the future.
Right now the repo is quite off from the template.

Comment thread score/mw/diag/design/diag_api_rust.svg Outdated
Comment thread BUILD Outdated
FScholPer and others added 2 commits July 3, 2026 11:11
Signed-off-by: Frank Scholter Peres(MBTI) <145544737+FScholPer@users.noreply.github.com>
@FScholPer

Copy link
Copy Markdown
Contributor Author

@nradakovic @stmuench @lh-sag @MonikaKumari26 @antonkri please check again if it fits now

@stmuench

stmuench commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@FScholPer I request @nradakovic to have a look once more

Comment thread .bazelrc Outdated
Signed-off-by: Frank Scholter Peres(MBTI) <145544737+FScholPer@users.noreply.github.com>
@nradakovic
nradakovic self-requested a review July 7, 2026 07:45
@FScholPer
FScholPer merged commit 060047f into main Jul 7, 2026
9 checks passed
@FScholPer
FScholPer deleted the fix/adopt-baselibs-toolchain-settings branch July 7, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants