Skip to content
Open
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
4 changes: 1 addition & 3 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
autosd
ebclfsa
qnx_qemu
build
108 changes: 44 additions & 64 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,81 +1,61 @@
# *******************************************************************************
# Copyright (c) 2025 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
# *******************************************************************************

common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
common --registry=https://bcr.bazel.build
common --credential_helper=*.qnx.com=%workspace%/scripts/qnx_credential_helper.py
common --credential_helper_timeout="60s"

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

# Flags needed by score_baselibs and communication modules.
# Do not add more!
common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
common --@score_baselibs//score/json:base_library=nlohmann
common --@score_communication//score/mw/com/flags:tracing_library=stub
common --@score_baselibs//score/memory/shared/flags:use_typedshmd=False
common --@score_logging//score/datarouter/build_configuration_flags:persistent_logging=False
common --@score_logging//score/datarouter/build_configuration_flags:persistent_config_feature_enabled=False
common --@score_logging//score/datarouter/build_configuration_flags:enable_nonverbose_dlt=False
common --@score_logging//score/datarouter/build_configuration_flags:enable_dynamic_configuration_in_datarouter=False
common --@score_logging//score/datarouter/build_configuration_flags:use_local_vlan=True
common --@score_logging//score/mw/log/flags:KRemote_Logging=False
build:_common --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False
build:_common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
build:_common --@score_baselibs//score/json:base_library=nlohmann
build:_common --@score_baselibs//score/memory/shared/flags:use_typedshmd=False
build:_common --@score_communication//score/mw/com/flags:tracing_library=stub
build:_common --cxxopt=-Wno-error=mismatched-new-delete
build:_common --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
build:_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
build:_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix

# stop legacy behavior of creating __init__.py files
build --incompatible_default_to_explicit_init_py
build --incompatible_strict_action_env
build --experimental_retain_test_configuration_across_testonly #https://github.com/bazelbuild/bazel/issues/6842
build:qnx-x86_64 --config=_common
build:qnx-x86_64 --noexperimental_merged_skyframe_analysis_execution
build:qnx-x86_64 --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build:qnx-x86_64 --incompatible_enable_cc_toolchain_resolution
build:qnx-x86_64 --incompatible_strict_action_env
build:qnx-x86_64 --sandbox_writable_path=/var/tmp
build:qnx-x86_64 --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix
build:qnx-x86_64 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix
build:qnx-x86_64 --extra_toolchains=@toolchains_qnx_ifs//:ifs_x86_64
build:qnx-x86_64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800

test --test_tag_filters=-manual
test --test_output=errors
build:itf-qnx-x86_64 --config=qnx-x86_64
build:itf-qnx-x86_64 --run_under=@score_itf//scripts:run_under_qemu
build:itf-qnx-x86_64 --test_arg="--qemu"
build:itf-qnx-x86_64 --test_arg="--os=qnx"

build:shared --sandbox_writable_path=/var/tmp
build:shared --host_platform=@score_bazel_platforms//:x86_64-linux

build:x86_64-linux --config=shared
build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
build:x86_64-linux --features=-treat_warnings_as_errors # due to baselibs deprecations
build:linux-x86_64 --config=_common
build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
build:linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix

# this is deprecated, use build:x86_64-linux instead
build:_bl_common --host_platform=@score_bazel_platforms//:x86_64-linux
build:eb-aarch64 --config=_common
build:eb-aarch64 --extra_toolchains=@gcc_toolchain//:aarch64_gcc_13
build:eb-aarch64 --platforms=@score_toolchains_gcc//platforms:aarch64-linux
build:eb-aarch64 --spawn_strategy=local

# This config is for internal module usage ONLY.
build:bl-x86_64-qnx --config=_bl_common
build:bl-x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx
build:bl-x86_64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_x86_64

# This config is for internal module usage ONLY.
build:bl-x86_64-linux-autosd --config=_bl_common
build:bl-x86_64-linux-autosd --define=score_sw_platform=autosd
build:bl-x86_64-linux-autosd --platforms=@score_bazel_platforms//:x86_64-linux
build:bl-x86_64-linux-autosd --extra_toolchains=@autosd_10_gcc_repo//:gcc_toolchain_linux_x86_64
build:bl-x86_64-linux-autosd --force_pic
build:autosd-x86_64 --config=_common
build:autosd-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux
build:autosd-x86_64 --force_pic
build:autosd-x86_64 --extra_toolchains=@autosd_10_gcc_repo//:gcc_toolchain_linux_x86_64
build:autosd-x86_64 --extra_toolchains=@rules_rpm//toolchains:linux_x86_64

# This config is for internal module usage ONLY.
test:bl-x86_64-linux --config=_bl_common
test:bl-x86_64-linux --build_tests_only
test:bl-x86_64-linux --test_tag_filters=-manual
test:bl-x86_64-linux --test_output=errors


# config from communication .bazelrc file
# unshare /dev/shm and /tmp
test --sandbox_tmpfs_path=/dev/shm
test --sandbox_tmpfs_path=/tmp
test:unit-tests --config=linux-x86_64

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

# user specific overrides (like proxy settings)
try-import %workspace%/user.bazelrc
try-import %workspace%/user.bazelrc
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.1
8.4.2
16 changes: 6 additions & 10 deletions .github/workflows/build_and_test_autosd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ name: AutoSD - Build & Test
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'integration/**'

merge_group:
types: [checks_requested]
paths:
- 'integration/**'

jobs:
build:
Expand All @@ -43,7 +40,7 @@ jobs:
- name: Build Showcases RPMs
run: |
bazel build --config autosd-x86_64 //images/autosd_x86_64:score-reference-integration
working-directory: ./integration/images/autosd_x86_64
working-directory: ./images/autosd_x86_64

- name: Copy RPMs
run: |
Expand All @@ -52,13 +49,12 @@ jobs:
cp bazel-bin/images/autosd_x86_64/score-reference-integration-0.6.0-1.x86_64.rpm ./images/autosd_x86_64/build/rpms
createrepo_c ./images/autosd_x86_64/build/rpms/
ls -l ./images/autosd_x86_64/build/rpms/
working-directory: ./integration

- name: Install AIB Tools
run: |
curl -o auto-image-builder.sh "https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/raw/main/auto-image-builder.sh?ref_type=heads"
chmod +x auto-image-builder.sh
working-directory: ./integration/images/autosd_x86_64/build
working-directory: ./images/autosd_x86_64/build

- name: Build AutoSD QEMU (x86_64)
run: |
Expand All @@ -78,7 +74,7 @@ jobs:
sudo -E ./auto-image-builder.sh to-disk-image localhost/score:latest _build/disk.qcow2

sudo chown $(id -u):$(id -u) _build/disk.qcow2
working-directory: ./integration/images/autosd_x86_64/build
working-directory: ./images/autosd_x86_64/build

- name: Enable KVM group perms
run: |
Expand All @@ -95,12 +91,12 @@ jobs:
./scripts/run_qemu

sshcmd 'cat /etc/os-release'
working-directory: ./integration/images/autosd_x86_64/build
working-directory: ./images/autosd_x86_64/build
env:
SSH_PASSWORD: password

- name: Archive QEMU disk image (x86_64)
uses: actions/upload-artifact@v4
with:
name: autosd10-score-reference_integration-x86_64.qcow2
path: integration/images/autosd_x86_64/build/_build/disk.qcow2
path: images/autosd_x86_64/build/_build/disk.qcow2
5 changes: 0 additions & 5 deletions .github/workflows/build_and_test_ebclfsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ name: EB Corbos Linux for Safety Applications - Build & Test
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'integration/**'
merge_group:
types: [checks_requested]
paths:
- 'integration/**'

jobs:
build:
Expand All @@ -37,7 +33,6 @@ jobs:
- name: Build for EB corbos Linux for Safety Applications and run tests
run: |
bazel build --config=eb-aarch64 //images/ebclfsa_aarch64/scrample_integration:run
working-directory: ./integration

- name: Upload test logs
uses: actions/upload-artifact@v5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

name: Execute Unit Tests
name: Quality check on x86_64 Linux
on:
workflow_dispatch:
pull_request:
Expand All @@ -21,7 +21,7 @@ on:
branches:
- main
jobs:
integration_test:
quality_checks:
runs-on: ubuntu-latest
permissions:
contents: write # required to upload release assets
Expand Down Expand Up @@ -57,18 +57,21 @@ jobs:
disk-cache: ${{ github.workflow }}
repository-cache: true

- name: Bazel build targets
- name: Build image
run: |
scripts/run_unit_tests.sh
cat _logs/ut_summary.md
bazel build --config=linux-x86_64 //images/linux_x86_64:image

- name: Execute Unit Tests
run: |
python3 ./scripts/quality_runners.py --unit-tests

- name: Publish build summary
if: always()
run: |
if [ -f _logs/ut_summary.md ]; then
cat _logs/ut_summary.md >> "$GITHUB_STEP_SUMMARY"
if [ -f docs/verification/unit_test_summary.md ]; then
cat docs/verification/unit_test_summary.md >> "$GITHUB_STEP_SUMMARY"
else
echo "No build summary file found (_logs/ut_summary.md)" >> "$GITHUB_STEP_SUMMARY"
echo "No build summary file found (docs/verification/unit_test_summary.md)" >> "$GITHUB_STEP_SUMMARY"
fi

- name: Upload logs artifact
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/build_and_test_qnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ name: QNX8 - Build & Test
on:
pull_request_target:
types: [opened, reopened, synchronize]
paths:
- 'integration/**'

merge_group:
types: [checks_requested]
paths:
- 'integration/**'

jobs:
qnx-build-x86_64:
Expand Down Expand Up @@ -62,7 +59,6 @@ jobs:
SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }}
run: |
bazel build --config qnx-x86_64 //images/qnx_x86_64:image
working-directory: ./integration

- name: Cleanup QNX license
if: always()
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/known_good_correct.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# *******************************************************************************
# Copyright (c) 2025 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: Known Good Matches Bazel

on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]

permissions:
contents: write

jobs:
check-known-good-matches-bazel:
name: Check Known Good Matches with Bazel
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Check
run: |
ls -la
scripts/known_good/update_module_from_known_good.py --known known_good.json --output-dir integration/bazel_common
if git diff --quiet; then
echo "No changes"
else
echo "You have committed not aligned known_good.json to the code. Please run scripts/known_good/update_module_from_known_good.py and commit the changes to the code. Here are the differences:"
git diff
exit 1
fi
1 change: 1 addition & 0 deletions .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
# - cron: '30 2 * * *' # Every night at 02:30 UTC on main branch
jobs:
integration_test:
if: false # Temporarily disabled until we get things sorted out
uses: ./.github/workflows/reusable_smoke-test.yml
secrets: inherit
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ __pycache__/
/score_*/
/.gita/
/.gita-workspace.csv
integration/build
build
9 changes: 1 addition & 8 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,9 @@ docs(
#"@score_persistency//:needs_json", # cannot be included, as it does not contain any needs?
#"@score_orchestrator//:needs_json", # some issue about score_toolchains_qnx?
#"@score_communication//:needs_json", # no docs yet?
"@score_feo//:needs_json",
# "@score_feo//:needs_json",
"@score_docs_as_code//:needs_json",
"@score_process//:needs_json",
],
source_dir = "docs",
)

# Simple filegroup target to demonstrate the build system works
filegroup(
name = "readme",
srcs = ["README.md"],
visibility = ["//visibility:public"],
)
Loading
Loading