Skip to content

Commit 7600f21

Browse files
authored
Run ExecuTorchDemo test suite on AWS Device Farm
Differential Revision: D61826982 Pull Request resolved: #4918
1 parent 3f77078 commit 7600f21

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

.github/workflows/apple.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ concurrency:
2525
cancel-in-progress: true
2626

2727
jobs:
28-
test-demo-ios:
28+
build-demo-ios:
2929
name: test-demo-ios
3030
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
3131
secrets: inherit
@@ -58,6 +58,57 @@ jobs:
5858
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
5959
build/test_ios_ci.sh ${ARTIFACTS_DIR_NAME}
6060
61+
# Upload the test demo app to S3
62+
upload-demo-ios:
63+
needs: build-demo-ios
64+
runs-on: linux.2xlarge
65+
steps:
66+
- name: Download the artifacts from GitHub
67+
uses: actions/download-artifact@v3
68+
with:
69+
# The name here needs to match the name of the upload-artifact parameter
70+
name: ios-apps
71+
path: ${{ runner.temp }}/artifacts/
72+
73+
- name: Verify the artifacts
74+
shell: bash
75+
working-directory: ${{ runner.temp }}/artifacts/
76+
run: |
77+
ls -lah ./
78+
79+
- name: Upload the artifacts to S3
80+
uses: seemethere/upload-artifact-s3@v5
81+
with:
82+
s3-bucket: gha-artifacts
83+
s3-prefix: |
84+
${{ github.repository }}/${{ github.run_id }}/artifact
85+
retention-days: 14
86+
if-no-files-found: ignore
87+
path: ${{ runner.temp }}/artifacts/
88+
89+
test-demo-ios:
90+
# Only PR from ExecuTorch itself has permission to access AWS, forked PRs will fail to
91+
# authenticate with the cloud service. So, this job will be skipped on the latter
92+
if: ${{ !github.event.pull_request.head.repo.fork }}
93+
needs: upload-demo-ios
94+
permissions:
95+
id-token: write
96+
contents: read
97+
uses: pytorch/test-infra/.github/workflows/mobile_job.yml@main
98+
with:
99+
device-type: ios
100+
# For iOS testing, the runner just needs to call AWS Device Farm, so there is no need to run this on macOS
101+
runner: linux.2xlarge
102+
test-infra-ref: ''
103+
# This is the ARN of ExecuTorch project on AWS
104+
project-arn: arn:aws:devicefarm:us-west-2:308535385114:project:02a2cf0f-6d9b-45ee-ba1a-a086587469e6
105+
# This is the custom device pool that only includes iOS devices
106+
device-pool-arn: arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/3b5acd2e-92e2-4778-b651-7726bafe129d
107+
# Uploaded to S3 from the previous job
108+
ios-ipa-archive: https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact/ExecuTorchDemo.ipa
109+
ios-xctestrun-zip: https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact/ExecuTorchDemo.xctestrun.zip
110+
test-spec: https://ossci-ios.s3.amazonaws.com/executorch/default-ios-device-farm-appium-test-spec.yml
111+
61112
build-frameworks-ios:
62113
name: build-frameworks-ios
63114
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main

0 commit comments

Comments
 (0)