Skip to content
Draft
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
29 changes: 22 additions & 7 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,26 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry
common --registry=https://bcr.bazel.build

# use mw/log stub implementation by default
common --//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False
common --//score/mw/log/flags:KRemote_Logging=False
common --//score/json:base_library=nlohmann
common --extra_toolchains=@gcc_toolchain//:host_gcc_12
build --incompatible_strict_action_env
test --test_tag_filters=-manual
build:_bl_common_stub --//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False
build:_bl_common_stub --//score/mw/log/flags:KRemote_Logging=False
build:_bl_common_stub --//score/json:base_library=nlohmann

test --test_output=errors
# use mw/log stub implementation by default
build:_bl_common --config=_bl_common_stub
build:_bl_common --incompatible_strict_action_env
build:_bl_common --host_platform=@score_bazel_platforms//:x86_64-linux

# This config us 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 us 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 us for internal module usage ONLY.
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
5 changes: 2 additions & 3 deletions .github/workflows/build_and_test_host_gcc12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ jobs:
uses: bazel-contrib/setup-bazel@0.9.1
- name: Bazel build baselibs targets
run: |
bazel build //score/...
bazel build --config bl-x86_64-linux -- //score/...
- name: Bazel test baselibs targets
run: |
bazel test //score/... \
--build_tests_only -- \
bazel test --config bl-x86_64-linux -- //score/... \
-//score/language/safecpp/aborts_upon_exception:abortsuponexception_toolchain_test \
-//score/containers:dynamic_array_test
57 changes: 57 additions & 0 deletions .github/workflows/release_verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Workflow configuration for S-CORE CI - Release Check
# This workflow runs Bazel build and test when triggered by tag creation.

name: Bazel Build & Test baselibs (with host toolchain GCC12.2)
on:
push:
tags:
- 'v*' # Triggers on version tags like v1.0.0
- 'release-*' # Triggers on release tags like release-1.0.0

permissions:
contents: write

jobs:
build_host:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.9.1
- name: Bazel build baselibs targets
run: |
bazel build --config bl-x86_64-linux -- //score/...
build_qnx:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.9.1
- name: Bazel build baselibs targets
run: |
bazel build --config bl-x86_64-linux -- //score/...
test_host:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.9.1
- name: Bazel test baselibs targets
run: |
bazel test --config bl-x86_64-linux //score/... -- \
-//score/language/safecpp/aborts_upon_exception:abortsuponexception_toolchain_test \
-//score/containers:dynamic_array_test
release_verification:
runs-on: ubuntu-latest
needs: [build_host, build_target, test_host]
if: always() && (needs.build_host.result == 'failure' || needs.build_target.result == 'failure' || needs.test_host.result == 'failure')
steps:
- name: Remove release and tag (if exists)
uses: nikhilbadyal/ghaction-rm-releases@v0.7.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_PATTERN: ${{ github.ref_name }}

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Bazel related files
bazel-*
user.bazelrc
MODULE.bazel.lock

# Local cache related files
.cache

# Local command scripts
compile_commands.json
9 changes: 7 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# *******************************************************************************
module(name = "score-baselibs")

bazel_dep(name = "toolchains_llvm", version = "1.3.0", dev_dependency=True)

# Configure and register the toolchain.
bazel_dep(name = "score_toolchains_gcc", version = "0.4", dev_dependency=True)
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency=True)
Expand Down Expand Up @@ -87,3 +85,10 @@ deb(
bazel_dep(name = "nlohmann_json", version = "3.11.3")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.11")

#############################################################
#
# Constraint values for specifying platforms and toolchains
#
#############################################################
bazel_dep(name = "score_bazel_platforms", version = "0.0.1")
Loading