85
85
- uses : actions/checkout@v4
86
86
- name : Run tests
87
87
run : swift build -c ${{ matrix.config }}
88
+
89
+ android :
90
+ name : Android (Swift 6.0.2)
91
+ runs-on : ubuntu-22.04
92
+ steps :
93
+ - name : Checkout Repository
94
+ uses : actions/checkout@v4
95
+ - name : Install Swift
96
+ uses : tayloraswift/swift-install-action@master
97
+ with :
98
+ swift-prefix : swift-6.0.2-release/ubuntu2204/swift-6.0.2-RELEASE
99
+ swift-id : swift-6.0.2-RELEASE-ubuntu22.04
100
+ - name : Check Swift
101
+ run : swift --version
102
+ - name : Install Android SDK
103
+ run :
104
+ 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
105
+ - name : Check Android SDK
106
+ run :
107
+ swift sdk configure --show-configuration swift-6.0.2-RELEASE-android-24-0.1 x86_64-unknown-linux-android24
108
+ - name : Build Tests
109
+ run :
110
+ swift build --build-tests --swift-sdk x86_64-unknown-linux-android24 -Xswiftc -Xclang-linker -Xswiftc -fuse-ld=lld
111
+ - name : Prepare Android Emulator Test Script
112
+ run : |
113
+ mkdir pack
114
+ cp .build/x86_64-unknown-linux-android24/debug/swift-concurrency-extrasPackageTests.xctest pack
115
+
116
+ 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
117
+ rm pack/lib{c,dl,log,m,z}.so
118
+
119
+ set -x
120
+ cat > ~/test-toolchain.sh << EOF
121
+ adb push pack /data/local/tmp
122
+ adb shell /data/local/tmp/pack/swift-concurrency-extrasPackageTests.xctest
123
+ EOF
124
+
125
+ chmod +x ~/test-toolchain.sh
126
+ - name : Run Tests on Android Emulator
127
+ uses : reactivecircus/android-emulator-runner@v2
128
+ with :
129
+ api-level : 29
130
+ arch : x86_64
131
+ script : ~/test-toolchain.sh
0 commit comments