Skip to content

Commit ba1be07

Browse files
Subramanian-K812Saumya-R
authored andcommitted
Enable cr_checker copyright check via pre-commit hook (#265)
* ci: enable cr_checker copyright check via pre-commit hook * fix: add copyright headers to files missing SPDX block * fix: add missing copyright header to overall_status.rst * fix: remove broken copyright_checker Bazel target * fix: add missing blank line after copyright block in overall_status.rst doc: remove scrample references from ebclfsa documentation + update devcontainer (#269) * chore: Bump devcontainer to v.1.7.0 * doc: remove scrample references in the EB clfsa documentation The scrample code had been removed already but this document was forgotten. upload sarif results to security tab (#260) Co-authored-by: Frank Scholter Peres(MBTI) <145544737+FScholPer@users.noreply.github.com> Integrate Time module (#273) * Integrate Time module * Deploy time examples * Make sure qemu has enought permisisons * Make exmplaes stop after time Bump `score_bazel_cpp_toolchains` to the latest version (#274) The latest version of toolchain provides support for coverage for QNX builds. Signed-off-by: Nikola Radakovic <nikola.ra.radakovic@bmw.de> Add QNX8 aarch64 build support (#241) * Add QNX8 aarch64 build support * review findings * free more space adding launch manager fit test cases adding feature integration test cases for other requirements removing hard fail conditions updated documents adding copilot reivew fixes Fixed restart behavior on the same instance, Hardened shutdown race handling updated the statement clearing self.process after shutdown fixed pytest build environment issues fixxing the python build issues copyright fixes
1 parent 793b7cd commit ba1be07

96 files changed

Lines changed: 7494 additions & 438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ build:_common --@score_logging//score/datarouter/build_configuration_flags:enabl
3030
build:_common --@score_logging//score/datarouter/build_configuration_flags:file_transfer=False
3131
build:_common --@score_logging//score/datarouter/build_configuration_flags:use_local_vlan=True
3232

33+
# ─── QNX common flags (shared by all QNX configs) ────────────────────────────
34+
build:_qnx_common --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
35+
build:_qnx_common --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
36+
build:_qnx_common --incompatible_enable_cc_toolchain_resolution
37+
3338
build:qnx-x86_64 --config=_common
3439
build:qnx-x86_64 --noexperimental_merged_skyframe_analysis_execution
3540
build:qnx-x86_64 --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
@@ -41,6 +46,16 @@ build:qnx-x86_64 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp
4146
build:qnx-x86_64 --extra_toolchains=@score_qnx_x86_64_ifs_toolchain//:ifs-x86_64-qnx-sdp_8.0.0
4247
build:qnx-x86_64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800
4348

49+
# ─── QNX aarch64 cross-compilation config ────────────────────────────────────
50+
# Usage: bazel build --config=qnx-aarch64 //target
51+
build:qnx-aarch64 --config=_common
52+
build:qnx-aarch64 --config=_qnx_common
53+
build:qnx-aarch64 --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix
54+
build:qnx-aarch64 --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0
55+
build:qnx-aarch64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800
56+
build:qnx-aarch64 --extra_toolchains=@score_qnx_aarch64_ifs_toolchain//:ifs-aarch64-qnx-sdp_8.0.0
57+
58+
4459
build:linux-x86_64 --config=_common
4560
build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
4661
build:linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix

.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/codeql-multiple-repo-scan.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
- name: Perform CodeQL Analysis
6969
uses: github/codeql-action/analyze@v4
7070
with:
71+
upload: false
7172
upload-database: false
7273
output: sarif-results/
7374
category: "multi-repo-scan"
@@ -94,6 +95,11 @@ jobs:
9495
exit 1
9596
fi
9697
sarif html "$SARIF_FILE" --output codeql-report.html
98+
- name: Upload SARIF to GitHub Security tab
99+
uses: github/codeql-action/upload-sarif@v4
100+
with:
101+
sarif_file: sarif-results/cpp.sarif
102+
category: "multi-repo-scan"
97103
- name: Upload SARIF results as artifact
98104
uses: actions/upload-artifact@v4
99105
with:

.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

.github/workflows/test_and_docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ jobs:
4040
pull-requests: write
4141
steps:
4242
- name: Clean disk space
43-
uses: eclipse-score/more-disk-space@v1
43+
uses: eclipse-score/more-disk-space@v1.1
44+
with:
45+
level: 4
4446
- name: Setup Bazel
4547
uses: bazel-contrib/setup-bazel@0.18.0
4648
with:

.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

0 commit comments

Comments
 (0)