Skip to content

Fix Android CI and flaky GATT notification test - #222

Merged
colemancda merged 4 commits into
masterfrom
fix/android-ci
Jul 20, 2026
Merged

Fix Android CI and flaky GATT notification test#222
colemancda merged 4 commits into
masterfrom
fix/android-ci

Conversation

@colemancda

@colemancda colemancda commented Jul 20, 2026

Copy link
Copy Markdown
Member

Fixes the CI failures present on master.

Android (aarch64, build) — never passed since it was introduced

This job failed on every historical run, for two stacked reasons:

  1. swift.org relocated the official Android SDK artifact, so the android/…_android-0.1.artifactbundle.tar.gz URL returned 404 and the job died at install.
  2. With the URL corrected, the build then failed with 'semaphore.h' file not found. The official bundle declares sdkRootPath: "ndk-sysroot" but ships no sysroot of its own — it requires a separately installed Android NDK. The x86_64 job gets away with it because swift-android-action installs and wires up the NDK; a bare swift sdk install in a plain toolchain container does not.

Rather than add NDK provisioning, both ARM cross-compile jobs now share finagolfin's 6.1.3 SDK — the configuration the armv7 job has been passing with all along, since that bundle includes its own sysroot. The two jobs are collapsed into one matrix; the check names Android (aarch64, build) and Android (armv7, build) are unchanged.

Android (x86_64, test)

swift-test-flags: --no-parallel is passed verbatim to the on-device test runner binaries, and the XCTest runner rejects it (Error: Invalid option "--no-parallel"), failing the job before any test ran. Removed the flag; the race it guarded against is fixed at the source instead (below). Verified the job is genuinely green rather than vacuously green: the swift-testing invocation runs 474 tests in 30 suites, all passing.

Linux (swift:6.1.2, debug) — flaky GATTTests.notification()

The test slept a fixed 1 ms after server.writeValue before asserting, but notifications are delivered via detached tasks, so under CI load the assertion ran before delivery (receivedNotifications → []). Replaced the sleep with the same 10 ms/~5 s polling pattern already used for write completion in GATTClientServerTests.


Verified: swift test --filter GATTTests passes locally; the relocated SDK URL downloads with a checksum matching the existing value; the SDK bundle's swift-sdk.json was inspected directly to confirm the missing sysroot and the available target triples.

@github-code-quality

github-code-quality Bot commented Jul 20, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: Swift

Swift / code-coverage/llvm-cov

The overall coverage remains at 88%, unchanged from the master branch.


Updated July 20, 2026 03:55 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@colemancda
colemancda merged commit 9d3b968 into master Jul 20, 2026
49 checks passed
@colemancda
colemancda deleted the fix/android-ci branch July 20, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant