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
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,8 @@ jobs:
bazel test --lockfile_mode=error --config x86_64-linux \
--test_tag_filters=-no_ci \
-- //score/... -//score/test/component/...

- name: Bazel test integration as module
run: |
# for the beginning, we do this only with the default configuration
cd examples && bazel build //... && bazel mod deps --lockfile_mode=update
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

# Bazel
bazel-*
examples/bazel-*
examples/MODULE.bazel.lock
user.bazelrc

# Compilation databases for code completion in IDEs
Expand Down
17 changes: 9 additions & 8 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ module(
)

# Bazel global rules
bazel_dep(name = "rules_python", version = "1.8.5")
bazel_dep(name = "rules_python", version = "1.8.5", dev_dependency = True)

bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "rules_rust", version = "0.68.1-score")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "aspect_rules_lint", version = "2.5.0")

bazel_dep(name = "aspect_rules_lint", version = "2.5.0", dev_dependency = True)
bazel_dep(name = "score_cpp_policies", version = "0.0.0", dev_dependency = True)
git_override(
module_name = "score_cpp_policies",
Expand All @@ -31,26 +32,26 @@ git_override(
)

bazel_dep(name = "toolchains_llvm", version = "1.7.0", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1", dev_dependency = True)

bazel_dep(name = "buildifier_prebuilt", version = "8.5.1")
bazel_dep(name = "platforms", version = "1.0.0")

# S-CORE process rules
bazel_dep(name = "score_bazel_platforms", version = "0.1.2")
bazel_dep(name = "score_docs_as_code", version = "4.0.1")

bazel_dep(name = "score_docs_as_code", version = "4.0.1", dev_dependency = True)
single_version_override(
module_name = "score_docs_as_code",
version = "4.0.1",
)

bazel_dep(name = "score_tooling", version = "1.2.0")
bazel_dep(name = "score_tooling", version = "1.2.0", dev_dependency = True)
single_version_override(
module_name = "score_tooling",
version = "1.1.2",
)

bazel_dep(name = "score_rust_policies", version = "0.0.5")

bazel_dep(name = "score_rust_policies", version = "0.0.5", dev_dependency = True)
bazel_dep(name = "score_process", version = "1.5.4", dev_dependency = True)
bazel_dep(name = "score_platform", version = "0.5.5", dev_dependency = True)
bazel_dep(name = "score_itf", version = "0.4.0", dev_dependency = True)
Expand Down Expand Up @@ -153,7 +154,7 @@ python.toolchain(

# C++ dependencies

bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)
bazel_dep(name = "rapidjson", version = "1.1.0.bcr.20241007")
bazel_dep(name = "score_baselibs", version = "0.2.7")
bazel_dep(name = "score_communication", version = "0.2.1")
Expand Down
37 changes: 37 additions & 0 deletions examples/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# *******************************************************************************
# 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
# *******************************************************************************

common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
common --registry=https://bcr.bazel.build

# Required score_baselibs configuration settings
common --@score_baselibs//score/json:base_library=nlohmann
common --@score_baselibs//score/memory/shared/flags:use_typedshmd=False
common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False

# Required score_logging configuration settings
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=False
common --@score_logging//score/datarouter/build_configuration_flags:file_transfer=False
common --@score_logging//score/datarouter/build_configuration_flags:use_local_vlan=True

# Java toolchain required by transitive grpc/flatbuffers chain
build --java_language_version=17
build --tool_java_language_version=17
build --java_runtime_version=remotejdk_17
build --tool_java_runtime_version=remotejdk_17

build --copt=-Wno-error=deprecated-declarations
build --copt=-Wno-error=unused-but-set-variable
1 change: 1 addition & 0 deletions examples/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.3.0
9 changes: 9 additions & 0 deletions examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
name = "example",
srcs = ["main.cpp"],
deps = [
"@score_logging//score/mw/log",
],
)

# Needed for Dash tool to check python dependency licenses.
filegroup(
Expand Down
29 changes: 29 additions & 0 deletions examples/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# *******************************************************************************
# 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
# *******************************************************************************

bazel_dep(name = "score_logging", version = "0.0.0")
local_path_override(
module_name = "score_logging",
path = "..",
)

bazel_dep(name = "score_baselibs", version = "0.2.8")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "score_communication", version = "0.2.1")

# Due to incoming transitive deps from baselibs flatbuffers module.
# FIXME: To be removed after https://github.com/eclipse-score/baselibs/issues/266 is resolved
single_version_override(
module_name = "grpc-java",
version = "1.70.0",
)
32 changes: 32 additions & 0 deletions examples/main.cpp
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
********************************************************************************/
// *******************************************************************************
// 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
// *******************************************************************************

#include "score/mw/log/logging.h"

int main(int, char**)
{
score::mw::log::LogInfo() << "score_logging integration example";
return 0;
}
Loading