-
Notifications
You must be signed in to change notification settings - Fork 32
Android support #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Android support #106
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3626724
Add android-build
marcprux 656b989
Add Android input options
marcprux be91e12
Fix inputs.android_test_env pass-through to test-env; fix default cha…
marcprux acd2823
Merge branch 'swiftlang:main' into main
marcprux d245c4f
Merge branch 'swiftlang:main' into main
marcprux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,6 +147,42 @@ on: | |
| type: boolean | ||
| description: "Boolean to enable running build in windows docker container. Defaults to true" | ||
| default: true | ||
| enable_android_checks: | ||
| type: boolean | ||
| description: "Boolean to enable android testing. Defaults to false" | ||
| default: false | ||
| android_copy_files: | ||
| type: string | ||
| description: "Additional files to copy to the Android emulator for testing" | ||
| default: "" | ||
| android_cores: | ||
| type: number | ||
| description: "Number of cores to use for the Android emulator" | ||
| default: 2 | ||
| android_api_level: | ||
| type: number | ||
| description: "The API level of the Android emulator" | ||
| default: 30 | ||
| android_channel: | ||
| type: string | ||
| description: "Android channel to download the SDK components from - stable, beta, dev, canary" | ||
| default: "canary" | ||
| android_profile: | ||
| type: string | ||
| description: "Android emulator hardware profile used for creating the AVD" | ||
| default: "pixel" | ||
| android_target: | ||
| type: string | ||
| description: "Target of the Android system image" | ||
| default: "aosp_atd" | ||
| android_test_env: | ||
| type: string | ||
| description: "Android emulator test environment variables key=value" | ||
| default: "" | ||
| android_exclude_swift_versions: | ||
| type: string | ||
| description: "Exclude Android Swift version list (JSON)" | ||
| default: "[{\"swift_version\": \"\"}]" | ||
| needs_token: | ||
| type: boolean | ||
| description: "Boolean to enable providing the GITHUB_TOKEN to downstream job." | ||
|
|
@@ -508,3 +544,34 @@ jobs: | |
| Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | ||
| RefreshEnv | ||
| powershell.exe -NoLogo -File $env:TEMP\test-script\run.ps1; exit $LastExitCode | ||
|
|
||
| android-build: | ||
| name: Android (${{ matrix.swift_version }}) | ||
| if: ${{ inputs.enable_android_checks }} | ||
| runs-on: 'ubuntu-24.04' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| swift_version: ['nightly-6.1'] | ||
| exclude: | ||
| - ${{ fromJson(inputs.android_exclude_swift_versions) }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Provide token | ||
| if: ${{ inputs.needs_token }} | ||
| run: | | ||
| echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | ||
| - name: Build / Test | ||
| uses: skiptools/swift-android-action@v2 | ||
|
Comment on lines
+565
to
+566
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We currently don't support running actions outside |
||
| with: | ||
| swift-version: ${{ matrix.swift_version }} | ||
| swift-build-flags: ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }} | ||
| copy-files: ${{ inputs.android_copy_files }} | ||
| test-env: ${{ inputs.android_test_env }} | ||
| android-cores: ${{ inputs.android_cores }} | ||
| android-api-level: ${{ inputs.android_api_level }} | ||
| android-channel: ${{ inputs.android_channel }} | ||
| android-profile: ${{ inputs.android_profile }} | ||
| android-target: ${{ inputs.android_target }} | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.