Skip to content
Merged
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
30 changes: 30 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,33 @@ jobs:
run: swift build --build-tests -v
- name: Test (Windows)
run: swift test -v --skip-build

# Uses skiptools/swift-android-action which wraps the swift.org Android
# SDK setup AND runs the SwiftPM tests on an x86_64 Android emulator.
# No `container:` here β€” the action provisions its own toolchain and
# the emulator setup needs nested KVM, which only works on the bare
# ubuntu-* runner image.
#
# Split into two action invocations to surface build vs. test timing
# separately in the Actions UI (mirrors the other platforms' pattern).
# The second invocation reuses the SDK + NDK + AVD caches the first
# populated, so the marginal cost is just the emulator boot + tests.
build-android:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- name: Build (Android)
uses: skiptools/swift-android-action@v2
with:
swift-version: "6.3"
# The default GitHub Linux runner has ~14 GiB free; the SDK,
# NDK, and emulator together push past that without cleanup.
free-disk-space: true
run-tests: false
- name: Test (Android emulator)
uses: skiptools/swift-android-action@v2
with:
swift-version: "6.3"
build-package: false
build-tests: false
Comment on lines +138 to +139
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove flags that skip Android test execution

The Test (Android emulator) invocation sets build-package: false and build-tests: false, but this action only prepares and runs emulator tests when all three conditions are true (run-tests, build-tests, and build-package) in skiptools/swift-android-action’s action.yml (if: inputs.run-tests == 'true' && inputs.build-tests == 'true' && inputs.build-package == 'true' on the test-related steps). In this configuration, the step will not execute Android tests at all, so CI will report green without actually validating Android test behavior.

Useful? React with πŸ‘Β / πŸ‘Ž.