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
8 changes: 7 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,17 @@ common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
common --@score_baselibs//score/json:base_library=nlohmann
common --//score/datarouter/build_configuration_flags:persistent_logging=False
common --//score/datarouter/build_configuration_flags:persistent_config_feature_enabled=False
common --//score/datarouter/build_configuration_flags:enable_nonverbose_dlt=False
common --//score/datarouter/build_configuration_flags:enable_dynamic_configuration=False
common --//score/datarouter/build_configuration_flags:file_transfer=False
common --//score/datarouter/build_configuration_flags:use_local_vlan=True

# TODO: Remove once score_baselibs fixes deprecated StringLiteral and
# ignored-attributes warnings (string_comparison_adaptor.h, text_format.h, etc.)
build --copt=-Wno-deprecated-declarations
build --copt=-Wno-ignored-attributes
# TODO: Remove once score_itf fixes strict-warning incompatibilities in dlt_daemon C code
build --per_file_copt=external.*score_itf.*dlt_daemon/.*@-Wno-missing-prototypes,-Wno-address,-Wno-stringop-truncation,-Wno-format,-Wno-format-nonliteral,-Wno-suggest-attribute=format

# Base QNX config (shared flags)
common:qnx --credential_helper=*.qnx.com=%workspace%/scripts/internal/qnx_creds.py
common:qnx --credential_helper_timeout="60s"
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/component_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# *******************************************************************************
# 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
# *******************************************************************************

name: Component Tests

on:
pull_request:
types: [opened, reopened, synchronize]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
component-tests:
name: Run Component Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-version: 1.26.0
disk-cache: true
repository-cache: true
bazelisk-cache: true

- name: Bazel info (discover paths)
id: bazel-info
run: |
echo "BAZEL_OUTPUT_BASE=$(bazel info output_base)" >> $GITHUB_ENV
echo "BAZEL_REPO_CACHE=$(bazel info repository_cache)" >> $GITHUB_ENV
bazel info

- name: Cache Bazel output base
uses: actions/cache@v4
with:
path: |
${{ env.BAZEL_OUTPUT_BASE }}/action_cache
${{ env.BAZEL_OUTPUT_BASE }}/bazel-out
${{ env.BAZEL_OUTPUT_BASE }}/external
${{ env.BAZEL_OUTPUT_BASE }}/execroot
key: bazel-ob-component-v1-${{ runner.os }}-${{ hashFiles('.bazelversion', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.bzl') }}
restore-keys: |
bazel-ob-component-v1-${{ runner.os }}-

- name: Run component tests
run: |
bazel test --lockfile_mode=error --config x86_64-linux \
--test_tag_filters=integration \
--test_output=errors \
//score/test/component/datarouter:test_datarouter_filters \
//score/test/component/mw_log:test_mw_log \
//score/test/component/mw_log:test_mw_log_filters
64 changes: 64 additions & 0 deletions .github/workflows/component_tests_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# *******************************************************************************
# 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
# *******************************************************************************

name: Component Tests Nightly

on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch: {}

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
component-tests-nightly:
name: Run Component Tests Nightly
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-version: 1.26.0
disk-cache: true
repository-cache: true
bazelisk-cache: true

- name: Bazel info (discover paths)
id: bazel-info
run: |
echo "BAZEL_OUTPUT_BASE=$(bazel info output_base)" >> $GITHUB_ENV
echo "BAZEL_REPO_CACHE=$(bazel info repository_cache)" >> $GITHUB_ENV
bazel info

- name: Cache Bazel output base
uses: actions/cache@v4
with:
path: |
${{ env.BAZEL_OUTPUT_BASE }}/action_cache
${{ env.BAZEL_OUTPUT_BASE }}/bazel-out
${{ env.BAZEL_OUTPUT_BASE }}/external
${{ env.BAZEL_OUTPUT_BASE }}/execroot
key: bazel-ob-component-v1-${{ runner.os }}-${{ hashFiles('.bazelversion', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.bzl') }}
restore-keys: |
bazel-ob-component-v1-${{ runner.os }}-

- name: Run component tests
run: |
bazel test --lockfile_mode=error --config x86_64-linux \
--test_tag_filters=integration \
--test_output=errors \
//score/test/component/...
2 changes: 1 addition & 1 deletion .github/workflows/coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
uses: eclipse-score/cicd-workflows/.github/workflows/cpp-coverage.yml@main
with:
bazel-target: "//..."
extra-bazel-flags: "--lockfile_mode=error"
extra-bazel-flags: "--lockfile_mode=error --test_tag_filters=-integration"
4 changes: 2 additions & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
bazel test \
--config=${{ matrix.sanitizer_config }} \
//score/... \
--build_tag_filters=-rust \
--test_tag_filters=-rust \
--build_tag_filters=-rust,-integration \
--test_tag_filters=-rust,-integration \
--verbose_failures
- name: Upload Bazel test logs (always)
Expand Down
15 changes: 15 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ bazel_dep(name = "score_rust_policies", version = "0.0.3")

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)

# OCI / Docker image rules for integration tests
bazel_dep(name = "rules_oci", version = "2.2.7", dev_dependency = True)
bazel_dep(name = "rules_pkg", version = "1.2.0", dev_dependency = True)

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci", dev_dependency = True)
oci.pull(
name = "ubuntu_24_04",
digest = "sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30",
image = "ubuntu",
platforms = ["linux/amd64"],
tag = "24.04",
)
use_repo(oci, "ubuntu_24_04", "ubuntu_24_04_linux_amd64")

# Toolchains and extensions
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.1", dev_dependency = True)
Expand Down
Loading
Loading