Skip to content

Commit 4c362e5

Browse files
committed
Add more input options
1 parent c8d8abe commit 4c362e5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ inputs:
99
description: 'The folder where the swift package is checked out'
1010
required: true
1111
default: '.'
12+
swift-build-flags:
13+
description: 'Additional flags to pass to the swift build command'
14+
required: false
15+
default: ''
16+
inputs.android-emulator-options:
17+
description: 'Additional options to pass to the Android emulator'
18+
required: false
19+
default: ''
1220
run-tests:
1321
description: 'Whether to run the tests or just the build'
1422
required: true
@@ -29,14 +37,15 @@ runs:
2937
run: brew install skiptools/skip/skip swift-android-sdk/toolchain/swift-android-sdk@${{ inputs.swift-version }}
3038
shell: bash
3139
- name: Build Swift package for Android
32-
run: skip android build --build-tests --package-path ${{ inputs.package-path }}
40+
run: skip android build --build-tests --package-path ${{ inputs.package-path }} ${{ inputs.swift-build-flags }}
3341
shell: bash
3442
- name: Run Swift tests on Android emulator
3543
if: ${{ inputs.run-tests == 'true' }}
3644
uses: reactivecircus/android-emulator-runner@v2
3745
with:
3846
api-level: ${{ inputs.android-api-level }}
47+
emulator-options: ${{ inputs.android-emulator-options }}
3948
arch: x86_64
4049
script: |
41-
skip android test --package-path ${{ inputs.package-path }}
50+
skip android test --package-path ${{ inputs.package-path }} ${{ inputs.swift-build-flags }}
4251

0 commit comments

Comments
 (0)