Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
98 changes: 98 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,107 @@
# *******************************************************************************
# 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
# *******************************************************************************

# Import user-specific configurations
try-import %workspace%/user.bazelrc

build --per_file_copt=external/score_baselibs.*/.*@-Wno-deprecated-declarations
common --@score_baselibs//score/json:base_library=nlohmann # TODO : https://github.com/eclipse-score/baselibs/issues/57

build --java_language_version=17
build --tool_java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_runtime_version=remotejdk_17

# Only contact license server every 59 secs per tool and not for every tool invocation to avoid flooding the license server
common --action_env=QNX_LICENSE_EXTSERVER_DELAY=59
#common --action_env=QNX_LICENSE_QUEUE_TIMEOUT=300 # If not reach retry in 60seconds for overall 300 (configured) seconds
# Disable for the moment as this leads to "warning: Cannot find Build server key, the value of QNX_LICENSE_QUEUE_TIMEOUT will be ignored."

test --test_output=errors

# Bazel registry configuration
common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
common --registry=https://bcr.bazel.build
# QNX credential helper configuration
common --credential_helper=*.qnx.com=%workspace%/.github/tools/qnx_credential_helper.py
common --credential_helper_timeout="60s"

# Shared configuration for simple test execution
build:shared --incompatible_strict_action_env
build:shared --sandbox_writable_path=/var/tmp
build:shared --host_platform=@score_bazel_platforms//:x86_64-linux

# Shared qnx configuration
build:shared_qnx --config=shared
build:shared_qnx --copt=-D_QNX_SOURCE
build:shared_qnx --copt=-DGRPC_POSIX_SOCKET
build:shared_qnx --copt=-DGRPC_POSIX_SOCKETUTILS
build:shared_qnx --copt=-DGRPC_POSIX_WAKEUP_FD
build:shared_qnx --copt=-DIP_PKTINFO=0
build:shared_qnx --cxxopt=-D_QNX_SOURCE
build:shared_qnx --cxxopt=-DGRPC_POSIX_SOCKET
build:shared_qnx --cxxopt=-DGRPC_POSIX_SOCKETUTILS
build:shared_qnx --cxxopt=-DGRPC_POSIX_WAKEUP_FD
build:shared_qnx --cxxopt=-DIP_PKTINFO=0

# -------------------------------------------------------------------------------
# Config dedicated to host platform CPU:x86_64 and OS:Linux
# -------------------------------------------------------------------------------
build:x86_64-linux --config=shared
build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix

# -------------------------------------------------------------------------------
# Different toolchain configuration for x86_64-linux
# -------------------------------------------------------------------------------
build:host_config_1 --config=x86_64-linux
build:host_config_1 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
build:host_config_1 --features=use_pthread

# -------------------------------------------------------------------------------
# Config dedicated to target platform CPU:aarch64 and OS:linux
# -------------------------------------------------------------------------------
build:aarch64-linux --config=shared
build:aarch64-linux --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix

# -------------------------------------------------------------------------------
# Different toolchain configuration for aarch64-linux
# -------------------------------------------------------------------------------
build:target_config_3 --config=aarch64-linux
build:target_config_3 --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux-gcc_12.2.0


# -------------------------------------------------------------------------------
# Config dedicated to target platform CPU:x86_64 and OS:QNX
# -------------------------------------------------------------------------------
build:x86_64-qnx --config=shared_qnx
# Use custom platform that extends score platform with @platforms//os:qnx constraint
build:x86_64-qnx --platforms=//platforms:x86_64-qnx-extended

# -------------------------------------------------------------------------------
# Different toolchain configuration for x86_64-qnx
# -------------------------------------------------------------------------------
build:target_config_1 --config=x86_64-qnx
build:target_config_1 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0

# -------------------------------------------------------------------------------
# Config dedicated to target platform CPU:aarch64 and OS:QNX
# -------------------------------------------------------------------------------
build:aarch64-qnx --config=shared_qnx
# Use custom platform that extends score platform with @platforms//os:qnx constraint
build:aarch64-qnx --platforms=//platforms:aarch64-qnx-extended

# -------------------------------------------------------------------------------
# Different toolchain configuration for aarch64-qnx
# -------------------------------------------------------------------------------
build:target_config_2 --config=aarch64-qnx
build:target_config_2 --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0
47 changes: 47 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
BasedOnStyle: Google
AccessModifierOffset: -2
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
# Empty is required in AllowShortFunctionsOnASingleLine over Inline because Inline contradicts with AUTOSAR rule A7-1-7
# Such rule is no longer existing in MISRA C++:2023, once we are fully migrated to MISRA C++:2023, switching to Inline
# could be reconsidered
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
BreakBeforeBraces: Custom
ColumnLimit: 120
DerivePointerAlignment: false
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^(<|")(assert|complex|ctype|errno|fenv|float|inttypes|iso646|limits|locale|math|setjmp|signal|stdalign|stdargh|stdatomic|stdbool|stddef|stdint|stdio|stdlib|stdnoreturn|string|tgmath|threads|time|uchar|wchar|wctype)\.h(>|")$'
Priority: 2
- Regex: '^(<|")(cstdlib|csignal|csetjmp|cstdarg|typeinfo|typeindex|type_traits|bitset|functional|utility|ctime|chrono|cstddef|initializer_list|tuple|any|optional|variant|new|memory|scoped_allocator|memory_resource|climits|cfloat|cstdint|cinttypes|limits|exception|stdexcept|cassert|system_error|cerrno|cctype|cwctype|cstring|cwchar|cuchar|string|string_view|array|vector|deque|list|forward_list|set|map|unordered_set|unordered_map|stack|queue|algorithm|execution|teratorslibrary|iterator|cmath|complex|valarray|random|numeric|ratio|cfenv|iosfwd|ios|istream|ostream|iostream|fstream|sstream|strstream|iomanip|streambuf|cstdio|locale|clocale|codecvt|regex|atomic|thread|mutex|shared_mutex|future|condition_variable|filesystem|ciso646|ccomplex|ctgmath|cstdalign|cstdbool)(>|")$'
Priority: 3
- Regex: '^(<|").*(>|")$'
Priority: 1
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
QualifierAlignment: Left
CommentPragmas: '^.*A2Lfactory:'
---
# Make sure language specific settings are below the generic settings to be compatible to all languages.
Language: Cpp
Standard: c++17
16 changes: 16 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# NOTE: the set of enabled checks is yet subject to be tailored for the S-CORE project
Checks: >
-*, clang-analyzer-*, cert-*, cppcoreguidelines-*, bugprone-*, misc-*, performance-*, readability-*
# Only treat critical checks as errors, others are warnings
# NOTE: the `WarningsAsErrors` property is yet subject to be tailored for the enabled checks
WarningsAsErrors: >
clang-analyzer-*,
# Exclude third-party and external dependencies' headers from analysis
HeaderFilterRegex: '^(?!.*/third_party/).*'
FormatStyle: file
# The rules above are permissive and we need the rules below to enforce naming conventions
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
32 changes: 32 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# *******************************************************************************
# 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
# *******************************************************************************

# Use Dockerfile to get dependabot version bumps after new image is released
FROM ghcr.io/eclipse-score/devcontainer:v1.4.1

# Build argument for dynamic username (defaults to 'vscode' if not provided)
ARG USERNAME=vscode

# RENAME 'vscode' user to the specified username to satisfy the QNX license
# We use usermod to change the login name and home directory
RUN if [ "$USERNAME" != "vscode" ]; then \
usermod -l ${USERNAME} vscode \
&& groupmod -n ${USERNAME} vscode \
&& usermod -d /home/${USERNAME} -m ${USERNAME} \
&& ln -s /home/${USERNAME} /home/vscode \
&& echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USERNAME} \
&& chmod 0440 /etc/sudoers.d/${USERNAME}; \
fi

# Set the default user for the container
USER ${USERNAME}
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "eclipse-s-core",
"build": {
"dockerfile": "Dockerfile",
"args": {
"USERNAME": "${localEnv:USER}"
}
},
"remoteUser": "${localEnv:USER}",

"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},

// Create empty folder in case mandatory mount points are missing.
"initializeCommand": "mkdir -p ${localEnv:HOME}/.cache/bazel /usr/local/share/ca-certificates/ ${localEnv:HOME}/.qnx/license && sudo mkdir -p /etc/docker",

"mounts": [
{
"source": "${localEnv:HOME}/.cache/bazel",
"target": "/home/${localEnv:USER}/.cache/bazel",
"type": "bind"
},
{
"source": "${localEnv:HOME}/.qnx/license",
"target": "/opt/score_qnx/license",
"type": "bind"
},
{
"source": "/usr/local/share/ca-certificates/",
"target": "/usr/local/share/ca-certificates/",
"type": "bind"
},
{
"source": "/etc/docker",
"target": "/etc/docker",
"type": "bind"
}

],
"onCreateCommand": {
"update certificates & install acl library": "sudo apt update && sudo apt install -y --no-install-recommends ca-certificates-java openjdk-17-jre-headless && sudo update-ca-certificates",
"bazel use system trust store": "echo 'startup --host_jvm_args=-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts --host_jvm_args=-Djavax.net.ssl.trustStorePassword=changeit' | sudo tee --append /etc/bazel.bazelrc"
},

"runArgs": ["--network", "host"]
}
17 changes: 15 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# *******************************************************************************
# 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
# *******************************************************************************

# Comment out as not in score yet
# * @eclipse-score/infrastructure-tooling-community
# .* @eclipse-score/infrastructure-tooling-community
Expand All @@ -6,10 +19,10 @@
# in separate <module_name> repositories:
#
# /docs @eclipse-score/process-community
# /docs/manual @eclipse-score/<module_name>/safety-manager
# /docs/manuals @eclipse-score/<module_name>/safety-manager
# /docs/release @eclipse-score/<module_name>/quality-manager @eclipse-score/<module_name>/module-lead
# /docs/safety_plan @eclipse-score/<module_name>/safety-manager @eclipse-score/<module_name>/module-lead
# /docs/safety_analysis @eclipse-score/<module_name>/safety-manager
# /docs/verification @eclipse-score/<module_name>/quality-manager @eclipse-score/<module_name>/safety-manager
# /docs/verification_report @eclipse-score/<module_name>/quality-manager @eclipse-score/<module_name>/safety-manager
# /components @eclipse-score/<module_name>/technical-lead
# /components/*/ @eclipse-score/<module_name>/automotive-score-committers
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/bug_fix.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!--
*******************************************************************************
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
*******************************************************************************
-->

# Bugfix

> [!IMPORTANT]
Expand Down
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/improvement.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!--
*******************************************************************************
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
*******************************************************************************
-->

# Improvement

> [!IMPORTANT]
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/gitlint/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *******************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down
Loading
Loading