-
Notifications
You must be signed in to change notification settings - Fork 14
add basic bazel files #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ec1b408
b8ce356
39bb136
1c5df3e
f95e892
3c43c1c
84de3e4
2226e66
5121ff3
2f08c1b
48e86e6
40e3430
d7d3167
195d07e
21c52c9
c286635
53d17b0
0c1f975
d5111eb
87553c6
2bd49f6
15fbe99
f9e1913
73f957c
d939b2d
fbfab7e
278b155
117b2df
35c049d
c033fb7
c3afe5b
142908f
1faafb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| qnx_qemu | ||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 8.3.1 |
| 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
|
||||||||||
| # 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. |
| 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 |
| 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"], | ||
| ) |
| 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) |
Uh oh!
There was an error while loading. Please reload this page.