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