Skip to content

Commit 2891496

Browse files
marcpruxmbrandonw
andauthored
Simplify Android CI with shared action (#53)
Co-authored-by: Brandon Williams <[email protected]>
1 parent 5a38253 commit 2891496

File tree

1 file changed

+2
-37
lines changed

1 file changed

+2
-37
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -75,40 +75,5 @@ jobs:
7575
steps:
7676
- name: Checkout Repository
7777
uses: actions/checkout@v4
78-
- name: Install Swift
79-
uses: tayloraswift/swift-install-action@master
80-
with:
81-
swift-prefix: swift-6.0.2-release/ubuntu2204/swift-6.0.2-RELEASE
82-
swift-id: swift-6.0.2-RELEASE-ubuntu22.04
83-
- name: Check Swift
84-
run: swift --version
85-
- name: Install Android SDK
86-
run:
87-
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
88-
- name: Check Android SDK
89-
run:
90-
swift sdk configure --show-configuration swift-6.0.2-RELEASE-android-24-0.1 x86_64-unknown-linux-android24
91-
- name: Build Tests
92-
run:
93-
swift build --build-tests --swift-sdk x86_64-unknown-linux-android24 -Xswiftc -Xclang-linker -Xswiftc -fuse-ld=lld
94-
- name: Prepare Android Emulator Test Script
95-
run: |
96-
mkdir pack
97-
cp .build/x86_64-unknown-linux-android24/debug/swift-concurrency-extrasPackageTests.xctest pack
98-
99-
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
100-
rm pack/lib{c,dl,log,m,z}.so
101-
102-
set -x
103-
cat > ~/test-toolchain.sh << EOF
104-
adb push pack /data/local/tmp
105-
adb shell /data/local/tmp/pack/swift-concurrency-extrasPackageTests.xctest
106-
EOF
107-
108-
chmod +x ~/test-toolchain.sh
109-
- name: Run Tests on Android Emulator
110-
uses: reactivecircus/android-emulator-runner@v2
111-
with:
112-
api-level: 29
113-
arch: x86_64
114-
script: ~/test-toolchain.sh
78+
- name: Run Android Tests
79+
uses: skiptools/swift-android-action@v2

0 commit comments

Comments
 (0)