@@ -140,6 +140,7 @@ jobs:
140140 submodules : ' true'
141141 timeout : 60
142142 upload-artifact : android-models
143+ upload-artifact-to-s3 : true
143144 script : |
144145 # The generic Linux job chooses to use base env, not the one setup by the image
145146 echo "::group::Setting up dev environment"
@@ -175,35 +176,6 @@ jobs:
175176 fi
176177 echo "::endgroup::"
177178
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-
207179 build-llm-demo :
208180 name : build-llm-demo
209181 uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
@@ -215,6 +187,7 @@ jobs:
215187 ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
216188 timeout : 90
217189 upload-artifact : android-apps
190+ upload-artifact-to-s3 : true
218191 script : |
219192 set -eux
220193
@@ -230,34 +203,6 @@ jobs:
230203 export ANDROID_ABIS="arm64-v8a"
231204 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}
232205
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-
261206 # Let's see how expensive this job is, we might want to tone it down by running it periodically
262207 benchmark-on-device :
263208 permissions :
@@ -266,8 +211,8 @@ jobs:
266211 uses : pytorch/test-infra/.github/workflows/mobile_job.yml@main
267212 needs :
268213 - set-parameters
269- - upload-models
270- - upload-android-apps
214+ - build-llm-demo
215+ - export-models
271216 strategy :
272217 matrix :
273218 model : ${{ fromJson(needs.set-parameters.outputs.models) }}
@@ -285,9 +230,9 @@ jobs:
285230 # Unlike models there are limited numbers of build flavor for apps, and the model controls whether it should build with bpe/tiktoken tokenizer.
286231 # 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
287232 # 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
290235 # NB: Need to set the default spec here so that it works for periodic too
291236 test-spec : ${{ inputs.test_spec || 'https://ossci-android.s3.amazonaws.com/executorch/android-llm-device-farm-test-spec.yml' }}
292237 # 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