Skip to content

Commit 2e26149

Browse files
committed
Fix run-tests.sh script
1 parent ea4dd44 commit 2e26149

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,6 @@ jobs:
6969
ANDROID_CHANNEL: "3"
7070
ANDROID_NDK_VERSION: "${{ matrix.NDK_VERSION }}"
7171
steps:
72-
- name: Create run-tests script
73-
run: |
74-
cat > run-tests.sh << "EOF"
75-
#!/bin/bash -ex
76-
ORG=$(echo "${1}" | cut -f '/' -d 1)
77-
PACKAGE=$(echo "${1}" | cut -f '/' -d 2)
78-
79-
git clone https://github.com/${ORG}/${PACKAGE}
80-
cd ${PACKAGE}
81-
82-
swiftly run swift build --swift-sdk "${ANDROID_EMULATOR_ARCH_TRIPLE}-unknown-linux-android${ANDROID_API}" --build-tests
83-
84-
adb push .build/debug/${PACKAGE}PackageTests.xctest /data/local/tmp
85-
adb shell /data/local/tmp/${PACKAGE}PackageTests.xctest
86-
EOF
87-
88-
chmod +x run-tests.sh
89-
cat run-tests.sh
9072
- name: Free Disk Space
9173
if: runner.os == 'Linux'
9274
run: |
@@ -236,6 +218,24 @@ jobs:
236218
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/
237219
cd -
238220
221+
- name: Create run-tests script
222+
run: |
223+
cat > run-tests.sh << "EOF"
224+
#!/bin/bash -ex
225+
ORG=$(echo "${1}" | cut -d '/' -f 1)
226+
PACKAGE=$(echo "${1}" | cut -d '/' -f 2)
227+
228+
git clone https://github.com/${ORG}/${PACKAGE}
229+
cd ${PACKAGE}
230+
231+
swiftly run swift build --swift-sdk "${ANDROID_EMULATOR_ARCH_TRIPLE}-unknown-linux-android${ANDROID_API}" --build-tests
232+
233+
adb push .build/debug/${PACKAGE}PackageTests.xctest /data/local/tmp
234+
adb shell /data/local/tmp/${PACKAGE}PackageTests.xctest
235+
EOF
236+
237+
chmod +x run-tests.sh
238+
cat run-tests.sh
239239
240240
- name: Run swift-algorithms tests
241241
run: ./run-tests.sh apple/swift-algorithms

0 commit comments

Comments
 (0)