diff --git a/.bazelrc b/.bazelrc index f2100efefb..ddd24a4ed9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -25,9 +25,7 @@ common --@score_logging//score/datarouter/build_configuration_flags:persistent_l common --@score_logging//score/datarouter/build_configuration_flags:persistent_config_feature_enabled=False common --@score_logging//score/datarouter/build_configuration_flags:enable_nonverbose_dlt=False common --@score_logging//score/datarouter/build_configuration_flags:enable_dynamic_configuration_in_datarouter=False -common --@score_logging//score/datarouter/build_configuration_flags:dlt_file_transfer_feature=False common --@score_logging//score/datarouter/build_configuration_flags:use_local_vlan=True -common --@score_logging//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False common --@score_logging//score/mw/log/flags:KRemote_Logging=False # stop legacy behavior of creating __init__.py files @@ -43,6 +41,7 @@ build:shared --host_platform=@score_bazel_platforms//:x86_64-linux build:x86_64-linux --config=shared build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix +build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu build:x86_64-linux --features=-treat_warnings_as_errors # due to baselibs deprecations # this is deprecated, use build:x86_64-linux instead diff --git a/.github/workflows/reusable_integration-build.yml b/.github/workflows/reusable_integration-build.yml index 48f33a2e0e..5aa65f613c 100644 --- a/.github/workflows/reusable_integration-build.yml +++ b/.github/workflows/reusable_integration-build.yml @@ -65,7 +65,7 @@ on: description: 'Optional configuration for the integration test.' required: false type: string - default: 'bl-x86_64-linux' + default: 'x86_64-linux' repo_runner_labels: description: 'Runner label(s) for the job; single label or JSON string/array.' required: false diff --git a/.github/workflows/reusable_smoke-test.yml b/.github/workflows/reusable_smoke-test.yml index 47dbef7f00..ec9b7ac8c2 100644 --- a/.github/workflows/reusable_smoke-test.yml +++ b/.github/workflows/reusable_smoke-test.yml @@ -139,12 +139,12 @@ jobs: matrix: config: - x86_64-linux + # - arm64-linux # Add more configs here as needed - # - bl-aarch64-linux - # - bl-x86_64-qnx + # - arm64-qnx8_0 + # - x86_64-qnx8_0 uses: ./.github/workflows/reusable_integration-build.yml - secrets: - REPO_READ_TOKEN: ${{ secrets.REPO_READ_TOKEN != '' && secrets.REPO_READ_TOKEN || github.token }} + secrets: inherit with: known_good: ${{ needs.preparation.outputs.known_good_updated }} config: ${{ matrix.config }} @@ -157,6 +157,12 @@ jobs: needs: [integration-test, docs] if: always() steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + with: + repository: ${{ env.REFERENCE_INTEGRATION_REPO }} + ref: ${{ inputs.target_branch }} + token: ${{ secrets.REPO_READ_TOKEN != '' && secrets.REPO_READ_TOKEN || github.token }} # get all artefacts from integration-test job with name bazel-build-logs-* - name: Download Integration Test Artifacts uses: actions/download-artifact@v4 @@ -166,41 +172,9 @@ jobs: merge-multiple: true - name: Publish Integration Test Summary run: | - { - echo '## Overall Status' - echo - if [ "${{ needs.integration-test.result }}" == "success" ]; then - echo '- Integration Test: ✅ **SUCCESS**' - else - echo '- Integration Test: ❌ **FAILURE**' - fi - - if [ "${{ needs.docs.result }}" == "success" ]; then - echo '- Documentation Generation: ✅ **SUCCESS**' - else - echo '- Documentation Generation: ❌ **FAILURE**' - fi - - echo - echo '---' - echo - echo '## Integration Test Summary' - echo - - # Process each build_summary.md file from different configs - for summary_file in _logs/integration_test_logs/*/build_summary.md; do - if [ -f "$summary_file" ]; then - config_name=$(basename $(dirname "$summary_file")) - echo "### Configuration: $config_name" - echo - cat "$summary_file" - echo - fi - done - - # If no summary files found, check direct path - if [ -f _logs/integration_test_logs/build_summary.md ]; then - cat _logs/integration_test_logs/build_summary.md - echo - fi - } >> "$GITHUB_STEP_SUMMARY" \ No newline at end of file + ls -l _logs/integration_test_logs || true + python3 scripts/publish_integration_summary.py \ + --integration-result "${{ needs.integration-test.result }}" \ + --docs-result "${{ needs.docs.result }}" \ + --logs-dir "_logs/integration_test_logs" \ + >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/test_integration.yml b/.github/workflows/test_integration.yml index 57bc156a9d..f1e67e95ab 100644 --- a/.github/workflows/test_integration.yml +++ b/.github/workflows/test_integration.yml @@ -23,7 +23,6 @@ on: # - cron: '30 2 * * *' # Every night at 02:30 UTC on main branch jobs: integration_test: - if: false # Disable job as now latest greatest main loop does not work uses: ./.github/workflows/reusable_smoke-test.yml secrets: inherit with: diff --git a/MODULE.bazel b/MODULE.bazel index 74ca244810..2b7e74e276 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -21,7 +21,7 @@ include("//:score_modules.MODULE.bazel") include("//:score_toolchains.MODULE.bazel") ## Python -bazel_dep(name = "rules_python", version = "1.5.1") +bazel_dep(name = "rules_python", version = "1.8.3") PYTHON_VERSION = "3.12" @@ -56,3 +56,7 @@ git_override( bazel_dep(name = "rules_rust", version = "0.67.0") bazel_dep(name = "score_itf", version = "0.1.0") bazel_dep(name = "score_crates", version = "0.0.6") +single_version_override( + module_name = "score_crates", + version = "0.0.6", +) diff --git a/README.md b/README.md index ad093657bb..8a1e2712c0 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ The reference integration workspace serves as a single Bazel build environment t ## Structure of integration folder +> [!NOTE] +> For more details about the integration folder structure and deployment showcases, see [integration/README.md](integration/README.md). + Intention for each folder is described below ### bazel_common @@ -145,10 +148,28 @@ In case of doubt, choose the first. 1. Switch to local path overrides, using the VSCode Task (`Terminal`->`Run Task...`) "Switch Bazel modules to `local_path_overrides`". Note that you can switch back to `git_overrides` (the default) using the task "Switch Bazel modules to `git_overrides`" -2. Run VSCode Task "<Name>: Generate workspace", e.g. "Gita: Generate workspace". + **Command line:** + ```bash + python3 scripts/known_good/update_module_from_known_good.py --override-type local_path + ``` + +2. Update workspace metadata from known good, using the VSCode Task "Update workspace metadata from known good". + This will generate the `.gita-workspace.csv` file based on `known_good.json`. + + **Command line:** + ```bash + python3 scripts/known_good/known_good_to_workspace_metadata.py + ``` + +3. Run VSCode Task "<Name>: Generate workspace", e.g. "Gita: Generate workspace". This will clone all modules using the chosen workspace manager. The modules will be in sub-directories starting with `score_`. Note that the usage of different workspace managers is mutually exclusive. + + **Command line:** + ```bash + gita clone --preserve-path --from-file .gita-workspace.csv + ``` When you now run Bazel, it will use the local working copies of all modules and not download them from git remotes. You can make local changes to each module, which will be directly reflected in the next Bazel run. diff --git a/build_config.json b/build_config.json index 7c06c59dbb..0c9c0e7005 100644 --- a/build_config.json +++ b/build_config.json @@ -3,6 +3,9 @@ "score_baselibs": { "build_targets": "@score_baselibs//score/..." }, + "score_baselibs_rust": { + "build_targets": "@score_baselibs_rust//src/..." + }, "score_communication": { "build_targets": "@score_communication//score/mw/com:com" }, @@ -19,7 +22,7 @@ "build_targets": "@score_test_scenarios//test_scenarios_rust:test_scenarios_rust @score_test_scenarios//test_scenarios_cpp:test_scenarios_cpp" }, "score_feo": { - "build_targets": "-- @score_feo//... -@score_feo//:docs -@score_feo//:ide_support -@score_feo//:needs_json" + "build_targets": "-- @score_feo//feo/... @score_feo//feo-com/... @score_feo//feo-cpp-build/... @score_feo//feo-cpp-macros/... -@score_feo//feo:libfeo_rust -@score_feo//feo:libfeo_recording_rust -@score_feo//feo-com:libfeo_com_rust -@score_feo//examples/rust/..." }, "score_logging": { "build_targets": "@score_logging//score/mw/log" diff --git a/integration/MODULE.bazel b/integration/MODULE.bazel index 3725e8e71e..7a2349a863 100644 --- a/integration/MODULE.bazel +++ b/integration/MODULE.bazel @@ -34,8 +34,6 @@ include("//bazel_common:score_python.MODULE.bazel") # Score modules include("//bazel_common:score_modules.MODULE.bazel") -bazel_dep(name = "score_itf", version = "0.1.0") - bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost") archive_override( module_name = "rules_boost", diff --git a/integration/bazel_common/score_modules.MODULE.bazel b/integration/bazel_common/score_modules.MODULE.bazel index 9b58a3d23d..6c8022d1af 100644 --- a/integration/bazel_common/score_modules.MODULE.bazel +++ b/integration/bazel_common/score_modules.MODULE.bazel @@ -2,6 +2,7 @@ bazel_dep(name = "score_baselibs", version = "0.1.3") bazel_dep(name = "score_communication", version = "0.1.1",) # EB needs 0.1.2 but others does not work with it bazel_dep(name = "score_persistency", version = "0.2.1") bazel_dep(name = "score_scrample", version = "0.1.0") +bazel_dep(name = "score_itf", version = "0.1.0") bazel_dep(name = "score_orchestrator") git_override( module_name = "score_orchestrator", diff --git a/known_good.json b/known_good.json index d82f02b0f6..8aefbcce54 100644 --- a/known_good.json +++ b/known_good.json @@ -2,27 +2,31 @@ "modules": { "score_baselibs": { "repo": "https://github.com/eclipse-score/baselibs.git", - "hash": "fe74ff32f2cb8b2c99af019e7907ad9486e70b09" + "hash": "ffd1c812213c66a436ed982632f6942528b58be8" + }, + "score_baselibs_rust": { + "repo": "https://github.com/eclipse-score/baselibs_rust.git", + "hash": "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c" }, "score_communication": { "repo": "https://github.com/eclipse-score/communication.git", - "hash": "73caa2d2b6f45f806bbd30bdf8675ab1ad551387" + "hash": "0c0ea032995eaa766f5bdcec031bc02ee10d4587" }, "score_logging": { "repo": "https://github.com/eclipse-score/logging.git", - "hash": "8d14d2beec9bb3ccd7a2e24926eacd13b0ffc7d1" + "hash": "2b3e56cf12cf582d0c0a235cad3d1d9b9fc1e494" }, "score_persistency": { "repo": "https://github.com/eclipse-score/persistency.git", - "hash": "69356def0bd731fda9aedc8c65336d8c2ca499da" + "hash": "9c1f0c1b1cd9b49621ecf4f9d541ded100fe2c08" }, "score_orchestrator": { "repo": "https://github.com/eclipse-score/orchestrator.git", - "hash": "18e136c34750c5db707f27f917d52efc7541e087" + "hash": "fd6e21820a361b0c5ab69553f01bd68174d89ffd" }, "score_kyron": { "repo": "https://github.com/eclipse-score/kyron.git", - "hash": "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81" + "hash": "d146401db4557d840850a7b5fc21b0f4fc8aac20" }, "score_feo": { "repo": "https://github.com/eclipse-score/feo.git", @@ -31,15 +35,15 @@ }, "score_tooling": { "repo": "https://github.com/eclipse-score/tooling.git", - "hash": "8894fe5440436a8c6d9e214c97b18d619c7f7eac" + "hash": "17671026150db4b4cc1b35e48af81b97e13685e5" }, "score_platform": { "repo": "https://github.com/eclipse-score/score.git", - "hash": "f4769c4b86bfe46b29b56b6c3e262c5b82db334b" + "hash": "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e" }, "score_bazel_platforms": { "repo": "https://github.com/eclipse-score/bazel_platforms.git", - "hash": "2286de89c35d5660ad183906a6f010b33fcac8db" + "hash": "3ac1b805ba42b58a13f8960f947b7866c8bcf26c" }, "score_test_scenarios": { "repo": "https://github.com/eclipse-score/testing_tools.git", @@ -47,16 +51,16 @@ }, "score_docs_as_code": { "repo": "https://github.com/eclipse-score/docs-as-code.git", - "hash": "a9babc30a7ab1ac43c75415b9784b2bc81ed0f9d" + "hash": "ba006429268e6bd9b856088f7a4217742ed09025" }, "score_process": { "repo": "https://github.com/eclipse-score/process_description.git", - "hash": "496fb6dc347de414d9cbe7523204fdeb6b511197" + "hash": "6c772cf05a493218a5ac6071361bf0b66c5427b2" }, "score_lifecycle_health": { "repo": "https://github.com/eclipse-score/lifecycle.git", - "hash": "4a9928d74847ed9e4f346836c3a8ac7ea75f1851" + "hash": "297808cf7c0013e08a0982133a0add1d9b1a9d9e" } }, - "timestamp": "2026-01-26T11:01:36+00:00Z" + "timestamp": "2026-02-10T21:12:42+00:00Z" } diff --git a/score_modules.MODULE.bazel b/score_modules.MODULE.bazel index 47c2b5a11a..8c2d99b2e0 100644 --- a/score_modules.MODULE.bazel +++ b/score_modules.MODULE.bazel @@ -11,49 +11,56 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -# Generated from known_good.json at 2026-01-26T11:01:36+00:00Z +# Generated from known_good.json at 2026-02-10T21:12:42+00:00Z # Do not edit manually - use scripts/known_good/update_module_from_known_good.py bazel_dep(name = "score_baselibs") git_override( module_name = "score_baselibs", remote = "https://github.com/eclipse-score/baselibs.git", - commit = "fe74ff32f2cb8b2c99af019e7907ad9486e70b09", + commit = "ffd1c812213c66a436ed982632f6942528b58be8", +) + +bazel_dep(name = "score_baselibs_rust") +git_override( + module_name = "score_baselibs_rust", + remote = "https://github.com/eclipse-score/baselibs_rust.git", + commit = "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c", ) bazel_dep(name = "score_communication") git_override( module_name = "score_communication", remote = "https://github.com/eclipse-score/communication.git", - commit = "73caa2d2b6f45f806bbd30bdf8675ab1ad551387", + commit = "0c0ea032995eaa766f5bdcec031bc02ee10d4587", ) bazel_dep(name = "score_logging") git_override( module_name = "score_logging", remote = "https://github.com/eclipse-score/logging.git", - commit = "8d14d2beec9bb3ccd7a2e24926eacd13b0ffc7d1", + commit = "2b3e56cf12cf582d0c0a235cad3d1d9b9fc1e494", ) bazel_dep(name = "score_persistency") git_override( module_name = "score_persistency", remote = "https://github.com/eclipse-score/persistency.git", - commit = "69356def0bd731fda9aedc8c65336d8c2ca499da", + commit = "9c1f0c1b1cd9b49621ecf4f9d541ded100fe2c08", ) bazel_dep(name = "score_orchestrator") git_override( module_name = "score_orchestrator", remote = "https://github.com/eclipse-score/orchestrator.git", - commit = "18e136c34750c5db707f27f917d52efc7541e087", + commit = "fd6e21820a361b0c5ab69553f01bd68174d89ffd", ) bazel_dep(name = "score_kyron") git_override( module_name = "score_kyron", remote = "https://github.com/eclipse-score/kyron.git", - commit = "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81", + commit = "d146401db4557d840850a7b5fc21b0f4fc8aac20", ) bazel_dep(name = "score_feo") @@ -67,21 +74,21 @@ bazel_dep(name = "score_tooling") git_override( module_name = "score_tooling", remote = "https://github.com/eclipse-score/tooling.git", - commit = "fe54d6aa717eb695298a4f0ca938f19e7fd18051", + commit = "17671026150db4b4cc1b35e48af81b97e13685e5", ) bazel_dep(name = "score_platform") git_override( module_name = "score_platform", remote = "https://github.com/eclipse-score/score.git", - commit = "6ef2b8c740eb538d9b9b44fabd3dea5e0a888da6", + commit = "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e", ) bazel_dep(name = "score_bazel_platforms") git_override( module_name = "score_bazel_platforms", remote = "https://github.com/eclipse-score/bazel_platforms.git", - commit = "2286de89c35d5660ad183906a6f010b33fcac8db", + commit = "3ac1b805ba42b58a13f8960f947b7866c8bcf26c", ) bazel_dep(name = "score_test_scenarios") @@ -95,19 +102,19 @@ bazel_dep(name = "score_docs_as_code") git_override( module_name = "score_docs_as_code", remote = "https://github.com/eclipse-score/docs-as-code.git", - commit = "e8622001d597ebc12244f006dde2e0a58c203ef0", + commit = "ba006429268e6bd9b856088f7a4217742ed09025", ) bazel_dep(name = "score_process") git_override( module_name = "score_process", remote = "https://github.com/eclipse-score/process_description.git", - commit = "496fb6dc347de414d9cbe7523204fdeb6b511197", + commit = "6c772cf05a493218a5ac6071361bf0b66c5427b2", ) bazel_dep(name = "score_lifecycle_health") git_override( module_name = "score_lifecycle_health", remote = "https://github.com/eclipse-score/lifecycle.git", - commit = "4a9928d74847ed9e4f346836c3a8ac7ea75f1851", + commit = "297808cf7c0013e08a0982133a0add1d9b1a9d9e", ) diff --git a/score_toolchains.MODULE.bazel b/score_toolchains.MODULE.bazel index baf7e8d538..f3a27898f4 100644 --- a/score_toolchains.MODULE.bazel +++ b/score_toolchains.MODULE.bazel @@ -25,16 +25,36 @@ gcc.toolchain( version = "12.2.0", use_default_package = True, ) - +gcc.toolchain( + name = "score_gcc_aarch64_toolchain", + target_cpu = "aarch64", + target_os = "linux", + use_default_package = True, + version = "12.2.0", +) +gcc.toolchain( + name = "score_qcc_x86_64_toolchain", + sdp_version = "8.0.0", + target_cpu = "x86_64", + target_os = "qnx", + use_default_package = True, + version = "12.2.0", +) +gcc.toolchain( + name = "score_qcc_aarch64_toolchain", + sdp_version = "8.0.0", + target_cpu = "aarch64", + target_os = "qnx", + use_default_package = True, + version = "12.2.0", +) use_repo( gcc, - "score_gcc_toolchain", + "score_gcc_aarch64_toolchain", + "score_gcc_x86_64_toolchain", + "score_qcc_aarch64_toolchain", + "score_qcc_x86_64_toolchain", ) -rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") -rust.toolchain( - edition = "2021", - versions = ["1.93.0"], -) -use_repo(rust, "rust_toolchains") +bazel_dep(name = "score_toolchains_rust", version = "0.4.0", dev_dependency = True) diff --git a/scripts/integration_test.py b/scripts/integration_test.py index 866876bc0e..6ec2aca861 100755 --- a/scripts/integration_test.py +++ b/scripts/integration_test.py @@ -274,7 +274,7 @@ def main(): # Configuration config = args.config log_dir = Path(os.environ.get('LOG_DIR', '_logs/logs')) - summary_file = Path(os.environ.get('SUMMARY_FILE', '_logs/build_summary.md')) + summary_file = Path(os.environ.get('SUMMARY_FILE', f'_logs/build_summary-{config}.md')) known_good_file = args.known_good if not known_good_file: @@ -326,7 +326,7 @@ def main(): # Build each group for group_name, module_config in BUILD_TARGET_GROUPS.items(): - log_file = log_dir / f"{group_name}.log" + log_file = log_dir / f"{group_name}-{config}.log" exit_code, duration = build_group(group_name, module_config.build_targets, config, log_file) diff --git a/scripts/publish_integration_summary.py b/scripts/publish_integration_summary.py new file mode 100644 index 0000000000..c67d9bdd86 --- /dev/null +++ b/scripts/publish_integration_summary.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python3 +import argparse +import os +import sys + + +def format_status(result: str) -> str: + status_map = { + "success": "✅ **SUCCESS**", + "failure": "❌ **FAILURE**", + "cancelled": "⚪ **CANCELLED**", + "skipped": "⚪ **SKIPPED**", + "": "⚪ **UNKNOWN**", + } + return status_map.get(result, "⚪ **UNKNOWN**") + + +def main() -> int: + parser = argparse.ArgumentParser( + description="Publish integration test summary.", + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog=( + "Examples:\n" + " python3 scripts/publish_integration_summary.py \\\n" + " --integration-result success \\\n" + " --docs-result failure \\\n" + " --logs-dir _logs/integration_test_logs\n" + " python3 scripts/publish_integration_summary.py \\\n" + " --integration-result success \\\n" + " --docs-result success" + ), + ) + parser.add_argument( + "--integration-result", + default="", + choices=["success", "failure", "cancelled", "skipped"], + help="Integration test result.", + ) + parser.add_argument( + "--docs-result", + default="", + choices=["success", "failure", "cancelled", "skipped"], + help="Documentation result.", + ) + parser.add_argument( + "--logs-dir", + default="_logs", + help="Directory containing build_summary.md files.", + ) + args = parser.parse_args() + + integration_result = args.integration_result + docs_result = args.docs_result + logs_dir = args.logs_dir + + out = sys.stdout + + out.write("## Overall Status\n\n") + + out.write(f"- Integration Test: {format_status(integration_result)}\n") + out.write(f"- Documentation Generation: {format_status(docs_result)}\n") + + out.write("\n---\n\n") + out.write("## Integration Test Summary\n\n") + + summaries = [] + if os.path.isdir(logs_dir): + for root, _, files in os.walk(logs_dir): + for name in files: + if name.startswith("build_summary-") and name.endswith(".md"): + summaries.append(os.path.join(root, name)) + + if not summaries: + out.write(f"No build_summary-*.md files found in '{logs_dir}'.\n\n") + return 0 + for summary_file in sorted(summaries): + filename = os.path.basename(summary_file) + config_name = filename[len("build_summary-") : -len(".md")] + out.write(f"### Configuration: {config_name}\n\n") + with open(summary_file, "r", encoding="utf-8", errors="replace") as handle: + out.write(handle.read()) + out.write("\n\n") + + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/run_unit_tests.sh b/scripts/run_unit_tests.sh index 7f12776f36..542fe8c928 100755 --- a/scripts/run_unit_tests.sh +++ b/scripts/run_unit_tests.sh @@ -26,7 +26,7 @@ declare -A UT_TARGET_GROUPS=( [persistency]="@score_persistency//src/rust/rust_kvs:tests" # C++ test has linker issues with logging library [orchestrator]="@score_orchestrator//src/..." # ok [kyron]="@score_kyron//:unit_tests" # ok - [feo]="@score_feo//... --build_tests_only" # ok (flag required or error from docs) + [feo]="--build_tests_only -- @score_feo//... -@score_feo//:format.check_Rust_with_rustfmt" # ok (flag required or error from docs) # [logging]="@score_logging//score/... \ # --@score_baselibs//score/memory/shared/flags:use_typedshmd=False \ # --@score_baselibs//score/json:base_library=nlohmann \