Skip to content

Commit fe07b7f

Browse files
committed
New workflow
1 parent 354b20f commit fe07b7f

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Android Release Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
build-aar:
12+
name: build-aar
13+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
14+
with:
15+
runner: linux.2xlarge
16+
docker-image: executorch-ubuntu-22.04-clang12-android
17+
submodules: 'true'
18+
ref: ${{ github.sha }}
19+
timeout: 90
20+
upload-artifact: android-apps
21+
upload-artifact-to-s3: true
22+
script: |
23+
set -eux
24+
25+
# The generic Linux job chooses to use base env, not the one setup by the image
26+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
27+
conda activate "${CONDA_ENV}"
28+
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh buck2
29+
export ARTIFACTS_DIR_NAME=artifacts-to-be-uploaded
30+
31+
# Build LLM Demo for Android
32+
bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
33+
34+
shasum -a 256 "${ARTIFACTS_DIR_NAME}/llm_demo/executorch.aar"
35+
36+
upload-release-aar:
37+
name: upload-release-aar
38+
needs: build-aar
39+
runs-on: ubuntu-22.04
40+
timeout-minutes: 10
41+
permissions:
42+
id-token: write
43+
contents: read
44+
steps:
45+
- name: configure aws credentials
46+
uses: aws-actions/[email protected]
47+
with:
48+
role-to-assume: arn:aws:iam::308535385114:role/gha_executorch_upload-frameworks-android
49+
aws-region: us-east-1
50+
- name: Upload AAR to RC
51+
shell: bash
52+
run: |
53+
wget https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/executorch.aar
54+
shasum -a 256 executorch.aar > executorch.aar.sha256sums
55+
56+
pip install awscli==1.32.18
57+
AWS_CMD="aws s3 cp"
58+
VERSION_NAME="$(date +'%Y%m%d')"
59+
${AWS_CMD} executorch.aar s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar --acl public-read
60+
${AWS_CMD} executorch.aar.sha256sums s3://ossci-android/executorch/release/${VERSION_NAME}/executorch.aar.sha256sums --acl public-read

.github/workflows/android.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
export ARTIFACTS_DIR_NAME=artifacts-to-be-uploaded
4545
4646
# Build LLM Demo for Android
47-
bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
47+
# bash build/build_android_llm_demo.sh ${ARTIFACTS_DIR_NAME}
48+
mkdir -p "${ARTIFACTS_DIR_NAME}/llm_demo"
49+
touch "${ARTIFACTS_DIR_NAME}/llm_demo/executorch.aar"
4850
4951
# Running Android emulator directly on the runner and not using Docker
5052
run-emulator:

0 commit comments

Comments
 (0)