Skip to content

build: adopt baselibs-style toolchain settings#5

Open
FScholPer wants to merge 5 commits into
mainfrom
fix/adopt-baselibs-toolchain-settings
Open

build: adopt baselibs-style toolchain settings#5
FScholPer wants to merge 5 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: [email protected] depends on [email protected] 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 [email protected], 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]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: 489e357a-4c25-4443-a69e-7d49ba135ce6
Computing main repo mapping: 
Computing main repo mapping: 
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: 
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 (27 packages loaded, 9 targets configured)

Analyzing: target //:license-check (74 packages loaded, 9 targets configured)

Analyzing: target //:license-check (88 packages loaded, 9 targets configured)

Analyzing: target //:license-check (88 packages loaded, 9 targets configured)

Analyzing: target //:license-check (141 packages loaded, 530 targets configured)

Analyzing: target //:license-check (146 packages loaded, 2659 targets configured)

Analyzing: target //:license-check (146 packages loaded, 2659 targets configured)

Analyzing: target //:license-check (161 packages loaded, 4682 targets configured)

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

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

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

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

Analyzing: target //:license-check (169 packages loaded, 7951 targets configured)

Analyzing: target //:license-check (172 packages loaded, 10081 targets configured)

Analyzing: target //:license-check (172 packages loaded, 10081 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

Analyzing: target //:license-check (173 packages loaded, 10201 targets configured)

INFO: Analyzed target //:license-check (174 packages loaded, 12136 targets configured).
[7 / 13] Creating runfiles tree bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/score_tooling+/dash/tool/formatters/dash_format_converter.runfiles [for tool]; 0s local ... (2 actions, 1 running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[11 / 13] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar
[12 / 13] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
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: 225.870s, Critical Path: 2.63s
INFO: 13 processes: 9 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 13 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.
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.

1 participant