Skip to content

Commit 95328cd

Browse files
committed
Use workflow dispatch on a android/release tag for now
1 parent 354b20f commit 95328cd

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

.github/workflows/android.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ concurrency:
2323
cancel-in-progress: true
2424

2525
jobs:
26-
build-llm-demo:
27-
name: build-llm-demo
26+
build-aar:
27+
name: build-aar
2828
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
2929
with:
3030
runner: linux.2xlarge
@@ -46,9 +46,38 @@ jobs:
4646
# Build LLM Demo for Android
4747
bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
4848
49+
shasum -a 256 "${ARTIFACTS_DIR_NAME}/llm_demo/executorch.aar"
50+
51+
upload-release-aar:
52+
name: upload-release-aar
53+
needs: build-aar
54+
if: ${{ startsWith(github.ref, 'refs/tags/android/release') }}
55+
runs-on: ubuntu-22.04
56+
timeout-minutes: 10
57+
permissions:
58+
id-token: write
59+
contents: read
60+
steps:
61+
- name: configure aws credentials
62+
uses: aws-actions/[email protected]
63+
with:
64+
role-to-assume: arn:aws:iam::308535385114:role/gha_executorch_upload-frameworks-android
65+
aws-region: us-east-1
66+
- name: Upload AAR to RC if ciflow/android/release tag is present
67+
shell: bash
68+
run: |
69+
wget https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/executorch.aar
70+
shasum -a 256 executorch.aar > executorch.aar.sha256sums
71+
72+
pip install awscli==1.32.18
73+
AWS_CMD="aws s3 cp"
74+
VERSION_NAME="$(date +'%Y%m%d')"
75+
${AWS_CMD} executorch.aar s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar --acl public-read
76+
${AWS_CMD} executorch.aar.sha256sums s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar.sha256sums --acl public-read
77+
4978
# Running Android emulator directly on the runner and not using Docker
5079
run-emulator:
51-
needs: build-llm-demo
80+
needs: build-aar
5281
# NB: Use metal install for KVM support to run the emulator faster
5382
runs-on: linux.24xl.spr-metal
5483
env:

0 commit comments

Comments
 (0)