Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
093ad9f
build: adopt baselibs-style toolchain settings
EP1991 Oct 9, 2026
fc47eb6
chore: wire pre-commit hooks and local actions
EP1991 Oct 9, 2026
2c34436
ci: add basic linux build workflow
EP1991 Oct 9, 2026
4e8cee3
ci: make linux build workflow score-layout aware
EP1991 Oct 9, 2026
0d53be7
first draft
EP1991 Oct 9, 2026
01f2ab5
ci: repin cargo-bazel and relax external warning errors in linux build
EP1991 Oct 9, 2026
9e67857
ci: temporarily exclude opensovd-cda from linux build
EP1991 Oct 9, 2026
1530a71
repin
EP1991 Oct 9, 2026
1b1aa00
formatting fix
EP1991 Oct 9, 2026
7f29655
build: build QM diagnostics targets with a standard Rust toolchain
EP1991 Oct 9, 2026
0af6476
Protect patch files from whitespace hooks
EP1991 Oct 9, 2026
2a5c22c
sovd-client: use tracing instead of println, with RUST_LOG support
EP1991 Oct 9, 2026
9201986
Integrate classic diagnostic adapter PR 488
EP1991 Oct 9, 2026
79aaf62
Fix CDA native dependency build
EP1991 Oct 9, 2026
4e8e6b2
Fix Linux CI for OpenSOVD integration
EP1991 Oct 9, 2026
cfc75f2
Use portable linker flag for linkme
EP1991 Oct 9, 2026
b79b090
feat(diag_api): re-export JsonSchemaRequired
EP1991 Oct 9, 2026
67f82ab
feat(sovd_adapter): serve diag_api DataResources as an opensovd DataP…
EP1991 Oct 9, 2026
93f630c
feat(opensovd-gateway): serve cruise control diag_api resources inste…
EP1991 Oct 9, 2026
28a0914
fix(sovd_adapter): address code review findings CR-01 through CR-04
EP1991 Oct 9, 2026
deb7d0b
fix(sovd_adapter): address Copilot review findings
EP1991 Oct 9, 2026
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
14 changes: 13 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
common --registry=https://bcr.bazel.build
common --experimental_isolated_extension_usages

build --java_language_version=17
build --tool_java_language_version=17
Expand All @@ -26,6 +27,12 @@ test --test_tag_filters=-manual
# Do not use any auto-detected C++ toolchains, only our explicitly specified ones as below
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1

# Enable gnu11 feature so rules_foreign_cc can compile glib (needs `asm` keyword)
# The hermetic toolchain defaults to -std=c11 (strict ISO), which rejects `asm`.
# The gnu11 toolchain feature switches it to -std=gnu11 which allows inline assembly.
# Must use host_features since BootstrapPkgConfig runs in the exec (host) configuration.
build --host_features=gnu11

# Use the GCC C++ toolchain for x86-64 linux host by default for `bazel run`
run --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
run --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
Expand All @@ -34,7 +41,6 @@ run --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
build:_score_diag_common_build_settings --cxxopt=-std=c++17 # TODO: why is this not enabled via toolchain features instead?! Wouldn't that one conflict with rustc?
build:_score_diag_common_build_settings --features=minimal_warnings
build:_score_diag_common_build_settings --features=strict_warnings
build:_score_diag_common_build_settings --features=warnings_as_errors
build:_score_diag_common_build_settings --incompatible_strict_action_env

# Base configuration for building on x86-64 linux host
Expand All @@ -50,6 +56,12 @@ common:score_diag_x86_64_linux --config=_score_diag_common_build_settings
common:score_diag_x86_64_linux --config=_score_diag_use_gcc_based_host_platform
common:score_diag_x86_64_linux --config=_score_diag_build_for_x86_64_linux_target_platform

# Configuration for x86_64 Linux QM builds
common:score_diag_x86_64_linux_qm --platforms=//platforms:x86_64-linux-qm
common:score_diag_x86_64_linux_qm --host_platform=//platforms:x86_64-linux-qm
common:score_diag_x86_64_linux_qm --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0
common:score_diag_x86_64_linux_qm --cxxopt=-std=c++17
common:score_diag_x86_64_linux_qm --incompatible_strict_action_env
# Import custom user settings
# Can be used to e.g. enable custom features without modifying this main .bazelrc
try-import %workspace%/user.bazelrc
2 changes: 1 addition & 1 deletion .github/actions/gitlint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ inputs:
required: false
runs:
using: "docker"
image: "jorisroovers/gitlint:0.19.1"
image: "docker://jorisroovers/gitlint:0.19.1"
entrypoint: /bin/sh
args:
- -c
Expand Down
47 changes: 33 additions & 14 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,50 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v7
uses: actions/checkout@v4

- name: Setup Bazel Cache
uses: eclipse-score/cicd-actions/setup-bazel-cache@e2a2a587a759b681632040ec1e1294015a0405f5
uses: eclipse-score/cicd-actions/setup-bazel-cache@659dcbed63f6b7fbde88c7850125ea0a0a92f939
with:
unique-cache-name: ${{ github.workflow }}-${{ github.job }}

- name: Bazel Build
run: |
TARGETS=(//examples/... //tests/...)

# consider //score/... targets only in case such directory actually contains any Bazel packages.
if find score -type f \( -name BUILD -o -name BUILD.bazel \) | grep -q .; then
TARGETS+=(//score/...)
fi
TARGETS=(//examples/... //tests/... //score/mw/...)

bazel build --config=score_diag_x86_64_linux -- "${TARGETS[@]}"

- name: Bazel Test
run: |
TARGETS=(//examples/... //tests/...)

# consider //score/... targets only in case such directory actually contains any Bazel packages.
if find score -type f \( -name BUILD -o -name BUILD.bazel \) | grep -q .; then
TARGETS+=(//score/...)
fi
TARGETS=(//examples/... //tests/... //score/mw/...)

bazel test --config=score_diag_x86_64_linux -- "${TARGETS[@]}"

- name: Install QM native dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
liblzma-dev \
libssl-dev \
pkg-config

- name: Bazel Build QM diagnostics
run: |
bazel build --config=score_diag_x86_64_linux_qm -- \
//score/opensovd-cda \
//score/opensovd-gateway \
//score/examples/sovd-client

- name: Bazel Test QM diagnostics
run: |
TEST_TARGETS=()
while IFS= read -r target; do
TEST_TARGETS+=("${target}")
done < <(bazel query \
'kind(".*_test rule", //score/opensovd-cda/... + //score/opensovd-gateway/... + //score/examples/...)')

if ((${#TEST_TARGETS[@]} == 0)); then
echo "No QM diagnostic test targets found; build verification is covered above."
else
bazel test --config=score_diag_x86_64_linux_qm -- "${TEST_TARGETS[@]}"
fi
31 changes: 14 additions & 17 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -11,24 +11,21 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

name: On PR
name: Gitlint check
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]

permissions:
contents: read

types: [opened, synchronize, reopened]
jobs:
pre-commit:
name: 🔬 Pre-Commit
lint-commits:
name: check-commit-messages
runs-on: ubuntu-latest
steps:
- name: 📥 Check out
uses: actions/checkout@v7
- name: 🛠️ Install pre-commit
run: pip install pre-commit
- name: ✅ Run pre-commit
run: pre-commit run --all-files
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Gitlint Action
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/gitlint
with:
pr-number: ${{ github.event.number }}
13 changes: 5 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ repos:
rev: v6.0.0
hooks:
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: check-toml
- id: check-json
exclude: ^\.vscode/ # those are actually jsonc files
- id: end-of-file-fixer
exclude: \.patch$
- id: trailing-whitespace
exclude: \.patch$
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
exclude: \.patch$
- id: detect-private-key
- id: check-added-large-files
args: ["--maxkb=150"]
Expand All @@ -47,7 +49,7 @@ repos:
- id: actionlint
name: actionlint
# Disable shellcheck and pyflakes for now, to enforce consistent behavior.
entry: tools/run_tool.sh actionlint -shellcheck= -pyflakes=
entry: tools/run_tool.sh actionlint -shellcheck= -pyflakes= -ignore 'file "/bin/sh" does not exist'
language: system
require_serial: true
types: [yaml]
Expand All @@ -73,15 +75,10 @@ repos:
entry: bash -c 'bazel run //:ide_support && .venv_docs/bin/python3 -m basedpyright'
language: system
pass_filenames: false
stages: [manual]

# Ensure every file has a copyright header as per the Eclipse Foundation's requirements
- repo: https://github.com/eclipse-score/tooling
rev: 31ff8eee214e4e97ef8f5cb46e443273515b63ec
hooks:
- id: copyright
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args: ["-i", "--style=file"]
files: \.(c|cpp|h|hpp)$
61 changes: 55 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,35 @@
# *******************************************************************************
module(name = "score_diagnostics")

bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "classic-diagnostic-adapter", version = "0.1.0")
git_override(
module_name = "classic-diagnostic-adapter",
commit = "a5363acb416c289d301577252d3b4b6750df044d",
patch_strip = 1,
patches = ["//patches:classic-diagnostic-adapter-linkme.patch"],
remote = "https://github.com/eclipse-opensovd/classic-diagnostic-adapter.git",
)

bazel_dep(name = "mbedtls-rs", version = "0.1.0")
git_override(
module_name = "mbedtls-rs",
commit = "00247f4486fd4c627db714657af1a9c067720786",
remote = "https://github.com/eclipse-opensovd/mbedtls-rs.git",
)

bazel_dep(name = "opensovd_core", version = "0.0.0")
git_override(
module_name = "opensovd_core",
commit = "29e806f3226cbce5fb9985924de737d8e3fb6a47",
patch_strip = 1,
patches = [
"//patches:opensovd-core-expose-tokio.patch",
"//patches:opensovd-core-expose-client.patch",
],
remote = "https://github.com/eclipse-opensovd/opensovd-core.git",
)

bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "score_bazel_platforms", version = "0.1.2")

bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.4", dev_dependency = True)
Expand Down Expand Up @@ -63,11 +91,20 @@ use_repo(pip, "module_template_docs_hub_env")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)

# Rust rules for Bazel
bazel_dep(name = "rules_rust", version = "0.68.1-score")
bazel_dep(name = "rules_rust", version = "0.70.0")
bazel_dep(name = "score_crates", version = "0.0.10")

bazel_dep(name = "score_toolchains_rust", version = "0.9.1", dev_dependency = True)

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["1.88.0"],
)
use_repo(rust, "rust_toolchains")

register_toolchains("@rust_toolchains//:all")

crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")

# any further required individual rust creates shall get added below
Expand All @@ -83,9 +120,24 @@ crate.spec(
package = "serde_json",
version = "1.0.143",
)
crate.spec(
package = "tracing",
version = "=0.1.41",
)
crate.spec(
features = [
"ansi",
"env-filter",
"fmt",
"std",
],
package = "tracing-subscriber",
version = "=0.3.19",
)
crate.spec(
features = [
"macros",
"net",
"rt",
"sync",
"time",
Expand All @@ -97,8 +149,6 @@ crate.from_specs(
name = "score_crate_index",
supported_platform_triples = [
"aarch64-unknown-linux-gnu",
"aarch64-unknown-nto-qnx800",
"x86_64-pc-nto-qnx800",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-none",
],
Expand Down Expand Up @@ -132,6 +182,5 @@ bazel_dep(name = "aspect_rules_lint", version = "2.3.0", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2", dev_dependency = True)

# docs-as-code
bazel_dep(name = "score_docs_as_code", version = "4.6.0")

bazel_dep(name = "score_docs_as_code", version = "4.6.0", dev_dependency = True)
bazel_dep(name = "score_process", version = "1.6.0", dev_dependency = True)
Loading
Loading