Skip to content

[Maintenance]: Run the C++ test suite on macOS CI #275

Closed

Description

@MisterVVP

Context

The current macos-build job in .github/workflows/ci.yml configures and builds the SDK on macos-14 with Ninja and RelWithDebInfo, using Homebrew dependencies. It does not execute the CTest suite, even though A2A_ENABLE_TESTING defaults to ON and the test binaries are built.

This leaves macOS-specific runtime, lifecycle, networking, cancellation, and portability regressions outside automated test execution. Linux coverage does not validate the macOS runtime or platform-specific code paths, and a successful compile cannot establish correct stream shutdown or thread coordination.

A patch release is a good place to close this validation gap without changing public SDK behavior. This is the macOS counterpart of #260.

Goal

Run all applicable deterministic C++ tests on macOS CI after a successful build, and make platform-specific exclusions explicit rather than silently skipping test execution.

Scope

  • Extend the existing macos-build job to execute CTest after the build.
  • Explicitly enable A2A_ENABLE_TESTING=ON in the configure step so test execution does not depend on the default remaining unchanged.
  • Use the normal test registration already produced by CMake rather than creating a separate macOS-only test harness.
  • Run the applicable unit, functional, and integration tests, including gRPC client/server transport, streaming cancellation, subscription lifecycle, and local networking tests.
  • Execute portable Python-backed tests registered with CTest when their prerequisites are available; distinguish missing prerequisites from genuine platform limitations.
  • Start with the current service-free configuration; PostgreSQL support is disabled in this build.
  • If a test is genuinely unsupported on macOS, document why, exclude it narrowly by test name or label, and keep the exclusion close to the workflow/test definition. Avoid broad regexes that hide unrelated failures.
  • Surface normal --output-on-failure diagnostics and fail the job if no tests are discovered.
  • Preserve the existing runner, Homebrew dependency strategy, Ninja generator, and RelWithDebInfo build configuration.

The existing configure step should explicitly include:

cmake -S . -B build -G Ninja \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DA2A_ENABLE_TESTING=ON \
  -DCMAKE_PREFIX_PATH="$(brew --prefix);$(brew --prefix curl)"

After the existing successful build, run:

ctest --test-dir build --output-on-failure --no-tests=error

The current Ninja build uses a single configuration selected at configure time; it does not require the Windows job's -C RelWithDebInfo argument.

Non-goals

  • Adding new SDK features or changing public APIs.
  • Reworking the macOS dependency strategy or expanding the runner/architecture matrix.
  • Adding PostgreSQL service setup or PostgreSQL-backed tests as part of this issue.
  • Duplicating the Linux lint, coverage, sanitizer, or cross-SDK interoperability pipelines.
  • Adding macOS performance gates or comparing macOS benchmark numbers directly with Linux results. Functional portability coverage does not resolve the PostgreSQL performance attribution question.
  • Weakening or removing existing Linux or Windows coverage.

Acceptance criteria

  • The macOS CI job explicitly configures testing and executes CTest after building the SDK.
  • Core unit tests run on macOS rather than only compiling.
  • Applicable gRPC transport, streaming, subscription, lifecycle, and cancellation tests execute on macOS.
  • Other portable functional and integration tests registered by the current build execute.
  • Any macOS-specific exclusions or missing-prerequisite skips are narrow and documented.
  • A failing test fails the CI job and produces useful --output-on-failure diagnostics.
  • An empty CTest suite fails the CI job.
  • No public SDK API changes are introduced.
  • The existing macOS build and applicable test suite remain green.
  • Linux and Windows CI behavior is unchanged.
  • AGENTS.md validation requirements remain satisfied for touched code/workflows.

Motivation

The repository already treats macOS as a supported build target. Running the existing deterministic tests provides substantially better regression protection for concurrency-heavy networking code while keeping the initial change small and reusing the current CI setup.

Activity

  1. added this to the v0.5.1 milestone on Oct 8, 2026
  2. self-assigned this
    on Oct 8, 2026
  3. added
    enhancement
    on Oct 8, 2026
  4. added a commit that references this issue on Oct 8, 2026
    53032d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementmaintenance

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions