Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
52 changes: 52 additions & 0 deletions .github/workflows/docs_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# *******************************************************************************
# Copyright (c) 2026 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
# *******************************************************************************
name: Docs and Test
permissions:
contents: read
actions: write
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
merge_group:
types: [checks_requested]
workflow_call:
jobs:
docs-and-test:
runs-on: ubuntu-24.04
steps:
- uses: eclipse-score/more-disk-space@6a3b48901846bf7f8cc985925157d71a8973e61f # v1
with:
level: 4
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install Graphviz
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Setup Bazel Cache
uses: eclipse-score/cicd-actions/setup-bazel-cache@659dcbed63f6b7fbde88c7850125ea0a0a92f939
with:
unique-cache-name: ${{ github.workflow }}-${{ github.job }}
- name: Run docs_and_test (module verification report)
run: |
bazel run //:module_verification_report -- --test-flag=--config=bl-x86_64-linux
- name: Upload Module Verification Report
uses: actions/upload-artifact@v6
with:
name: ${{ github.event.repository.name }}_module_verification_report
path: _build/
include-hidden-files: true
retention-days: 10
23 changes: 23 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
load("@score_bazel_tools_cc//quality:defs.bzl", "quality_clang_tidy_config")
load("@score_docs_as_code//:docs.bzl", "docs")
load("@score_docs_as_code//:bzl/docs_and_test.bzl", "docs_and_test")
load("@score_tooling//:defs.bzl", "copyright_checker", "dash_license_checker", "rust_coverage_report", "use_format_targets")
load("//:project_config.bzl", "PROJECT_CONFIG")
load(":qemu.bzl", "qemu_aarch64")
Expand Down Expand Up @@ -96,6 +97,28 @@ docs(
source_dir = "docs",
)

# Builds/serves the module verification report for a small, known-good subset
# of //score/... with coverage. The full //score/... tree currently has ~20
# pre-existing, unrelated build failures under bl-aarch64-linux (deprecated
# logging API under -Werror=deprecated-declarations, and a Rust nightly-only
# feature used by score_log_fmt), so this uses a reduced scope sufficient to
# validate the docs_and_test integration and coverage report rendering.
#
# Extra Bazel flags (e.g. --config=…) go on the command line after --, e.g.::
#
# bazel run //:module_verification_report -- --test-flag=--config=bl-aarch64-linux
#
# See @score_docs_as_code//:bzl/docs_and_test.bzl for the underlying driver.
docs_and_test(
name = "module_verification_report",
test_targets = [

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.

I imagine different test targets might require different configurations e.g. ITF vs UT. How this can be handled when we have a single target to execute everything in one place?

Can we leave test_targets empty if we want to handle execution of tests ourselves and just use it for rendering module verification?

"//score/bitmanipulation/...",
"//score/flatbuffers/...",
"//score/filesystem/...",
],
docs_target = "//:docs",
)

# Generate `compile_commands.json`.
# Required for `clangd` support.
refresh_compile_commands(
Expand Down
9 changes: 7 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ bazel_dep(name = "score_toolchains_rust", version = "0.10.0", dev_dependency = T
## Custom Module Loading

bazel_dep(name = "score_docs_as_code", version = "8.0.0")
bazel_dep(name = "score_process_description", version = "2.1.1")
git_override(
module_name = "score_docs_as_code",
commit = "5402638e533e75133743c42d2d01bd411a62f75a",
remote = "https://github.com/eclipse-score/docs-as-code.git",
)

bazel_dep(name = "score_process_description", version = "2.1.2", dev_dependency = True)
bazel_dep(name = "score_tooling", version = "1.3.1", dev_dependency = True)

# score_tooling declares trlc and lobster as regular bazel_deps with their own
Expand All @@ -122,7 +127,7 @@ git_override(
remote = "https://github.com/bmw-software-engineering/lobster.git",
)

bazel_dep(name = "score_platform", version = "0.7.0")
bazel_dep(name = "score_platform", version = "0.7.1", dev_dependency = True)

## Configure the python toolchain

Expand Down
77 changes: 5 additions & 72 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************


project = "S-CORE Baselibs"
project_url = "https://eclipse-score.github.io/baselibs"
version = "0.1"
Expand Down
8 changes: 8 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ The Components documentation provides detailed documentation for each individual

baselibs/components/index

Reporting
---------

.. toctree::
:maxdepth: 1

reporting/module_verification_report


Quick Start - Building and Testing
==================================
Expand Down
2 changes: 1 addition & 1 deletion docs/module/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

.. mod:: Baselibs
:id: mod__baselibs
:includes: comp__baselibs_json[version==1], comp__baselibs_memory_shared[version==1], comp__baselibs_result[version==1], comp__baselibs_bit_manipulation[version==1], comp__baselibs_containers[version==1], comp__baselibs_filesystem[version==1], comp__baselibs_utils[version==1], comp__baselibs_concurrency[version==1], comp__baselibs_safecpp[version==1]
:includes: comp__baselibs_static_reflection[version==1], comp__baselibs_result[version==1], comp__log[version==1], comp__baselibs_hash[version==1], comp__baselibs_flatbuffers[version==1], comp__baselibs_abi_compatible_data_types[version==1], comp__baselibs_json[version==1], comp__baselibs_memory_shared[version==1], comp__baselibs_result[version==1], comp__baselibs_bit_manipulation[version==1], comp__baselibs_containers[version==1], comp__baselibs_filesystem[version==1], comp__baselibs_utils[version==1], comp__baselibs_concurrency[version==1], comp__baselibs_safecpp[version==1]
:status: valid
:version: 1
:safety: ASIL_B
Expand Down
47 changes: 47 additions & 0 deletions docs/reporting/module_verification_report.rst

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The document which is the rendered HTML of this rst file looks different to the structure of the module verification report template. This is already existing.

In other words, this document https://eclipse-score.github.io/baselibs/pr-491/reporting/module_verification_report.html does not match the structure existing in the module and process definition like here: https://eclipse-score.github.io/baselibs/pr-491/verification_report/module_verification_report.html

This relate to the following file as well: https://github.com/eclipse-score/docs-as-code/pull/730/changes#diff-476160124f11cd0e0a38c257375ef66bd5d406a587ce15f92986546948400e32

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
..
******************************************************************************
Copyright (c) 2026 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
******************************************************************************

Module Verification Report
==========================

.. document:: Module Verification Report
:id: doc__baselibs_module_verification_report
:status: valid
:safety: QM
:security: YES
:version: 1
:realizes: wp__feature_arch[version==1]

This document provides a verification report of the Baselibs feature and its
associated components.

.. module-verification-report::
:module-id: mod__baselibs
:feature-id: feat__baselibs
:safety: ASIL_B
:security: YES
:status: valid
:verification-method: test_and_inspection
:components: comp__baselibs_json,
comp__baselibs_memory_shared,
comp__baselibs_result,
comp__baselibs_bit_manipulation,
comp__baselibs_containers,
comp__baselibs_filesystem,
comp__baselibs_concurrency,
comp__baselibs_safecpp,
comp__baselibs_static_reflection,
comp__baselibs_hash,
comp__baselibs_flatbuffers,
comp__baselibs_abi_compatible_data_types
Loading
Loading