Skip to content

Commit 2398099

Browse files
authored
Merge branch 'main' into piotrkorkus_codeql_upload
2 parents 096b5b9 + baf4b36 commit 2398099

38 files changed

Lines changed: 1546 additions & 411 deletions

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eclipse-s-core",
3-
"image": "ghcr.io/eclipse-score/devcontainer:v1.3.0",
3+
"image": "ghcr.io/eclipse-score/devcontainer:v1.7.0",
44
"mounts": [
55
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
66
],

.devcontainer/prepare_workspace.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
#!/bin/bash
2+
# *******************************************************************************
3+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
4+
#
5+
# See the NOTICE file(s) distributed with this work for additional
6+
# information regarding copyright ownership.
7+
#
8+
# This program and the accompanying materials are made available under the
9+
# terms of the Apache License Version 2.0 which is available at
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
# *******************************************************************************
214
set -euo pipefail
315

416
# Install pipx

.github/workflows/build_and_test_ebclfsa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: aarch64
2929
runs-on: ubuntu-latest
3030
container:
31-
image: ghcr.io/eclipse-score/devcontainer:v1.1.0
31+
image: ghcr.io/eclipse-score/devcontainer:v1.7.0
3232
steps:
3333
- name: Clean disk space
3434
uses: eclipse-score/more-disk-space@v1

.github/workflows/copyright.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
name: Copyright check
14+
on:
15+
pull_request:
16+
types: [opened, reopened, synchronize]
17+
merge_group:
18+
types: [checks_requested]
19+
jobs:
20+
copyright-check:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
- name: Set up Python 3
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.12'
29+
# Runs the `copyright` hook from .pre-commit-config.yaml (cr_checker from
30+
# eclipse-score/tooling). The hook reports any file missing a copyright
31+
# header and fails the job, gating PRs without touching Bazel.
32+
- name: Run cr_checker via pre-commit
33+
uses: pre-commit/action@v3.0.1
34+
with:
35+
extra_args: copyright --all-files

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
# Runs cr_checker (copyright header check) directly from the eclipse-score/tooling
14+
# repo as a pre-commit hook, instead of via the Bazel `//:copyright` target.
15+
#
16+
# Rationale (see https://github.com/eclipse-score/reference_integration/issues/166):
17+
# the Bazel target pulls in the docs() -> needs_json -> @score_process graph, which
18+
# fails to resolve because score_process/score_platform are dev_dependencies in the
19+
# score modules and are therefore invisible when reference_integration aggregates
20+
# them. The pre-commit hook runs the checker as a standalone script over the repo's
21+
# files, so it is unaffected by Bazel module resolution.
22+
repos:
23+
- repo: https://github.com/eclipse-score/tooling
24+
rev: 31ff8eee214e4e97ef8f5cb46e443273515b63ec
25+
hooks:
26+
- id: copyright

.vscode/rustfmt.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
#!/usr/bin/env bash
2+
# *******************************************************************************
3+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
4+
#
5+
# See the NOTICE file(s) distributed with this work for additional
6+
# information regarding copyright ownership.
7+
#
8+
# This program and the accompanying materials are made available under the
9+
# terms of the Apache License Version 2.0 which is available at
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
# *******************************************************************************
214

315
bazel run @score_tooling//format_checker:rustfmt_with_policies

BUILD

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# *******************************************************************************
1313

1414
load("@score_docs_as_code//:docs.bzl", "docs")
15-
load("@score_tooling//:defs.bzl", "copyright_checker", "setup_starpls", "use_format_targets")
15+
load("@score_tooling//:defs.bzl", "setup_starpls", "use_format_targets")
1616

1717
# Docs-as-code
1818
docs(
@@ -41,27 +41,6 @@ setup_starpls(
4141
visibility = ["//visibility:public"],
4242
)
4343

44-
# Copyright check
45-
copyright_checker(
46-
name = "copyright",
47-
srcs = [
48-
".github",
49-
"bazel_common",
50-
"docs",
51-
"feature_integration_tests",
52-
"images",
53-
"runners",
54-
"rust_coverage",
55-
"scripts",
56-
"showcases",
57-
"//:BUILD",
58-
"//:MODULE.bazel",
59-
],
60-
config = "@score_tooling//cr_checker/resources:config",
61-
template = "@score_tooling//cr_checker/resources:templates",
62-
visibility = ["//visibility:public"],
63-
)
64-
6544
# Add target for formatting checks
6645
use_format_targets()
6746

bazel_common/score_images.MODULE.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
113
bazel_dep(name = "rules_oci", version = "2.3.1")
214
git_override(
315
module_name = "rules_oci",
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
..
2+
# *******************************************************************************
3+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
4+
#
5+
# See the NOTICE file(s) distributed with this work for additional
6+
# information regarding copyright ownership.
7+
#
8+
# This program and the accompanying materials are made available under the
9+
# terms of the Apache License Version 2.0 which is available at
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
# *******************************************************************************
14+
15+
Checklist
16+
=========
17+
18+
Use this as a final review before opening your pull request:
19+
20+
.. list-table::
21+
:header-rows: 1
22+
:widths: 40 60
23+
24+
* - Step
25+
- Done when…
26+
* - 1 · Add module (register, regenerate, patches)
27+
- module entry added under ``modules.target_sw`` with ``repo`` + ``hash``;
28+
``update_module_from_known_good.py`` ran and generated files committed;
29+
patches referenced if needed; ``known_good_correct`` and ``bzlmod-lock``
30+
checks green.
31+
* - 2 · Documentation
32+
- ``needs_json`` added to ``//:docs`` data and toctree entry in
33+
``sw_components.rst``; ``//:docs_combo`` shows the module.
34+
* - 3 · Unit tests (default platform)
35+
- module compiles and unit tests pass on ``--config=linux-x86_64`` via
36+
``quality_runners.py``; ``metadata`` tuned if needed.
37+
* - 4 · Platforms (build & test)
38+
- ``score_pkg_bundle`` + ``*.score.json`` added and registered in
39+
``showcases/BUILD`` (ships into every image); ``bazel test
40+
@score_my_module//...`` passes.
41+
* - 5 · Component tests
42+
- *not available yet — to be introduced.*
43+
* - 6 · Integration tests
44+
- tests added under ``feature_integration_tests/itf``.
45+
* - 7 · Reporting
46+
- Rust coverage generated; verification/status tables updated.
47+
* - 8 · Code quality
48+
- formatting, Bazel Clippy (Rust) and the CodeQL/MISRA C++ scan pass.

docs/integration_process/integration_process.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,77 @@
1212
# SPDX-License-Identifier: Apache-2.0
1313
# *******************************************************************************
1414
15+
###################
1516
Integration Process
1617
###################
18+
19+
This document is a step-by-step *how-to* for module owners who want to integrate
20+
their own S-CORE module into the **Reference Integration** — whether for the
21+
first time, when bringing it back after an exclusion, or to make it part of the
22+
S-CORE releases in general.
23+
24+
It walks you through everything from registering the module in
25+
``known_good.json`` over wiring it into the Bazel build, the showcases, the
26+
images and the CLI, up to adding it to the CI/CD pipelines and the consolidated
27+
reporting (documentation, coverage and verification reports).
28+
29+
30+
What "integration" means here
31+
=============================
32+
33+
The Reference Integration is a single `Bazel (bzlmod) <https://bazel.build/external/overview#bzlmod>`_
34+
build that pulls every S-CORE module together at a defined commit, builds them
35+
against each other and runs their tests, showcases and reports.
36+
37+
Integrating a module is **incremental**: each step below builds on the previous
38+
one and *extends the reach* of your module a little further into the
39+
integration. You climb the ladder only as far as your module needs — a pure
40+
library may stop after it builds in-tree, while a module with a runnable example
41+
goes all the way to running on every target platform and being exercised by
42+
integration tests.
43+
44+
The chapters that follow walk this ladder in order. Stop at whatever rung makes
45+
sense for your module.
46+
47+
48+
Prerequisites
49+
=============
50+
51+
Before you start, make sure that:
52+
53+
* Your module lives in its own GitHub repository under the ``eclipse-score``
54+
organization and is a **bzlmod module**, i.e. it has a top-level
55+
``MODULE.bazel`` with a ``module(name = "score_<your_module>")`` declaration.
56+
* The module name follows the ``score_<name>`` convention (e.g.
57+
``score_communication``). The same name is used as the Bazel
58+
``bazel_dep`` / repository name (``@score_<name>//...``).
59+
* Your module is registered in the
60+
`S-CORE Bazel registry <https://github.com/eclipse-score/bazel_registry>`_ so
61+
that it can be resolved as a ``bazel_dep`` during the integration.
62+
* The module builds and tests pass standalone on all four currently supported
63+
target platforms: Linux ``x86_64``, QNX 8 ``x86_64``, Red Hat AutoSD
64+
``x86_64`` and EB corbos Linux (Safety Apps) ``aarch64``.
65+
* You know the commit hash you want to pin (the integration always pins an exact
66+
commit, never a floating branch).
67+
68+
69+
The integration steps
70+
======================
71+
72+
Work through the chapters in order — each one extends the reach of your module a
73+
little further into the integration:
74+
75+
.. toctree::
76+
:maxdepth: 2
77+
:numbered:
78+
79+
step_1_add_module
80+
step_2_documentation
81+
step_3_unit_tests
82+
step_4_platforms
83+
step_5_component_tests
84+
step_6_integration_tests
85+
step_7_reporting
86+
step_8_code_quality
87+
checklist
88+
reference

0 commit comments

Comments
 (0)