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
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: 48 additions & 60 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,81 +1,69 @@
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
Copy link
Contributor

Choose a reason for hiding this comment

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

why was the header removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted

# 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
test:unit-tests --build_tests_only

# 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
# Coverage configuration for C++
coverage --features=coverage
coverage --combined_report=lcov

# 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
30 changes: 18 additions & 12 deletions .github/workflows/build_and_test_autosd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

name: AutoSD - Build & Test
name: AutoSD - Build & Integration Test

on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'integration/**'

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

push:
branches:
- main

jobs:
build:
Expand All @@ -33,7 +34,12 @@ jobs:
uses: actions/checkout@v4

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.9.1
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
cache-save: ${{ github.event_name == 'push' }}

- name: Install System Dependencies
run: |
Expand All @@ -43,7 +49,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,16 +58,16 @@ 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: |
export AIB_PODMAN_OPTIONS="--tmpfs /var/tmp"
export AIB_LOCAL_CONTAINER_STORAGE=$PWD/_build/containers-storage

mkdir -p _build/containers-storage
Expand All @@ -78,7 +84,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 +101,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
18 changes: 12 additions & 6 deletions .github/workflows/build_and_test_ebclfsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

name: EB Corbos Linux for Safety Applications - Build & Test
name: EB Corbos Linux for Safety - Build & Integration Test

on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'integration/**'
merge_group:
types: [checks_requested]
paths:
- 'integration/**'

push:
branches:
- main
jobs:
build:
name: aarch64
Expand All @@ -33,11 +32,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
cache-save: ${{ github.event_name == 'push' }}

- 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,17 +11,17 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

name: Execute Unit Tests
name: Linux - Build & Integration Test
on:
workflow_dispatch:
pull_request:
release:
types: [created]
push:
branches:
- main
- main
jobs:
integration_test:
x86_64:
runs-on: ubuntu-latest
permissions:
contents: write # required to upload release assets
Expand Down Expand Up @@ -51,47 +51,17 @@ jobs:
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.15.0
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
cache-save: ${{ github.event_name == 'push' }}

- name: Bazel build targets
- name: Build image
run: |
scripts/run_unit_tests.sh
cat _logs/ut_summary.md

- name: Publish build summary
if: always()
bazel build --config=linux-x86_64 //images/linux_x86_64:image

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

- name: Upload logs artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: bazel-build-logs
path: _logs/
if-no-files-found: warn
retention-days: 14

- name: Create archive of test reports
if: github.ref_type == 'tag'
run: |
mkdir -p artifacts
find bazel-testlogs/external -name 'test.xml' -print0 | xargs -0 -I{} cp --parents {} artifacts/
zip -r ${{ github.event.repository.name }}_test_reports.zip artifacts/
shell: bash

- name: Upload release asset (attach ZIP to GitHub Release)
uses: softprops/action-gh-release@v2.5.0
if: github.ref_type == 'tag'
with:
files: ${{ github.event.repository.name }}_test_reports.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
echo "NOT YET IMPLEMENTED"
14 changes: 7 additions & 7 deletions .github/workflows/build_and_test_qnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

name: QNX8 - Build & Test
name: QNX8 - Build & Integration Test
on:
pull_request_target:
types: [opened, reopened, synchronize]
paths:
- 'integration/**'

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

push:
branches:
- main

jobs:
qnx-build-x86_64:
Expand All @@ -41,7 +42,7 @@ jobs:
- name: Setup Bazel with shared caching
uses: bazel-contrib/setup-bazel@0.18.0
with:
disk-cache: ${{ inputs.bazel-disk-cache }}
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelisk-cache: true
cache-save: ${{ github.event_name == 'push' }}
Expand All @@ -62,7 +63,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
Loading
Loading