Android CI: use GH hosted runner#17662
Conversation
🔗 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 PendingAs of commit a153bd9 with merge base bce5fa5 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…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.
906c882 to
621e1ca
Compare
This PR needs a
|
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.
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.
There was a problem hiding this comment.
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.
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.