Skip to content

Commit 8a33ec8

Browse files
authored
Move the remaining native Linux CI jobs off EC2 (pytorch#22108)
Moves the Linux jobs that write their own steps, so the `linux_job_v3` migration in pytorch#22245 onward does not reach them. `stale.yml` and the two artifact-to-S3 jobs do no ExecuTorch work, so they move to `ubuntu-latest` and assume `role/arc` through OIDC rather than the EC2 instance role they used to inherit. `apple.yml`'s `test-demo-ios` also moves to `ubuntu-latest`. It cannot go to OSDC, since `mobile_job.yml` resolves its actions by relative path, but it does no work locally either — it uploads two archives to AWS Device Farm and polls for the result, and `mobile_job.yml` already authenticates through OIDC. test-infra's own `test_mobile_job.yml` exercises it on `ubuntu-latest`. The two Cadence Xtensa workflows moved to pytorch#22718: hifi4 works on OSDC but vision hits a Cadence licence-key mismatch there, and that should not block these three. Authored with Claude Code. cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani
1 parent deb264e commit 8a33ec8

3 files changed

Lines changed: 31 additions & 5 deletions

File tree

‎.github/workflows/_test_backend.yml‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ jobs:
9090
package-golden-artifacts:
9191
if: ${{ inputs.run-linux && inputs.save-goldens }}
9292
needs: test-backend-linux
93-
runs-on: linux.2xlarge
93+
# Repackaging artifacts needs no ExecuTorch toolchain, so this runs on a
94+
# GitHub-hosted runner rather than moving to OSDC; the S3 upload that used
95+
# to ride on the EC2 instance role assumes role/arc through OIDC instead.
96+
runs-on: ubuntu-latest
97+
permissions:
98+
id-token: write
99+
contents: read
94100
steps:
95101
- name: Download model test artifacts
96102
uses: actions/download-artifact@v4
@@ -124,6 +130,13 @@ jobs:
124130
echo "No golden artifacts found."
125131
fi
126132
133+
- name: Configure AWS credentials
134+
if: ${{ hashFiles('golden_artifacts_*.zip') != '' }}
135+
uses: aws-actions/configure-aws-credentials@v4
136+
with:
137+
role-to-assume: arn:aws:iam::308535385114:role/arc
138+
aws-region: us-east-1
139+
127140
- name: Upload golden artifacts to S3
128141
uses: seemethere/upload-artifact-s3@v5
129142
if: ${{ hashFiles('golden_artifacts_*.zip') != '' }}

‎.github/workflows/apple.yml‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ jobs:
126126
# Upload the test demo app to S3
127127
upload-demo-ios:
128128
needs: build-demo-ios
129-
runs-on: linux.2xlarge
129+
# Moving an artifact from GitHub to S3 needs no ExecuTorch toolchain, so
130+
# this runs on a GitHub-hosted runner rather than moving to OSDC; the upload
131+
# that used to ride on the EC2 instance role assumes role/arc through OIDC.
132+
runs-on: ubuntu-latest
133+
permissions:
134+
id-token: write
135+
contents: read
130136
steps:
131137
- name: Download the artifacts from GitHub
132138
uses: actions/download-artifact@v4
@@ -142,6 +148,12 @@ jobs:
142148
set -eux
143149
ls -lah ./
144150
151+
- name: Configure AWS credentials
152+
uses: aws-actions/configure-aws-credentials@v4
153+
with:
154+
role-to-assume: arn:aws:iam::308535385114:role/arc
155+
aws-region: us-east-1
156+
145157
- name: Upload the artifacts to S3
146158
uses: seemethere/upload-artifact-s3@v5
147159
with:
@@ -163,8 +175,8 @@ jobs:
163175
uses: pytorch/test-infra/.github/workflows/mobile_job.yml@main
164176
with:
165177
device-type: ios
166-
# For iOS testing, the runner just needs to call AWS Device Farm, so there is no need to run this on macOS
167-
runner: linux.2xlarge
178+
# For iOS testing, the runner just needs to call AWS Device Farm, so there is no need to run this on macOS.
179+
runner: ubuntu-latest
168180
test-infra-ref: main
169181
# This is the ARN of ExecuTorch project on AWS
170182
project-arn: arn:aws:devicefarm:us-west-2:308535385114:project:02a2cf0f-6d9b-45ee-ba1a-a086587469e6

‎.github/workflows/stale.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ on:
1414
jobs:
1515
stale:
1616
if: ${{ github.repository == 'pytorch/executorch' }}
17-
runs-on: linux.large
17+
# Pure GitHub API work, so it needs neither an EC2 nor an OSDC runner.
18+
runs-on: ubuntu-latest
1819
permissions:
1920
contents: read
2021
pull-requests: write

0 commit comments

Comments
 (0)