Skip to content

Commit

Permalink
Use a separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklandsign committed Sep 24, 2024
1 parent d310a47 commit e7f13e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 34 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/android-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Android Release Artifacts

on:
workflow_dispatch:
inputs:
version:
description: Version name to be uploaded for AAR release
required: false
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -29,10 +34,7 @@ jobs:
export ARTIFACTS_DIR_NAME=artifacts-to-be-uploaded
# Build LLM Demo for Android
# bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
mkdir -p "${ARTIFACTS_DIR_NAME}/llm_demo"
touch "${ARTIFACTS_DIR_NAME}/llm_demo/executorch.aar"
bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
shasum -a 256 "${ARTIFACTS_DIR_NAME}/llm_demo/executorch.aar"
Expand All @@ -50,14 +52,15 @@ jobs:
with:
role-to-assume: arn:aws:iam::308535385114:role/gha_executorch_upload-frameworks-android
aws-region: us-east-1
- name: Upload AAR to RC
- name: Upload AAR RC to AWS S3
shell: bash
run: |
wget https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/executorch.aar
shasum -a 256 executorch.aar > executorch.aar.sha256sums
pip install awscli==1.32.18
AWS_CMD="aws s3 cp"
VERSION_NAME="$(date +'%Y%m%d')"
VERSION="${{ inputs.version }}"
VERSION_NAME="${VERSION:-temp_snapshot}"
${AWS_CMD} executorch.aar s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar --acl public-read
${AWS_CMD} executorch.aar.sha256sums s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar.sha256sums --acl public-read
28 changes: 0 additions & 28 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,6 @@ jobs:
shasum -a 256 "${ARTIFACTS_DIR_NAME}/llm_demo/executorch.aar"
upload-release-aar:
name: upload-release-aar
needs: build-aar
if: ${{ startsWith(github.ref, 'refs/tags/android/release') }}
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
id-token: write
contents: read
steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1.7.0
with:
role-to-assume: arn:aws:iam::308535385114:role/gha_executorch_upload-frameworks-android
aws-region: us-east-1
- name: Upload AAR to RC if ciflow/android/release tag is present
shell: bash
run: |
wget https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/executorch.aar
shasum -a 256 executorch.aar > executorch.aar.sha256sums
pip install awscli==1.32.18
AWS_CMD="aws s3 cp"
VERSION="${{ inputs.version }}"
VERSION_NAME="${VERSION:-temp_snapshot}"
${AWS_CMD} executorch.aar s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar --acl public-read
${AWS_CMD} executorch.aar.sha256sums s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar.sha256sums --acl public-read
# Running Android emulator directly on the runner and not using Docker
run-emulator:
needs: build-aar
Expand Down

0 comments on commit e7f13e7

Please sign in to comment.