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
7 changes: 7 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ 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

# This config is for internal module usage ONLY.
test:bl-x86_64-linux --config=_bl_common
test:bl-x86_64-linux --build_tests_only
Expand Down
38 changes: 28 additions & 10 deletions .github/workflows/build_and_test_autosd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
build:
name: build-and-test-autosd
runs-on: ubuntu-latest
defaults:
run:
working-directory: autosd/build

steps:
- name: Checkout repository
Expand All @@ -37,31 +34,46 @@ jobs:
- name: Install System Dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y podman curl qemu-system
sudo apt-get install -y podman curl qemu-system createrepo-c

- name: Build Lola Demo
run: |
bazel build --config=bl-x86_64-linux-autosd //:lola-demo
working-directory: ./autosd

- name: Copy RPMs
run: |
set -e
mkdir -p ./build/rpms
cp bazel-out/k8-fastbuild/bin/lola-demo-1.0.0-1.x86_64.rpm ./build/rpms
cp bazel-out/k8-fastbuild/bin/lola-demo-1.0.0-1.src.rpm ./build/rpms
createrepo_c ./build/rpms/
ls -l ./build/rpms/
working-directory: ./autosd

- 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"
curl -o auto-image-builder.sh "https://gitlab.com/lrossett/automotive-image-builder/-/raw/script-fix/auto-image-builder.sh?ref_type=heads"
chmod +x auto-image-builder.sh

curl -o automotive-image-runner "https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/raw/main/automotive-image-runner"
chmod +x automotive-image-runner
working-directory: ./autosd/build

- name: Build lola-demo.aib.yml
run: |
sudo ./auto-image-builder.sh build \
sudo ./auto-image-builder.sh build-deprecated \
--distro autosd10 \
--mode package \
--target qemu \
--export qcow2 \
--define-file vars.yml \
--define-file vars-devel.yml \
lola-demo.aib.yml \
image.aib.yml \
disk.qcow2

sudo chown $(id -u) disk.qcow2

mv disk.qcow2 ../disk.qcow2
working-directory: ./autosd/build

- name: Enable KVM group perms
run: |
Expand All @@ -80,6 +92,12 @@ jobs:
sshcmd 'bluechictl start agent-qm lola-ipc-sub.service'
sleep 5
sshcmd '/usr/bin/lola-ipc-test'
working-directory: ./autosd
working-directory: ./autosd/build
env:
SSH_PASSWORD: password

- name: Archive QEMU disk image
uses: actions/upload-artifact@v4
with:
name: autosd10-score-reference_integration-x86_64.qcow2
path: autosd/build/disk.qcow2
1 change: 0 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module(
include("//:score_modules.MODULE.bazel")
include("//:score_toolchains.MODULE.bazel")


## Python
bazel_dep(name = "rules_python", version = "1.4.1")

Expand Down
71 changes: 71 additions & 0 deletions autosd/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# *******************************************************************************
# 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


# Flags needed by score_baselibs and communication modules.
# Do not add more!
build --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False
build --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
build --@score_baselibs//score/json:base_library=nlohmann
build --@score_communication//score/mw/com/flags:tracing_library=stub

# 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

test --test_tag_filters=-manual
test --test_output=errors

build:_bl_common --host_platform=@score_bazel_platforms//:x86_64-linux

# This config is for internal module usage ONLY.
build:bl-x86_64-linux --config=_bl_common
build:bl-x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux
build:bl-x86_64-linux --extra_toolchains=@gcc_toolchain//:host_gcc_12

# 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 --incompatible_enable_cc_toolchain_resolution
build:bl-x86_64-linux-autosd --config=_bl_common
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

# 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

# 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
32 changes: 32 additions & 0 deletions autosd/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# *******************************************************************************
# Copyright (c) 2024 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
# *******************************************************************************
load("@rules_rpm//rpm:defs.bzl", "rpm_package")

rpm_package(
name = "lola-demo",
binaries = [
"@score_communication//score/mw/com/example/ipc_bridge:ipc_bridge_cpp",
],
config_dir = "/etc/lola",
data = [
"@score_communication//score/mw/com/example/ipc_bridge:etc/mw_com_config.json",
],
data_dir = "/usr/share/lola/examples",
description = "LOLA middleware communication libraries for development including core communication, configuration components, and example client/server binaries for testing",
libraries = [
"@score_communication//score/mw/com:com",
"@score_communication//score/mw/com:config_schema",
],
summary = "LOLA Demo",
version = "1.0.0",
)
57 changes: 55 additions & 2 deletions autosd/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,60 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
module(
name = "score_ri_autosd",
name = "os_autosd_reference_integration",
version = "0.0.1",
compatibility_level = 0,
)

include("//:score_modules.MODULE.bazel")
include("//:score_toolchains.MODULE.bazel")

## Python
bazel_dep(name = "rules_python", version = "1.4.1")

PYTHON_VERSION = "3.12"

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
configure_coverage_tool = True,
is_default = True,
python_version = PYTHON_VERSION,
)
use_repo(python)

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
pip.parse(
hub_name = "pip_score_venv_test",
python_version = PYTHON_VERSION,
requirements_lock = "//feature_integration_tests/python_test_cases:requirements.txt.lock",
)
use_repo(pip, "pip_score_venv_test")

# communication module dependencies
# archive_override are not forwarded by bazel_dep, so we need to redefine it here
bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost")
archive_override(
module_name = "rules_boost",
strip_prefix = "rules_boost-master",
urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"],
)

# git_override are not forwarded by bazel_dep, so we need to redefine it here
bazel_dep(name = "trlc")
git_override(
module_name = "trlc",
commit = "650b51a47264a4f232b3341f473527710fc32669", # trlc-2.0.2 release
remote = "https://github.com/bmw-software-engineering/trlc.git",
)

# imports for the feature showcase module
bazel_dep(name = "rules_rust", version = "0.61.0")
bazel_dep(name = "score_itf", version = "0.1.0")
bazel_dep(name = "score_crates", version = "0.0.4")

# RPM packaging support
bazel_dep(name = "rules_rpm", version = "0.1.0")
git_override(
module_name = "rules_rpm",
branch = "main",
remote = "https://github.com/bilelmoussaoui/bazel-rpm.git",
)
3 changes: 1 addition & 2 deletions autosd/build/files/lola-ipc-pub.service
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ After=network.target

[Service]
Type=simple
WorkingDirectory=/usr/share/score-communication/examples/ipc_bridge/etc/
WorkingDirectory=/usr/share/lola/examples
ExecStart=/usr/bin/ipc_bridge_cpp --mode skeleton --num-cycles 5 --cycle-time 1000 --service_instance_manifest mw_com_config.json
Restart=on-failure
RestartSec=5
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

2 changes: 1 addition & 1 deletion autosd/build/files/lola-ipc-sub.service
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Description=LoLa IPC Subscriber
After=network.target

[Service]
WorkingDirectory=/usr/share/score-communication/examples/ipc_bridge/etc/
WorkingDirectory=/usr/share/lola/examples
ExecStart=/usr/bin/ipc_bridge_cpp --mode proxy --num-cycles 5 --cycle-time 1000 --service_instance_manifest mw_com_config.json
Restart=on-failure
RestartSec=5
Expand Down
2 changes: 1 addition & 1 deletion autosd/build/files/lola-ipc-test.service
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ After=proxy@agent-main_lola-ipc-pub.service

[Service]
Type=oneshot
ExecStart=/bin/bash /usr/local/bin/lola-ipc-test
ExecStart=/bin/bash /usr/bin/lola-ipc-test
RemainAfterExit=yes
23 changes: 7 additions & 16 deletions autosd/build/lola-demo.aib.yml → autosd/build/image.aib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
#
name: esdv-score-lola-0.5
name: score-autosd

image:
selinux_mode: permissive
Expand All @@ -22,16 +22,12 @@ content:
- id: epel
baseurl: https://dl.fedoraproject.org/pub/epel/10/Everything/$arch/
- id: score
baseurl: https://download.copr.fedorainfracloud.org/results/pingou/score-playground/epel-10-$arch/
baseurl: file:///host/rpms
rpms:
- vim-enhanced
- gdb
- strace
- boost-devel
- score-baselibs
- score-communication
- score-communication-performance-benchmarks
- score-communication-examples
- tree
- dnf
# For testing the image only:
Expand All @@ -42,6 +38,8 @@ content:
- bluechi-controller
- bluechi-agent
- bluechi-ctl
# score
- lola-demo

make_dirs:
- path: /etc/containers/systemd/qm.container.d
Expand All @@ -51,11 +49,6 @@ content:

# Configure shared socket directory via tmpfiles
add_files:
# lola config files
- path: /usr/lib/tmpfiles.d/lola_ipc.conf
text: |
# Lola shared memory segment folder
D! /dev/shm/lola_qm 0755 root root
- path: /usr/lib/tmpfiles.d/lola_disc.conf
text: |
# Lola service discovery folder
Expand All @@ -64,7 +57,7 @@ content:
text: |
# Mount shared IPC directory for lola
[Container]
Volume=/dev/shm/lola_qm:/dev/shm/lola_qm
Volume=/dev/shm:/dev/shm
Volume=/tmp/mw_com_lola:/tmp/mw_com_lola
- path: /etc/containers/systemd/qm.container.d/11-bluechi-socket.conf
text: |
Expand Down Expand Up @@ -104,13 +97,11 @@ qm:
- id: epel
baseurl: https://dl.fedoraproject.org/pub/epel/10/Everything/$arch/
- id: score
baseurl: https://download.copr.fedorainfracloud.org/results/pingou/score-playground/epel-10-$arch/
baseurl: file:///host/rpms
rpms:
- boost-devel
- score-baselibs
- score-communication-examples
- score-communication
- bluechi-agent
- lola-demo
add_files:
# lola service files
- path: /etc/systemd/system/lola-ipc-sub.service
Expand Down
File renamed without changes.
Empty file added autosd/patches/BUILD
Empty file.
12 changes: 12 additions & 0 deletions autosd/patches/baselibs/0001-RH-exception-header.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/score/concurrency/clock.h b/score/concurrency/clock.h
index 0fa7719..365a003 100644
--- a/score/concurrency/clock.h
+++ b/score/concurrency/clock.h
@@ -15,6 +15,7 @@

#include <chrono>
#include <mutex>
+#include <exception>

namespace score
{
Loading
Loading