Skip to content

Commit 3ef5cb1

Browse files
committed
Android CI
1 parent 5d132f7 commit 3ef5cb1

File tree

1 file changed

+5
-41
lines changed

1 file changed

+5
-41
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -76,45 +76,9 @@ jobs:
7676
run: swift test
7777

7878
android:
79-
name: Android (Swift 6.0.2)
80-
runs-on: ubuntu-22.04
79+
name: Android
80+
runs-on: ubuntu-latest
8181
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
82+
- uses: actions/checkout@v4
83+
- name: "Test Swift Package on Android"
84+
uses: skiptools/swift-android-action@v2

0 commit comments

Comments
 (0)