From 6fe83c879cd6e673c54209cfc6b511116ed6c6b3 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 20 Feb 2026 09:25:33 +0000 Subject: [PATCH 1/6] bump versions and fixed stuff --- .DS_Store | Bin 0 -> 6148 bytes .bazelrc | 91 ++++++++++++-- .github/workflows/build.yml | 4 +- .github/workflows/release_verification.yml | 2 +- BUILD | 3 +- MODULE.bazel | 116 +++++++++++------- README.md | 8 +- baselibs | 1 + examples/BUILD | 4 + feo/.DS_Store | Bin 0 -> 6148 bytes feo/ad-demo/BUILD.bazel | 9 ++ feo/ad-demo/lichtblick-com/BUILD.bazel | 10 ++ score/BUILD | 15 +++ {src => score/src}/BUILD | 0 {src => score/src}/assert_handler.cpp | 0 {src => score/src}/assert_handler.h | 0 {src => score/src}/datatype.cpp | 0 {src => score/src}/datatype.h | 0 {src => score/src}/etc/logging.json | 0 {src => score/src}/etc/mw_com_config.json | 0 {src => score/src}/main.cpp | 0 {src => score/src}/sample_sender_receiver.cpp | 0 {src => score/src}/sample_sender_receiver.h | 0 {tests => score/tests}/cpp/BUILD | 0 {tests => score/tests}/cpp/test_main.cpp | 0 {tests => score/tests}/rust/BUILD | 3 + {tests => score/tests}/rust/test_main.rs | 0 27 files changed, 207 insertions(+), 59 deletions(-) create mode 100644 .DS_Store create mode 160000 baselibs create mode 100644 feo/.DS_Store create mode 100644 score/BUILD rename {src => score/src}/BUILD (100%) rename {src => score/src}/assert_handler.cpp (100%) rename {src => score/src}/assert_handler.h (100%) rename {src => score/src}/datatype.cpp (100%) rename {src => score/src}/datatype.h (100%) rename {src => score/src}/etc/logging.json (100%) rename {src => score/src}/etc/mw_com_config.json (100%) rename {src => score/src}/main.cpp (100%) rename {src => score/src}/sample_sender_receiver.cpp (100%) rename {src => score/src}/sample_sender_receiver.h (100%) rename {tests => score/tests}/cpp/BUILD (100%) rename {tests => score/tests}/cpp/test_main.cpp (100%) rename {tests => score/tests}/rust/BUILD (90%) rename {tests => score/tests}/rust/test_main.rs (100%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6c3a31652298ebe9cadef25c3953be706ce3c6fb GIT binary patch literal 6148 zcmeHKJ5EDE475p#C()#&+$(T{RTNIZ1^9$iK@TZHqI^}(#nG6tT@XE}qBPN1^3JZ; zv#Xur`Ps~T{kgq2TbbDaC)$z2+_+Dl*-b@=9%p>m-rnr6J-qH`*?$Mf9l-grXM49_ z{FiZzGZwbP_Q)d{!aXu6AO)m=6p#W^;0y(-mJYXPoFS?dkOJ4K0KX3nPV9wKVthI< zL<<01A{>T!^b)|v0I(NMiHN{FslcRqwHTgs#9QU{!YMK7=5aI5shhnz6pz~xZ;@`^ z6E#W!DR8R5B9|-H{|ER#{r@RRD=8oau1W!4ZXP#lJgI8y>~XBM4gLgY&NrNfc~CG! lIR-{K#)9SeE|M~@agP07I3)%h@t_0sGeBKrQsB}G`~Vok8Z!U@ literal 0 HcmV?d00001 diff --git a/.bazelrc b/.bazelrc index acc86ba..bb5f2ed 100644 --- a/.bazelrc +++ b/.bazelrc @@ -14,6 +14,90 @@ 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 +build --credential_helper="*.qnx.com=%workspace%/.github/tools/qnx_credential_helper.py" + +#Baselibs flags +build --@score_baselibs//score/json:base_library=nlohmann +build --@score_baselibs//score/mw/log/flags:KRemote_Logging=False + +# Clippy linting (enabled by default) +build --aspects=@score_rust_policies//clippy:linters.bzl%clippy_strict +build --output_groups=+rules_lint_human +build:lint --@aspect_rules_lint//lint:fail_on_violation=true + +test --test_output=errors + + +# Target configuration for CPU:x86-64|OS:Linux build (do not use it in case of system toolchains!) +#build:sc-x86_64-linux --config=_bl_stub +#build:sc-x86_64-linux --config=_bl_toolchain_common +build:sc-x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix +build:sc-x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix +build:sc-x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu +test:sc-x86_64-linux --config=_bl_common + +# Target configuration for CPU:AArch64|OS:Linux build (do not use it in case of system toolchains!) +#build:sc-aarch64-linux --config=_bl_stub +#build:sc-aarch64-linux --config=_bl_toolchain_common +build:sc-aarch64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix +build:sc-aarch64-linux --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux-gcc_12.2.0-posix +test:sc-aarch64-linux --config=_bl_common + + +# Target configuration for CPU:x86-64|OS:QNX build (do not use it in case of system toolchains!) +#build:sc-x86_64-qnx --config=_bl_stub +#build:sc-x86_64-qnx --config=_bl_toolchain_common +build:sc-x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix +build:sc-x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix +test:sc-x86_64-qnx --config=_bl_common + +# Target configuration for CPU:AArch64|OS:QNX build (do not use it in case of system toolchains!) +#build:sc-aarch64-qnx --config=_bl_stub +#build:sc-aarch64-qnx --config=_bl_toolchain_common +build:sc-aarch64-qnx --incompatible_strict_action_env +build:sc-aarch64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix +build:sc-aarch64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix +test:sc-aarch64-qnx --config=_bl_common + +# Target configuration for CPU:AArch64|OS:QNX build with Ferrocene Rust toolchain (do not use it in case of system toolchains!) +build:per-arm64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800 + +coverage --features=coverage +coverage --combined_report=lcov +coverage --cache_test_results=no + +# Sanitizer configuration for C++ +test:asan_ubsan_lsan --features=asan +test:asan_ubsan_lsan --features=ubsan +test:asan_ubsan_lsan --features=lsan +test:asan_ubsan_lsan --copt -g3 +test:asan_ubsan_lsan --platform_suffix=asan_ubsan_lsan +test:asan_ubsan_lsan --test_env=ASAN_OPTIONS="exitcode=55 allow_addr2line=1 verbosity=1 coverage=1 check_initialization_order=1 detect_stack_use_after_return=1 print_stats=1 halt_on_error=1 allocator_may_return_null=1 detect_leaks=1" +test:asan_ubsan_lsan --test_env=UBSAN_OPTIONS="exitcode=55 allow_addr2line=1 verbosity=1 coverage=1 print_stacktrace=1 halt_on_error=1" + +# ------------------------------------------------------------------------------- +# Ferrocene Rust coverage config +# ------------------------------------------------------------------------------- +build:ferrocene-coverage --@rules_rust//rust/settings:extra_rustc_flag=-Cinstrument-coverage +build:ferrocene-coverage --@rules_rust//rust/settings:extra_rustc_flag=-Clink-dead-code +build:ferrocene-coverage --@rules_rust//rust/settings:extra_rustc_flag=-Ccodegen-units=1 +build:ferrocene-coverage --@rules_rust//rust/settings:extra_rustc_flag=-Cdebuginfo=2 +build:ferrocene-coverage --@rules_rust//rust/settings:extra_exec_rustc_flag=-Cinstrument-coverage +build:ferrocene-coverage --@rules_rust//rust/settings:extra_exec_rustc_flag=-Clink-dead-code +build:ferrocene-coverage --@rules_rust//rust/settings:extra_exec_rustc_flag=-Ccodegen-units=1 +build:ferrocene-coverage --@rules_rust//rust/settings:extra_exec_rustc_flag=-Cdebuginfo=2 +test:ferrocene-coverage --run_under=@score_tooling//coverage:llvm_profile_wrapper + +# ------------------------------------------------------------------------------- +# Import local user workspace file, if exists +# ------------------------------------------------------------------------------- +try-import %workspace%/user.bazelrc + + # Build stamping for version info build --workspace_status_command=$(pwd)/bazel_stamp_vars.sh @@ -26,10 +110,3 @@ build:_common --cxxopt=-Wno-error=deprecated-declarations # Host platform build configuration build:host --config=_common - -build:x86_64-qnx --config=_common -build:x86_64-qnx --noexperimental_merged_skyframe_analysis_execution -build:x86_64-qnx --incompatible_enable_cc_toolchain_resolution -build:x86_64-qnx --incompatible_strict_action_env -build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx -build:x86_64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_x86_64 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 930c42b..b1e549a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,8 +24,8 @@ jobs: contents: read pull-requests: read with: - bazel-target: "//src:scrample" - bazel-config: "x86_64-qnx" + bazel-target: "//score/..." + bazel-config: "sc-x86_64-qnx" credential-helper: ".github/tools/qnx_credential_helper.py" environment-name: "workflow-approval" secrets: diff --git a/.github/workflows/release_verification.yml b/.github/workflows/release_verification.yml index d6fd014..850861a 100644 --- a/.github/workflows/release_verification.yml +++ b/.github/workflows/release_verification.yml @@ -41,7 +41,7 @@ jobs: SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} run: | bazel build --config x86_64-qnx --credential_helper=*.qnx.com=${{ github.workspace }}/.github/tools/qnx_credential_helper.py -- \ - //src:scrample + //score/src:scrample - name: Cleanup QNX License if: always() run: rm -rf /opt/score_qnx diff --git a/BUILD b/BUILD index 9b5e377..cbad380 100644 --- a/BUILD +++ b/BUILD @@ -27,9 +27,8 @@ copyright_checker( name = "copyright", srcs = [ "feo/ad-demo", + "score", "scorex", - "src", - "tests", "//:BUILD", "//:MODULE.bazel", ], diff --git a/MODULE.bazel b/MODULE.bazel index 1323a4c..339f361 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -12,11 +12,12 @@ # ******************************************************************************* module( name = "score_scrample", - version = "0.1.0", + version = "0.0.0", + compatibility_level = 0, ) # Configure and register the python toolchain. -bazel_dep(name = "rules_python", version = "1.4.1") +bazel_dep(name = "rules_python", version = "1.8.3") PYTHON_VERSION = "3.12" @@ -27,28 +28,67 @@ python.toolchain( ) use_repo(python, "python_versions") -# Configure the target toolchain. -bazel_dep(name = "score_toolchains_qnx", version = "0.0.2", dev_dependency = True) -qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx", dev_dependency = True) -qnx.sdp( - sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63", - strip_prefix = "installation", - url = "https://www.qnx.com/download/download/79858/installation.tgz", +## Configure the C++ toolchain + +bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2", dev_dependency = True) + +gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True) +gcc.toolchain( + name = "score_gcc_x86_64_toolchain", + target_cpu = "x86_64", + target_os = "linux", + use_default_package = True, + version = "12.2.0", +) +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_aarch64_toolchain", + "score_gcc_x86_64_toolchain", + "score_qcc_aarch64_toolchain", + "score_qcc_x86_64_toolchain", ) -use_repo(qnx, "toolchains_qnx_sdp") -use_repo(qnx, "toolchains_qnx_qcc") -# register_toolchains("@toolchains_qnx_qcc//:qcc_x86_64") # Add GoogleTest dependency -bazel_dep(name = "googletest", version = "1.17.0") +bazel_dep(name = "googletest", version = "1.17.0.bcr.2") +bazel_dep(name = "google_benchmark", version = "1.9.5") + +# rust +bazel_dep(name = "rules_rust", version = "0.67.0") +git_override( + module_name = "rules_rust", + commit = "2b171a7376e69cb1207eced1f66904ce4ae0c819", + remote = "https://github.com/pawelrutkaq/rules_rust.git", # To be fixed once rule_rust is in score bazel registry +) + +# Shared Rust policies (Clippy config, etc.), overridden locally during development. +bazel_dep(name = "score_rust_policies", version = "0.0.5", dev_dependency = True) -# Add Rust rules for Rust tests -bazel_dep(name = "rules_rust", version = "0.61.0") -rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") -rust.toolchain(edition = "2021") # Add boost dependency bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost") @@ -61,27 +101,25 @@ archive_override( bazel_dep(name = "boost.program_options", version = "1.87.0") # C/C++ rules for Bazel -bazel_dep(name = "rules_cc", version = "0.2.1") +bazel_dep(name = "rules_cc", version = "0.2.16") # tooling -bazel_dep(name = "score_tooling", version = "1.0.5") -bazel_dep(name = "score_rust_policies", version = "0.0.3") -bazel_dep(name = "aspect_rules_lint", version = "1.5.3") +bazel_dep(name = "score_tooling", version = "1.1.0") +bazel_dep(name = "aspect_rules_lint", version = "2.0.0") bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") #docs-as-code -bazel_dep(name = "score_docs_as_code", version = "2.3.3") -bazel_dep(name = "score_process", version = "1.4.2") -bazel_dep(name = "score_baselibs", version = "0.1.3") -bazel_dep(name = "score_communication", version = "0.1.1") +bazel_dep(name = "score_process", version = "1.4.3") +bazel_dep(name = "score_baselibs", version = "0.2.4") +bazel_dep(name = "score_communication", version = "0.1.2") bazel_dep(name = "platforms", version = "1.0.0") -bazel_dep(name = "score_bazel_platforms", version = "0.0.2") -bazel_dep(name = "score_logging", version = "0.0.3") -git_override( - module_name = "score_logging", - commit = "9ed6a88cab10a81bf6b0813712cbd7b9fc7e44c5", - remote = "https://github.com/eclipse-score/logging.git", -) +bazel_dep(name = "score_bazel_platforms", version = "0.0.4") +bazel_dep(name = "score_logging", version = "0.1.0") +#git_override( +# module_name = "score_logging", +# commit = "9ed6a88cab10a81bf6b0813712cbd7b9fc7e44c5", +# remote = "https://github.com/eclipse-score/logging.git", +#) # TRLC dependency for requirements traceability bazel_dep(name = "trlc", version = "0.0.0") @@ -144,18 +182,10 @@ crate.from_cargo( ) use_repo(crate, "ad-demo-local-crates") -# Override feo's dependency on score_docs_as_code to use 2.3.3 -single_version_override( - module_name = "score_docs_as_code", - version = "2.3.3", -) +bazel_dep(name = "score_docs_as_code", version = "3.0.0") + +bazel_dep(name = "score_feo", version = "1.0.5") -bazel_dep(name = "feo", version = "1.0.1") -git_override( - module_name = "feo", - commit = "05702d0a386daf23912c26ccb2b35b584d3a9e8c", - remote = "https://github.com/eclipse-score/feo.git", -) pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") pip.parse( diff --git a/README.md b/README.md index 847f380..9248fd3 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,12 @@ SCRAMPLE consists of two operational modes: ### Standard Build (Host Platform) ```bash -bazel build --config=host //src:scrample +bazel build --config=host //score/src:scrample ``` ### QNX Cross-Compilation ```bash -bazel build --config=x86_64-qnx //src:scrample +bazel build --config=x86_64-qnx //score/src:scrample ``` ### Build All Tests @@ -192,12 +192,12 @@ The project includes example tests demonstrating the testing infrastructure: Run all tests: ```bash -bazel test --config=host //tests/... +bazel test --config=host //score/tests/... ``` Run all tests and format checks: ```bash -bazel test --config=host //tests/... //:format.check +bazel test --config=host //score/tests/... //:format.check ``` ## Contributing diff --git a/baselibs b/baselibs new file mode 160000 index 0000000..6951cd2 --- /dev/null +++ b/baselibs @@ -0,0 +1 @@ +Subproject commit 6951cd2a3045fb7a053acf203833a17704c22ccf diff --git a/examples/BUILD b/examples/BUILD index 012dd54..aee1f2f 100644 --- a/examples/BUILD +++ b/examples/BUILD @@ -4,5 +4,9 @@ filegroup( srcs = [ "Cargo.lock", ], + tags = ["no-clippy"], + target_compatible_with = [ + "@platforms//os:linux", + ], visibility = ["//visibility:public"], ) diff --git a/feo/.DS_Store b/feo/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f135fc0bffa9fae1d7883cdfdf754a59c8a6dc2e GIT binary patch literal 6148 zcmeHKJ8r`;3?)+o4UolSMqQvoZy*HD337opaW@wpg6y7ht{$zApCN&pEg4cg0@RZz zJ_&k*X^Mz$PW`(`D^QK!g0oze9PD$55s<(W&a&8?yG!CFK_S* z{y5kcjS5f!DnJFO02R2i0$E^}t2>{|=;as-E5~b3 bio9ZT?AOF8(CLUf9mt;n(}hL_9<9JH^cWR4 literal 0 HcmV?d00001 diff --git a/feo/ad-demo/BUILD.bazel b/feo/ad-demo/BUILD.bazel index b2e4d07..3d3017c 100644 --- a/feo/ad-demo/BUILD.bazel +++ b/feo/ad-demo/BUILD.bazel @@ -31,6 +31,9 @@ rust_library( ], crate_name = "ad_demo", data = ["src/assets/gps_route.mcap"], + target_compatible_with = [ + "@platforms//os:linux", + ], visibility = ["//visibility:public"], deps = [ "@ad-demo-local-crates//:camino", @@ -56,6 +59,9 @@ rust_binary( srcs = [ "src/agents/primary.rs", ], + target_compatible_with = [ + "@platforms//os:linux", + ], visibility = ["//visibility:public"], deps = [ ":activities_lib", @@ -72,6 +78,9 @@ rust_binary( srcs = [ "src/agents/secondary.rs", ], + target_compatible_with = [ + "@platforms//os:linux", + ], visibility = ["//visibility:public"], deps = [ ":activities_lib", diff --git a/feo/ad-demo/lichtblick-com/BUILD.bazel b/feo/ad-demo/lichtblick-com/BUILD.bazel index 14a1f76..7638ffb 100644 --- a/feo/ad-demo/lichtblick-com/BUILD.bazel +++ b/feo/ad-demo/lichtblick-com/BUILD.bazel @@ -18,12 +18,22 @@ compile_pip_requirements( name = "requirements", requirements_in = "requirements.in", requirements_txt = "requirements_lock.txt", + tags = [ + "manual", + "no-clippy", + ], + target_compatible_with = [ + "@platforms//os:linux", + ], ) py_binary( name = "foxglove_ws_server", srcs = ["foxglove_ws_server.py"], main = "foxglove_ws_server.py", + target_compatible_with = [ + "@platforms//os:linux", + ], visibility = ["//visibility:public"], deps = [ requirement("foxglove_websocket"), diff --git a/score/BUILD b/score/BUILD new file mode 100644 index 0000000..1cda3c9 --- /dev/null +++ b/score/BUILD @@ -0,0 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2025 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 +# ******************************************************************************* + +# Scrample - Score Example Application +# This directory contains the main source code and tests diff --git a/src/BUILD b/score/src/BUILD similarity index 100% rename from src/BUILD rename to score/src/BUILD diff --git a/src/assert_handler.cpp b/score/src/assert_handler.cpp similarity index 100% rename from src/assert_handler.cpp rename to score/src/assert_handler.cpp diff --git a/src/assert_handler.h b/score/src/assert_handler.h similarity index 100% rename from src/assert_handler.h rename to score/src/assert_handler.h diff --git a/src/datatype.cpp b/score/src/datatype.cpp similarity index 100% rename from src/datatype.cpp rename to score/src/datatype.cpp diff --git a/src/datatype.h b/score/src/datatype.h similarity index 100% rename from src/datatype.h rename to score/src/datatype.h diff --git a/src/etc/logging.json b/score/src/etc/logging.json similarity index 100% rename from src/etc/logging.json rename to score/src/etc/logging.json diff --git a/src/etc/mw_com_config.json b/score/src/etc/mw_com_config.json similarity index 100% rename from src/etc/mw_com_config.json rename to score/src/etc/mw_com_config.json diff --git a/src/main.cpp b/score/src/main.cpp similarity index 100% rename from src/main.cpp rename to score/src/main.cpp diff --git a/src/sample_sender_receiver.cpp b/score/src/sample_sender_receiver.cpp similarity index 100% rename from src/sample_sender_receiver.cpp rename to score/src/sample_sender_receiver.cpp diff --git a/src/sample_sender_receiver.h b/score/src/sample_sender_receiver.h similarity index 100% rename from src/sample_sender_receiver.h rename to score/src/sample_sender_receiver.h diff --git a/tests/cpp/BUILD b/score/tests/cpp/BUILD similarity index 100% rename from tests/cpp/BUILD rename to score/tests/cpp/BUILD diff --git a/tests/cpp/test_main.cpp b/score/tests/cpp/test_main.cpp similarity index 100% rename from tests/cpp/test_main.cpp rename to score/tests/cpp/test_main.cpp diff --git a/tests/rust/BUILD b/score/tests/rust/BUILD similarity index 90% rename from tests/rust/BUILD rename to score/tests/rust/BUILD index 828a001..711361f 100644 --- a/tests/rust/BUILD +++ b/score/tests/rust/BUILD @@ -15,4 +15,7 @@ load("@rules_rust//rust:defs.bzl", "rust_test") rust_test( name = "rust_hello_test", srcs = ["test_main.rs"], + target_compatible_with = [ + "@platforms//os:linux", + ], ) diff --git a/tests/rust/test_main.rs b/score/tests/rust/test_main.rs similarity index 100% rename from tests/rust/test_main.rs rename to score/tests/rust/test_main.rs From 127183db2fd663aa3142805036b0d5d582d05c64 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 20 Feb 2026 09:35:22 +0000 Subject: [PATCH 2/6] fix host --- .bazelrc | 12 ++++++++---- .github/workflows/release_verification.yml | 2 +- MODULE.bazel | 5 +++++ tests/rust/BUILD | 21 +++++++++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 tests/rust/BUILD diff --git a/.bazelrc b/.bazelrc index bb5f2ed..adf7bc7 100644 --- a/.bazelrc +++ b/.bazelrc @@ -35,33 +35,37 @@ test --test_output=errors # Target configuration for CPU:x86-64|OS:Linux build (do not use it in case of system toolchains!) #build:sc-x86_64-linux --config=_bl_stub #build:sc-x86_64-linux --config=_bl_toolchain_common +build:sc-x86_64-linux --config=_common build:sc-x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix build:sc-x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix build:sc-x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu -test:sc-x86_64-linux --config=_bl_common +test:sc-x86_64-linux --config=_common # Target configuration for CPU:AArch64|OS:Linux build (do not use it in case of system toolchains!) #build:sc-aarch64-linux --config=_bl_stub #build:sc-aarch64-linux --config=_bl_toolchain_common +build:sc-aarch64-linux --config=_common build:sc-aarch64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix build:sc-aarch64-linux --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux-gcc_12.2.0-posix -test:sc-aarch64-linux --config=_bl_common +test:sc-aarch64-linux --config=_common # Target configuration for CPU:x86-64|OS:QNX build (do not use it in case of system toolchains!) #build:sc-x86_64-qnx --config=_bl_stub #build:sc-x86_64-qnx --config=_bl_toolchain_common +build:sc-x86_64-qnx --config=_common build:sc-x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix build:sc-x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix -test:sc-x86_64-qnx --config=_bl_common +test:sc-x86_64-qnx --config=_common # Target configuration for CPU:AArch64|OS:QNX build (do not use it in case of system toolchains!) #build:sc-aarch64-qnx --config=_bl_stub #build:sc-aarch64-qnx --config=_bl_toolchain_common +build:sc-aarch64-qnx --config=_common build:sc-aarch64-qnx --incompatible_strict_action_env build:sc-aarch64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix build:sc-aarch64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix -test:sc-aarch64-qnx --config=_bl_common +test:sc-aarch64-qnx --config=_common # Target configuration for CPU:AArch64|OS:QNX build with Ferrocene Rust toolchain (do not use it in case of system toolchains!) build:per-arm64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800 diff --git a/.github/workflows/release_verification.yml b/.github/workflows/release_verification.yml index 850861a..a19c13b 100644 --- a/.github/workflows/release_verification.yml +++ b/.github/workflows/release_verification.yml @@ -40,7 +40,7 @@ jobs: SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} run: | - bazel build --config x86_64-qnx --credential_helper=*.qnx.com=${{ github.workspace }}/.github/tools/qnx_credential_helper.py -- \ + bazel build --config=sc-x86_64-qnx --credential_helper=*.qnx.com=${{ github.workspace }}/.github/tools/qnx_credential_helper.py -- \ //score/src:scrample - name: Cleanup QNX License if: always() diff --git a/MODULE.bazel b/MODULE.bazel index 339f361..63eaa60 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -111,6 +111,11 @@ bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") #docs-as-code bazel_dep(name = "score_process", version = "1.4.3") bazel_dep(name = "score_baselibs", version = "0.2.4") +git_override( + module_name = "score_baselibs", + commit = "6951cd2a3045fb7a053acf203833a17704c22ccf", + remote = "https://github.com/eclipse-score/baselibs.git", +) bazel_dep(name = "score_communication", version = "0.1.2") bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "score_bazel_platforms", version = "0.0.4") diff --git a/tests/rust/BUILD b/tests/rust/BUILD new file mode 100644 index 0000000..711361f --- /dev/null +++ b/tests/rust/BUILD @@ -0,0 +1,21 @@ +# ******************************************************************************* +# Copyright (c) 2025 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 +# ******************************************************************************* +load("@rules_rust//rust:defs.bzl", "rust_test") + +rust_test( + name = "rust_hello_test", + srcs = ["test_main.rs"], + target_compatible_with = [ + "@platforms//os:linux", + ], +) From d92adb07caa792b9c850bd6042f362f4b582cf34 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 20 Feb 2026 12:18:07 +0000 Subject: [PATCH 3/6] updated targets --- .bazelrc | 52 +++++++++++----------- .bazelrc.user | 1 + .github/workflows/build.yml | 6 ++- .github/workflows/release_verification.yml | 2 +- 4 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 .bazelrc.user diff --git a/.bazelrc b/.bazelrc index adf7bc7..e678b90 100644 --- a/.bazelrc +++ b/.bazelrc @@ -33,39 +33,39 @@ test --test_output=errors # Target configuration for CPU:x86-64|OS:Linux build (do not use it in case of system toolchains!) -#build:sc-x86_64-linux --config=_bl_stub -#build:sc-x86_64-linux --config=_bl_toolchain_common -build:sc-x86_64-linux --config=_common -build:sc-x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix -build:sc-x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix -build:sc-x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu -test:sc-x86_64-linux --config=_common +#build:x86_64-linux --config=_bl_stub +#build:x86_64-linux --config=_bl_toolchain_common +build:x86_64-linux --config=_common +build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix +build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//: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 +test:x86_64-linux --config=_common # Target configuration for CPU:AArch64|OS:Linux build (do not use it in case of system toolchains!) -#build:sc-aarch64-linux --config=_bl_stub -#build:sc-aarch64-linux --config=_bl_toolchain_common -build:sc-aarch64-linux --config=_common -build:sc-aarch64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix -build:sc-aarch64-linux --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux-gcc_12.2.0-posix -test:sc-aarch64-linux --config=_common +#build:aarch64-linux --config=_bl_stub +#build:aarch64-linux --config=_bl_toolchain_common +build:aarch64-linux --config=_common +build:aarch64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix +build:aarch64-linux --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux-gcc_12.2.0-posix +test:aarch64-linux --config=_common # Target configuration for CPU:x86-64|OS:QNX build (do not use it in case of system toolchains!) -#build:sc-x86_64-qnx --config=_bl_stub -#build:sc-x86_64-qnx --config=_bl_toolchain_common -build:sc-x86_64-qnx --config=_common -build:sc-x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix -build:sc-x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix -test:sc-x86_64-qnx --config=_common +#build:x86_64-qnx --config=_bl_stub +#build:x86_64-qnx --config=_bl_toolchain_common +build:x86_64-qnx --config=_common +build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix +build:x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix +test:x86_64-qnx --config=_common # Target configuration for CPU:AArch64|OS:QNX build (do not use it in case of system toolchains!) -#build:sc-aarch64-qnx --config=_bl_stub -#build:sc-aarch64-qnx --config=_bl_toolchain_common -build:sc-aarch64-qnx --config=_common -build:sc-aarch64-qnx --incompatible_strict_action_env -build:sc-aarch64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix -build:sc-aarch64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix -test:sc-aarch64-qnx --config=_common +#build:aarch64-qnx --config=_bl_stub +#build:aarch64-qnx --config=_bl_toolchain_common +build:aarch64-qnx --config=_common +build:aarch64-qnx --incompatible_strict_action_env +build:aarch64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix +build:aarch64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix +test:aarch64-qnx --config=_common # Target configuration for CPU:AArch64|OS:QNX build with Ferrocene Rust toolchain (do not use it in case of system toolchains!) build:per-arm64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800 diff --git a/.bazelrc.user b/.bazelrc.user new file mode 100644 index 0000000..30580b3 --- /dev/null +++ b/.bazelrc.user @@ -0,0 +1 @@ +build --action_env=APE_NO_MODIFY_SELF=1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1e549a..52096e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,13 +19,17 @@ on: types: [checks_requested] jobs: qnx-build: + strategy: + fail-fast: false + matrix: + bazel-config: [x86_64-qnx, aarch64-qnx] uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@main permissions: contents: read pull-requests: read with: bazel-target: "//score/..." - bazel-config: "sc-x86_64-qnx" + bazel-config: ${{ matrix.bazel-config }} credential-helper: ".github/tools/qnx_credential_helper.py" environment-name: "workflow-approval" secrets: diff --git a/.github/workflows/release_verification.yml b/.github/workflows/release_verification.yml index a19c13b..bca5fb9 100644 --- a/.github/workflows/release_verification.yml +++ b/.github/workflows/release_verification.yml @@ -40,7 +40,7 @@ jobs: SCORE_QNX_USER: ${{ secrets.SCORE_QNX_USER }} SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} run: | - bazel build --config=sc-x86_64-qnx --credential_helper=*.qnx.com=${{ github.workspace }}/.github/tools/qnx_credential_helper.py -- \ + bazel build --config=x86_64-qnx --credential_helper=*.qnx.com=${{ github.workspace }}/.github/tools/qnx_credential_helper.py -- \ //score/src:scrample - name: Cleanup QNX License if: always() From 983b0dcdc391edd265c252a1f3ce3acdc6443313 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 20 Feb 2026 12:41:03 +0000 Subject: [PATCH 4/6] fix qnx --- .devcontainer/devcontainer.json | 16 ++++++++++++++-- baselibs | 1 - cicd-workflows | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) delete mode 160000 baselibs create mode 160000 cicd-workflows diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e88d473..b76cbf8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,16 @@ { "name": "eclipse-s-core", - "image": "ghcr.io/eclipse-score/devcontainer:v1.1.0" -} + "image": "ghcr.io/eclipse-score/devcontainer:v1.2.0", + "runArgs": [ + "--dns=8.8.8.8", + "--dns=8.8.4.4", + "--privileged" + ], + "capAdd": [ + "SYS_PTRACE" + ] // NOTE: APE (Actually Portable Executable) binaries used by Bazel may not work + // in Docker Desktop on macOS/Windows due to linuxkit kernel incompatibility. + // If you experience "assimilate" segfaults: + // - Use WSL2 with native Docker (not Docker Desktop) + // - Run Bazel on the host system instead + // - Rely on CI for format checks} diff --git a/baselibs b/baselibs deleted file mode 160000 index 6951cd2..0000000 --- a/baselibs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6951cd2a3045fb7a053acf203833a17704c22ccf diff --git a/cicd-workflows b/cicd-workflows new file mode 160000 index 0000000..773e90a --- /dev/null +++ b/cicd-workflows @@ -0,0 +1 @@ +Subproject commit 773e90a525ba9dd552412961f8057f5de40135a7 From 73d6129e2d6569130ad1c322bb3f14a7b4ff62c5 Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 20 Feb 2026 12:43:55 +0000 Subject: [PATCH 5/6] changed to pull-request for moment --- .github/workflows/build.yml | 2 +- MODULE.bazel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52096e0..0a55ada 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ name: Scrample Build on: - pull_request_target: + pull_request: types: [opened, reopened, synchronize] merge_group: types: [checks_requested] diff --git a/MODULE.bazel b/MODULE.bazel index 63eaa60..b2f733c 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -104,7 +104,7 @@ bazel_dep(name = "boost.program_options", version = "1.87.0") bazel_dep(name = "rules_cc", version = "0.2.16") # tooling -bazel_dep(name = "score_tooling", version = "1.1.0") +bazel_dep(name = "score_tooling", version = "1.1.2") bazel_dep(name = "aspect_rules_lint", version = "2.0.0") bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") From 622f0bd4037d65af97787168522e0fb2f7c8133c Mon Sep 17 00:00:00 2001 From: Frank Scholter Peres Date: Fri, 20 Feb 2026 12:56:59 +0000 Subject: [PATCH 6/6] fix url --- .github/workflows/debug-qnx-helper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debug-qnx-helper.yml b/.github/workflows/debug-qnx-helper.yml index d71dcef..dc17248 100644 --- a/.github/workflows/debug-qnx-helper.yml +++ b/.github/workflows/debug-qnx-helper.yml @@ -45,7 +45,7 @@ jobs: chmod +x "${CRED_HELPER}" - PAYLOAD='{"uri": "https://fusion.qnx.com/8/79858/installation.tgz"}' + PAYLOAD='{"uri": "https://fusion.qnx.com/6/85936/installation_qnx_803_260203.tar.xz?tid=3631642_wE_0220075214&ending=installation_qnx_803_260203.tar.xz"}' echo "Running helper with timeout 30s..." START=$(date +%s)