Skip to content

Commit 7c0a1c6

Browse files
committed
Check for newer Android SDK
1 parent e01682a commit 7c0a1c6

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -218,27 +218,30 @@ jobs:
218218
adb push swift-sdks/${SWIFT_ANDROID_SDK_VERSION}*.artifactbundle/swift-android/swift-resources/usr/lib/swift-${ANDROID_EMULATOR_ARCH_TRIPLE}/android/*.so /data/local/tmp/
219219
cd -
220220
221-
- name: Run swift-algorithms tests on Android Emulator
221+
- name: Create run-tests script
222222
run: |
223-
git clone https://github.com/apple/swift-algorithms
224-
cd swift-algorithms
223+
echo > run-tests.sh << EOF
224+
#!/bin/sh -ex
225+
ORG=$(echo $1 | cut -f '/' -d 1)
226+
PACKAGE=$(echo $1 | cut -f '/' -d 2)
227+
228+
git clone https://github.com/${ORG}/${PACKAGE}
229+
cd ${PACKAGE}
230+
225231
swift build --swift-sdk "${ANDROID_EMULATOR_ARCH_TRIPLE}-unknown-linux-android${ANDROID_API}" --build-tests
226-
adb push .build/debug/swift-algorithmsPackageTests.xctest /data/local/tmp
227-
adb shell /data/local/tmp/swift-algorithmsPackageTests.xctest
228232
229-
- name: run swift-crypto tests on android emulator
230-
run: |
231-
git clone https://github.com/apple/swift-crypto
232-
cd swift-crypto
233-
swift build --swift-sdk "${android_emulator_arch_triple}-unknown-linux-android${android_api}" --build-tests
234-
adb push .build/debug/swift-cryptoPackageTests.xctest /data/local/tmp
235-
adb shell /data/local/tmp/swift-cryptoPackageTests.xctest
233+
adb push .build/debug/${PACKAGE}PackageTests.xctest /data/local/tmp
234+
adb shell /data/local/tmp/${PACKAGE}PackageTests.xctest
235+
EOF
236236
237-
- name: run swift-argument-parser tests on android emulator
238-
run: |
239-
git clone https://github.com/apple/swift-argument-parser
240-
cd swift-argument-parser
241-
swift build --swift-sdk "${android_emulator_arch_triple}-unknown-linux-android${android_api}" --build-tests
242-
adb push .build/debug/swift-argument-parserPackageTests.xctest /data/local/tmp
243-
adb shell /data/local/tmp/swift-argument-parserPackageTests.xctest
237+
chmod +x run-tests.sh
238+
239+
- name: Run swift-algorithms tests
240+
run: ./run-tests.sh apple/swift-algorithms
241+
242+
- name: Run swift-crypto tests
243+
run: ./run-tests.sh apple/swift-crypto
244+
245+
- name: Run swift-argument-parser tests
246+
run: ./run-tests.sh apple/swift-argument-parser
244247

0 commit comments

Comments
 (0)