Skip to content

Android CI: use GH hosted runner#17662

Merged
kirklandsign merged 8 commits intomainfrom
ci/android-gh-runner
Feb 25, 2026
Merged

Android CI: use GH hosted runner#17662
kirklandsign merged 8 commits intomainfrom
ci/android-gh-runner

Conversation

@kirklandsign
Copy link
Copy Markdown
Contributor

@kirklandsign kirklandsign commented Feb 24, 2026

Summary

Replace the pytorch/test-infra reusable workflow + custom Docker image with a direct 16-core-ubuntu GH hosted runner. The Android library build only needs executorch, torch (for headers + torchgen) and pyyaml.

Use the pre-installed Android NDK from the GH runner image instead of a custom Docker image. Update artifact upload/download to use standard GH Actions (upload-artifact/download-artifact) instead of S3.

Test plan

CI

Reduced up to 10 minutes of docker image pull, and unnecessary steps.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Feb 24, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17662

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 25 Pending

As of commit a153bd9 with merge base bce5fa5 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 24, 2026
…le workflow

Replace the pytorch/test-infra reusable workflow + custom Docker image
with a direct ubuntu-latest-32-cores GH hosted runner. The Android
library build only needs torch (for headers + torchgen) and pyyaml,
not the full executorch pip package or a from-source PyTorch build.

Use the pre-installed Android NDK from the GH runner image instead of
a custom Docker image. Update artifact upload/download to use standard
GH Actions (upload-artifact/download-artifact) instead of S3.

Remove the test_llama.sh model export step for now.
@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Download stories110M.pte and tokenizer from ossci-android S3 bucket
instead of exporting from scratch during the build step. This removes
the dependency on torchao, pyyaml, pytorch-tokenizers, hydra-core, and
omegaconf from the CI workflow.
@kirklandsign kirklandsign marked this pull request as ready for review February 25, 2026 22:20
Copilot AI review requested due to automatic review settings February 25, 2026 22:20
Remove unnecessary steps from the emulator job: conda setup (no Python
needed), install_android.sh (GH runner has Android SDK pre-installed),
and Gradle cache (no Gradle invoked). Also drop the hardcoded
ANDROID_HOME in favor of the runner default.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request modernizes the Android CI workflow by replacing the custom Docker image and pytorch/test-infra reusable workflow with a direct GitHub-hosted runner approach. The changes aim to reduce CI overhead by eliminating Docker image pull time (up to 10 minutes) and unnecessary build steps.

Changes:

  • Migrated from custom Docker + reusable workflow to 16-core-ubuntu GitHub-hosted runner with pre-installed Android NDK
  • Replaced S3-based artifact storage with standard GitHub Actions (upload-artifact/download-artifact v4)
  • Simplified test setup by downloading pre-built model artifacts instead of building them locally

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/_android.yml Refactored to use GitHub-hosted runner directly with simplified build steps, removed Docker and S3 dependencies
extension/android/executorch_android/android_test_setup.sh Removed prepare_add function and simplified prepare_tinyllama to download pre-built artifacts from S3
extension/android/executorch_android/src/androidTest/java/org/pytorch/executorch/ModuleInstrumentationTest.kt Updated test file reference from ModuleAdd.pte to mobilenet_v2.pte to align with new test setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/_android.yml
Comment thread .github/workflows/_android.yml
Comment thread .github/workflows/_android.yml
@kirklandsign kirklandsign merged commit 8c5471b into main Feb 25, 2026
150 of 151 checks passed
@kirklandsign kirklandsign deleted the ci/android-gh-runner branch February 25, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants