7
7
pull_request :
8
8
branches :
9
9
- " *"
10
+ workflow_dispatch :
10
11
11
12
jobs :
12
13
macos :
63
64
- uses : actions/checkout@v4
64
65
- run : swift build
65
66
- run : swift test
67
+
68
+ android :
69
+ name : Android (Swift 6.0.2)
70
+ runs-on : ubuntu-22.04
71
+ steps :
72
+ - name : Checkout Repository
73
+ uses : actions/checkout@v4
74
+ - name : Install Swift
75
+ uses : tayloraswift/swift-install-action@master
76
+ with :
77
+ swift-prefix : swift-6.0.2-release/ubuntu2204/swift-6.0.2-RELEASE
78
+ swift-id : swift-6.0.2-RELEASE-ubuntu22.04
79
+ - name : Check Swift
80
+ run : swift --version
81
+ - name : Install Android SDK
82
+ run :
83
+ swift sdk install https://github.com/finagolfin/swift-android-sdk/releases/download/6.0.2/swift-6.0.2-RELEASE-android-24-0.1.artifactbundle.tar.gz --checksum d75615eac3e614131133c7cc2076b0b8fb4327d89dce802c25cd53e75e1881f4
84
+ - name : Check Android SDK
85
+ run :
86
+ swift sdk configure --show-configuration swift-6.0.2-RELEASE-android-24-0.1 x86_64-unknown-linux-android24
87
+ - name : Build Tests
88
+ run :
89
+ swift build --build-tests --swift-sdk x86_64-unknown-linux-android24 -Xswiftc -Xclang-linker -Xswiftc -fuse-ld=lld
90
+ - name : Prepare Android Emulator Test Script
91
+ run : |
92
+ mkdir pack
93
+ cp .build/x86_64-unknown-linux-android24/debug/swift-snapshot-testingPackageTests.xctest pack
94
+
95
+ cp /home/runner/.config/swiftpm/swift-sdks/swift-6.0.2-RELEASE-android-24-0.1.artifactbundle/swift-6.0.2-release-android-24-sdk/android-27c-sysroot/usr/lib/x86_64-linux-android/24/lib*.so pack
96
+ rm pack/lib{c,dl,log,m,z}.so
97
+
98
+ set -x
99
+ cat > ~/test-toolchain.sh << EOF
100
+ adb push pack /data/local/tmp
101
+ adb shell /data/local/tmp/pack/swift-snapshot-testingPackageTests.xctest
102
+ EOF
103
+
104
+ chmod +x ~/test-toolchain.sh
105
+ - name : Run Tests on Android Emulator
106
+ uses : reactivecircus/android-emulator-runner@v2
107
+ with :
108
+ api-level : 29
109
+ arch : x86_64
110
+ script : ~/test-toolchain.sh
0 commit comments