-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.63 KB
/
Copy pathswift-android.yml
File metadata and controls
43 lines (40 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Swift Android
on: [push]
jobs:
android:
name: Android (x86_64 cross-compile)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Cross-compile check only: unit tests are disabled because SwiftPM's
# index-store-based XCTest discovery fails when cross-compiling a package
# whose test target uses macros ("error: index store path does not exist",
# see swiftlang/swift-package-manager#6950). Re-enable the emulator test
# run once test discovery works for macro-using packages.
- name: Cross-compile for x86_64
uses: skiptools/swift-android-action@v2
with:
swift-version: 6.3.3
build-tests: false
run-tests: false
android-armv7:
name: Android (armv7 cross-compile)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# armv7 can't run on the x86_64 emulator, so this is a cross-compile check
# only (build-tests/run-tests off skips the emulator entirely). The action
# provisions the Android NDK and points the SDK at it via ANDROID_NDK_HOME;
# a bare `swift:6.3.3` container can't build for Android because the SDK's
# `ndk-sysroot` (semaphore.h, libc, …) is supplied by the NDK, not the
# bundle. The action's build command already targets x86_64, so append a
# second `--swift-sdk` for armv7 (last one wins) to retarget the compile.
- name: Cross-compile for armv7
uses: skiptools/swift-android-action@v2
with:
swift-version: 6.3.3
build-tests: false
run-tests: false
swift-build-flags: --swift-sdk armv7-unknown-linux-android28