@@ -140,6 +140,7 @@ jobs:
140
140
submodules : ' true'
141
141
timeout : 60
142
142
upload-artifact : android-models
143
+ upload-artifact-to-s3 : true
143
144
script : |
144
145
# The generic Linux job chooses to use base env, not the one setup by the image
145
146
echo "::group::Setting up dev environment"
@@ -175,35 +176,6 @@ jobs:
175
176
fi
176
177
echo "::endgroup::"
177
178
178
- # Upload models to S3. The artifacts are needed not only by the device farm but also TorchChat
179
- upload-models :
180
- needs : export-models
181
- runs-on : linux.2xlarge
182
- if : always() # Continue this job regardless of previous job outcome
183
- steps :
184
- - name : Download the models from GitHub
185
- uses : actions/download-artifact@v3
186
- with :
187
- # The name here needs to match the name of the upload-artifact parameter
188
- name : android-models
189
- path : ${{ runner.temp }}/artifacts/
190
-
191
- - name : Verify the models
192
- shell : bash
193
- working-directory : ${{ runner.temp }}/artifacts/
194
- run : |
195
- ls -lah ./
196
-
197
- - name : Upload the models to S3
198
- uses : seemethere/upload-artifact-s3@v5
199
- with :
200
- s3-bucket : gha-artifacts
201
- s3-prefix : |
202
- ${{ github.repository }}/${{ github.run_id }}/artifact
203
- retention-days : 1
204
- if-no-files-found : ignore
205
- path : ${{ runner.temp }}/artifacts/
206
-
207
179
build-llm-demo :
208
180
name : build-llm-demo
209
181
uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
@@ -215,6 +187,7 @@ jobs:
215
187
ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
216
188
timeout : 90
217
189
upload-artifact : android-apps
190
+ upload-artifact-to-s3 : true
218
191
script : |
219
192
set -eux
220
193
@@ -230,34 +203,6 @@ jobs:
230
203
export ANDROID_ABIS="arm64-v8a"
231
204
PYTHON_EXECUTABLE=python EXECUTORCH_BUILD_QNN=ON QNN_SDK_ROOT=/tmp/qnn/2.25.0.240728 bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
232
205
233
- # Upload artifacts to S3. The artifacts are needed not only by the device farm but also TorchChat
234
- upload-android-apps :
235
- needs : build-llm-demo
236
- runs-on : linux.2xlarge
237
- steps :
238
- - name : Download the apps from GitHub
239
- uses : actions/download-artifact@v3
240
- with :
241
- # The name here needs to match the name of the upload-artifact parameter
242
- name : android-apps
243
- path : ${{ runner.temp }}/artifacts/
244
-
245
- - name : Verify the apps
246
- shell : bash
247
- working-directory : ${{ runner.temp }}/artifacts/
248
- run : |
249
- ls -lah ./
250
-
251
- - name : Upload the apps to S3
252
- uses : seemethere/upload-artifact-s3@v5
253
- with :
254
- s3-bucket : gha-artifacts
255
- s3-prefix : |
256
- ${{ github.repository }}/${{ github.run_id }}/artifact
257
- retention-days : 14
258
- if-no-files-found : ignore
259
- path : ${{ runner.temp }}/artifacts/
260
-
261
206
# Let's see how expensive this job is, we might want to tone it down by running it periodically
262
207
benchmark-on-device :
263
208
permissions :
@@ -266,8 +211,8 @@ jobs:
266
211
uses : pytorch/test-infra/.github/workflows/mobile_job.yml@main
267
212
needs :
268
213
- set-parameters
269
- - upload-models
270
- - upload-android-apps
214
+ - build-llm-demo
215
+ - export-models
271
216
strategy :
272
217
matrix :
273
218
model : ${{ fromJson(needs.set-parameters.outputs.models) }}
@@ -285,9 +230,9 @@ jobs:
285
230
# Unlike models there are limited numbers of build flavor for apps, and the model controls whether it should build with bpe/tiktoken tokenizer.
286
231
# It's okay to build all possible apps with all possible flavors in job "build-llm-demo". However, in this job, once a model is given, there is only
287
232
# one app+flavor that could load and run the model.
288
- android-app-archive : https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact /minibench/app-debug.apk
289
- android-test-archive : https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact /minibench/app-debug-androidTest.apk
233
+ android-app-archive : https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts /minibench/app-debug.apk
234
+ android-test-archive : https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts /minibench/app-debug-androidTest.apk
290
235
# NB: Need to set the default spec here so that it works for periodic too
291
236
test-spec : ${{ inputs.test_spec || 'https://ossci-android.s3.amazonaws.com/executorch/android-llm-device-farm-test-spec.yml' }}
292
237
# Uploaded to S3 from the previous job
293
- extra-data : https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact /${{ matrix.model }}_${{ matrix.delegate }}/model.zip
238
+ extra-data : https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts /${{ matrix.model }}_${{ matrix.delegate }}/model.zip
0 commit comments