Skip to content

Commit c854cbb

Browse files
committed
Add android-channel, android-profile, android-target, and android-cores inputs
1 parent 8fedcc5 commit c854cbb

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ jobs:
6363
swift-version: 6.0.3
6464
```
6565

66+
### Swift Versions
67+
68+
The `swift-version` input can be set to a specific version number (e.g., "6.0.3" or "6.1.1").
69+
A shortened version like "6.0" or "6.1" will use the latest [release](https://github.com/skiptools/swift-android-toolchain/releases),
70+
which may be a pre-release build.
71+
72+
Snapshots can be specified with their full name, like "6.1-DEVELOPMENT-SNAPSHOT-2025-03-07-a".
73+
74+
6675
### Configuration Options
6776

6877
| Parameter | Description | Default |
@@ -79,6 +88,10 @@ jobs:
7988
| copy-files | Additional files to copy to emulator for testing | |
8089
| android-emulator-test-folder | Emulator folder where tests are copied and run | /data/local/tmp/android-xctest |
8190
| android-api-level | The API level of the Android emulator to run against | 29 |
91+
| android-channel | Channel to download the SDK components from - stable, beta, dev, canary | canary |
92+
| android-profile | Hardware profile used for creating the AVD | pixel |
93+
| android-target | Target of the system image - default, google_apis, playstore, android-wear, android-wear-cn, android-tv, google-tv, aosp_atd or google_atd | aosp_atd |
94+
| android-cores | Number of cores to use for the emulator | 2 |
8295
| android-emulator-options | Options to pass to the Android emulator | -no-window … |
8396
| android-emulator-boot-timeout | Emulator boot timeout in seconds | 600 |
8497

action.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,26 @@ inputs:
7070
description: 'Additional files to copy to emulator for testing'
7171
required: true
7272
default: ''
73+
android-cores:
74+
description: 'Number of cores to use for the emulator'
75+
required: true
76+
default: 2
7377
android-api-level:
7478
description: 'The API level of the Android emulator to run against'
7579
required: true
7680
default: 29
81+
android-channel:
82+
required: false
83+
type: string
84+
default: 'canary'
85+
android-profile:
86+
required: false
87+
type: string
88+
default: 'pixel'
89+
android-target:
90+
required: false
91+
type: string
92+
default: 'aosp_atd'
7793

7894
runs:
7995
using: "composite"
@@ -369,14 +385,18 @@ runs:
369385
path: |
370386
~/.android/avd/*
371387
~/.android/adb*
372-
key: avd-${{ inputs.android-api-level }}-${{ steps.setup.outputs.android-emulator-arch }}
388+
key: 'avd-${{ inputs.android-profile }}_${{ inputs.android-channel }}_${{ inputs.android-target }}_${{ inputs.android-api-level }}-${{ steps.setup.outputs.android-emulator-arch }}'
373389

374390
- name: Create Android Emulator Cache
375391
if: ${{ inputs.run-tests == 'true' && inputs.build-tests == 'true' && inputs.build-package == 'true' && steps.avd-cache.outputs.cache-hit != 'true' }}
376392
uses: reactivecircus/android-emulator-runner@v2
377393
with:
378394
force-avd-creation: false
379395
api-level: ${{ inputs.android-api-level }}
396+
target: ${{ inputs.android-target }}
397+
channel: ${{ inputs.android-channel }}
398+
profile: ${{ inputs.android-profile }}
399+
cores: ${{ inputs.android-cores }}
380400
emulator-boot-timeout: ${{ inputs.android-emulator-boot-timeout }}
381401
emulator-options: ${{ inputs.android-emulator-options }}
382402
arch: ${{ steps.setup.outputs.android-emulator-arch }}
@@ -390,6 +410,10 @@ runs:
390410
with:
391411
force-avd-creation: false
392412
api-level: ${{ inputs.android-api-level }}
413+
target: ${{ inputs.android-target }}
414+
channel: ${{ inputs.android-channel }}
415+
profile: ${{ inputs.android-profile }}
416+
cores: ${{ inputs.android-cores }}
393417
emulator-boot-timeout: ${{ inputs.android-emulator-boot-timeout }}
394418
emulator-options: -no-snapshot-save ${{ inputs.android-emulator-options }}
395419
arch: ${{ steps.setup.outputs.android-emulator-arch }}

0 commit comments

Comments
 (0)