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
77 changes: 0 additions & 77 deletions .github/workflows/build.yml

This file was deleted.

114 changes: 114 additions & 0 deletions .github/workflows/build_and_test_host.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# *******************************************************************************
# 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
# *******************************************************************************

# Consolidated x86_64-linux build_and_test_host pipeline.
#
# Pattern: build once, test many -- WITHIN THE SAME BAZEL CONFIG.
# - The `build` job compiles the x86_64-linux graph a single time and warms a
# shared Bazel disk cache (disk-cache namespace = this workflow).
# - Test jobs use the SAME config (--config x86_64-linux) and `needs: build`,
# so they start after the cache is saved, get cache hits, and only link +
# run tests.

name: build_and_test_host

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

permissions:
contents: read

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

# Shared by every job so they restore/save the same per-workflow disk cache.
# cache-save is true only off-PR (merge_group) so PRs restore without polluting.
jobs:
build:
name: Build (x86_64-linux)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-version: 1.26.0
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelisk-cache: true
cache-save: ${{ github.event_name != 'pull_request' }}

- name: Build with Bazel
run: |
# Exclude targets that are not expected to build the source code, e.g.
# documentation, format check, live preview, product integration tests.
bazel build --lockfile_mode=error --config x86_64-linux -- \
//... \
-//:* \
-//score/test/component/...

unit-tests:
name: Unit Tests (x86_64-linux)
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-version: 1.26.0
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelisk-cache: true
cache-save: ${{ github.event_name != 'pull_request' }}

- name: Test with Bazel
run: |
# Component tests run in their own job; exclude here to avoid QNX deps.
bazel test --lockfile_mode=error --config x86_64-linux \
--test_tag_filters=-no_ci \
-- //score/... -//score/test/component/...

component-tests:
name: Component Tests (x86_64-linux)
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-version: 1.26.0
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelisk-cache: true
cache-save: ${{ github.event_name != 'pull_request' }}

- 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

65 changes: 0 additions & 65 deletions .github/workflows/component_tests.yml

This file was deleted.

27 changes: 6 additions & 21 deletions .github/workflows/component_tests_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,16 @@ jobs:
uses: actions/checkout@v4.2.2

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.15.0
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-version: 1.26.0
disk-cache: true
# Per-workflow disk cache namespace; the action falls back to the
# most recent cache via its built-in restore-keys prefix.
disk-cache: ${{ github.workflow }}
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 }}-
# Nightly runs (schedule/dispatch) save to seed the warm cache.
cache-save: ${{ github.event_name != 'pull_request' }}

- name: Run component tests
run: |
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ jobs:
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-version: 1.26.0
disk-cache: true
# Per-workflow disk cache namespace; the action falls back to the
# most recent cache via its built-in restore-keys prefix.
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelisk-cache: true
cache-save: ${{ github.event_name == 'push' }}
# Restore on PRs without polluting the shared cache; save on
# merge_group so the integrated state seeds the warm cache.
cache-save: ${{ github.event_name != 'pull_request' }}

- name: Run sanitizer tests via Bazel
run: |
Expand Down
Loading