Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ec1b408
add basic bazel files
AlexanderLanin Oct 6, 2025
b8ce356
ignore qnx_qemu
AlexanderLanin Oct 8, 2025
39bb136
fix docs
AlexanderLanin Oct 8, 2025
1c5df3e
works: bazel query ...
AlexanderLanin Oct 9, 2025
f95e892
@score-baselibs//score/... working
kgraeper Oct 13, 2025
3c43c1c
com working
kgraeper Oct 17, 2025
84de3e4
score_persistency
kgraeper Oct 17, 2025
2226e66
pointing COM to ETAS-contrib
kgraeper Oct 23, 2025
5121ff3
prettify the README, add sample integration script
kgraeper Oct 23, 2025
2f08c1b
add dummy int test
kgraeper Oct 23, 2025
48e86e6
chore(ci): add push/PR triggers for bazel branch
kgraeper Oct 23, 2025
40e3430
remove local_path_override
kgraeper Oct 23, 2025
d7d3167
update COM and formatting
kgraeper Oct 23, 2025
195d07e
add caching, remove @communication//third_party/...
kgraeper Oct 23, 2025
21c52c9
Fix indentation in Bazel setup step
kgraeper Oct 23, 2025
c286635
change com commit
kgraeper Oct 23, 2025
53d17b0
update com
kgraeper Oct 23, 2025
0c1f975
change summary to markdown
kgraeper Oct 23, 2025
d5111eb
fix path
kgraeper Oct 23, 2025
87553c6
fix layout
kgraeper Oct 23, 2025
2bd49f6
update to latest baselibs - with custom baselibs
kgraeper Oct 28, 2025
15fbe99
fix: local_path_override ...
kgraeper Oct 28, 2025
f9e1913
cleanup
kgraeper Oct 29, 2025
73f957c
cleanup
kgraeper Oct 29, 2025
d939b2d
add disk space monitoring before and after Bazel build
kgraeper Oct 30, 2025
fbfab7e
Apply suggestions from code review
kgraeper Oct 30, 2025
278b155
add total
kgraeper Oct 30, 2025
117b2df
Apply suggestions from code review
kgraeper Oct 30, 2025
35c049d
fix copilot correction
kgraeper Oct 30, 2025
c033fb7
fix copilot issue
kgraeper Oct 30, 2025
c3afe5b
remove branch restriction for push event in CI workflow
kgraeper Oct 30, 2025
142908f
fix findings
kgraeper Nov 4, 2025
1faafb2
rename git_override.MODULE.bazel to score_modules.MODULE.bazel
kgraeper Nov 4, 2025
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
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
qnx_qemu
58 changes: 58 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# *******************************************************************************
# 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 --@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.
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

# user specific overrides (like proxy settings)
try-import %workspace%/user.bazelrc
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.3.1
78 changes: 78 additions & 0 deletions .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# *******************************************************************************
# 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
# *******************************************************************************

# Workflow configuration for S-CORE CI - Bazel Build & Test baselibs
# This workflow runs Bazel build and test when triggered by specific pull request events.
Comment on lines +14 to +15
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

The comment mentions 'baselibs' and 'pull request events', but the workflow actually builds multiple repositories (baselibs, communication, persistency, score-mw-log) and triggers on push to 'bazel' branch and workflow_dispatch, not pull requests. Update the description to accurately reflect the workflow's scope.

Suggested change
# Workflow configuration for S-CORE CI - Bazel Build & Test baselibs
# This workflow runs Bazel build and test when triggered by specific pull request events.
# Workflow configuration for S-CORE CI - Bazel Build & Test for multiple repositories (baselibs, communication, persistency, score-mw-log)
# This workflow runs Bazel build and test for multiple repositories when triggered by a push to the 'bazel' branch or manually via workflow_dispatch.

Copilot uses AI. Check for mistakes.

name: Bazel Build some repositories
on:
workflow_dispatch:
push:
jobs:
integration_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.15.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Show disk space before build
run: |
echo 'Disk space before build:'
df -h
echo 'Inode usage before build:'
df -i
echo 'Largest top-level directories:'
du -h -d 1 2>/dev/null | sort -h | tail -n 20 || true
- name: Bazel build targets
run: |
echo 'Starting Bazel build (disk space snapshot):'
df -h | sed 's/^/PRE-BUILD DF /'
./integration_test.sh
- name: Show disk space after build
if: always()
run: |
echo 'Disk space after build:'
df -h
echo 'Inode usage after build:'
df -i
echo 'Largest top-level directories after build:'
du -h -d 1 2>/dev/null | sort -h | tail -n 20 || true
- name: Publish build summary
if: always()
run: |
if [ -f _logs/build_summary.md ]; then
{
echo '## Bazel Build Summary'
echo
# Append the markdown directly so tables render (no leading indentation)
cat _logs/build_summary.md
} >> "$GITHUB_STEP_SUMMARY"
else
echo "No build summary file found (_logs/build_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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Bazel
bazel-*
MODULE.bazel.lock
user.bazelrc

_logs

# Ruff
.ruff_cache
28 changes: 28 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# *******************************************************************************
# 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
# *******************************************************************************

# load("@score_docs_as_code//:docs.bzl", "docs")

# docs(
# data = [
# # TODO: add all modules that have docs
# ],
# source_dir = "docs",
# )

# Simple filegroup target to demonstrate the build system works
filegroup(
name = "readme",
srcs = ["README.md"],
visibility = ["//visibility:public"],
)
107 changes: 107 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# *******************************************************************************
# 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
# *******************************************************************************

module(
name = "score_reference_integration",
version = "0.0.0",
compatibility_level = 0,
)

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

# for building documentation, verifying traceability etc.
bazel_dep(name = "score_platform", version = "0.3.0")
bazel_dep(name = "score_bazel_platforms", version = "0.0.2")

# QNX toolchain
bazel_dep(name = "score_toolchains_qnx", version = "0.0.2")
toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx")
toolchains_qnx.sdp(
sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",
strip_prefix = "installation",
url = "https://www.qnx.com/download/download/79858/installation.tgz",
)
use_repo(toolchains_qnx, "toolchains_qnx_sdp")
use_repo(toolchains_qnx, "toolchains_qnx_qcc")

#gcc toolchain for baselibs
bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency=False)
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency=False)
gcc.toolchain(
url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz",
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",
strip_prefix = "x86_64-unknown-linux-gnu",
)
gcc.extra_features(
features = [
"minimal_warnings",
"treat_warnings_as_errors",
],
)
gcc.warning_flags(
minimal_warnings = ["-Wall", "-Wno-error=deprecated-declarations", "-Wno-error=narrowing"],
strict_warnings = ["-Wextra", "-Wpedantic"],
treat_warnings_as_errors = ["-Werror"],
)
use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc")
register_toolchains("@gcc_toolchain//:all")

# LLVM Toolchains
bazel_dep(name = "toolchains_llvm", version = "1.2.0") # persistency module uses 1.2.0 and does not work with 1.4.0 yet
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
cxx_standard = {"": "c++17"},
llvm_version = "19.1.0",
)
use_repo(llvm, "llvm_toolchain")
use_repo(llvm, "llvm_toolchain_llvm")

register_toolchains("@llvm_toolchain//:all")

## needed additions to build
bazel_dep(name = "testing-utils")
git_override(
module_name = "testing-utils",
commit = "a847c7464cfa47e000141631d1223b92560d2e58", # tag v0.2.0
remote = "https://github.com/qorix-group/testing_tools.git",
)

# # TODO: What is this for?
archive_override(
module_name = "rules_boost",
strip_prefix = "rules_boost-master",
urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"],
)

# # TODO: we cannot use communication without including TRLC here?
bazel_dep(name = "trlc", version = "0.0.0")
git_override(
module_name = "trlc",
remote = "https://github.com/bmw-software-engineering/trlc.git",
commit = "650b51a47264a4f232b3341f473527710fc32669", # trlc-2.0.2 release
)

# System/Basics

## 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)
Loading