Skip to content

Commit 7fe932f

Browse files
committed
Add test command argument -Xswiftc -plugin-path; fix android-target and android-channel
1 parent 4ddeec1 commit 7fe932f

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Snapshots can be specified with their full name, like "6.1-DEVELOPMENT-SNAPSHOT-
8787
| run-tests | Whether to run the tests or just perform the build | true |
8888
| copy-files | Additional files to copy to emulator for testing | |
8989
| android-emulator-test-folder | Emulator folder where tests are copied | /data/local/tmp/android-xctest |
90-
| android-api-level | The API level of the Android emulator to run against | 29 |
90+
| android-api-level | The API level of the Android emulator to run against | 30 |
9191
| android-channel | SDK component channel: stable, beta, dev, canary | stable |
9292
| android-profile | Hardware profile used for creating the AVD | pixel |
9393
| android-target | Target of the system image | aosp_atd |

action.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ inputs:
7777
android-api-level:
7878
description: 'The API level of the Android emulator to run against'
7979
required: true
80-
default: 29
80+
default: 30
8181
android-channel:
8282
required: false
8383
type: string
@@ -236,11 +236,6 @@ runs:
236236
/usr/sbin/installer -pkg swift.pkg -target CurrentUserHomeDirectory
237237
SWIFT_INSTALLATION=${HOME}/Library/Developer/Toolchains/${{ steps.setup.outputs.swift-id }}.xctoolchain/usr
238238
echo "TOOLCHAINS=$(plutil -extract CFBundleIdentifier raw ${SWIFT_INSTALLATION}/Info.plist)" >> $GITHUB_ENV
239-
240-
# workaround for https://github.com/swiftlang/swift-package-manager/issues/8362
241-
cd ${SWIFT_INSTALLATION}
242-
cp -f lib/swift/host/plugins/testing/libTestingMacros.dylib lib/swift/host/plugins/ || true
243-
cd -
244239
else
245240
echo "::error::Unsupported platform: ${RUNNER_OS}"
246241
exit 1
@@ -302,7 +297,9 @@ runs:
302297
echo "SWIFT_SDK_BUNDLE=${SWIFT_SDK_BUNDLE}" >> $GITHUB_ENV
303298
304299
echo "swiftroot=${SWIFT_INSTALLATION}" >> $GITHUB_OUTPUT
305-
echo "swiftcmd=TARGET_OS_ANDROID=1 SKIP_BRIDGE=1 ${SWIFT_INSTALLATION}/bin/swift build --swift-sdk ${SWIFT_SDK_TARGET} -Xswiftc -DTARGET_OS_ANDROID -Xswiftc -DSKIP_BRIDGE ${{ inputs.swift-build-flags }}" >> $GITHUB_OUTPUT
300+
301+
# plugin-path is a workaround for https://github.com/swiftlang/swift-package-manager/issues/8362
302+
echo "swiftcmd=TARGET_OS_ANDROID=1 SKIP_BRIDGE=1 ${SWIFT_INSTALLATION}/bin/swift build --swift-sdk ${SWIFT_SDK_TARGET} -Xswiftc -plugin-path -Xswiftc ${SWIFT_INSTALLATION}/lib/swift/host/plugins/testing/testing -Xswiftc -DTARGET_OS_ANDROID -Xswiftc -DSKIP_BRIDGE ${{ inputs.swift-build-flags }}" >> $GITHUB_OUTPUT
306303
echo "swift-sdk=${SWIFT_SDK_TARGET}" >> $GITHUB_OUTPUT
307304
308305
- name: Check Swift Version

0 commit comments

Comments
 (0)