Skip to content

Commit 500019a

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
android-release-artifact only trigger if AAR doesn't exist (#6248)
Summary: Pull Request resolved: #6248 Test Plan: attempt 1, https://github.com/pytorch/executorch/actions/runs/11356171402, passed. attempt 2 https://github.com/pytorch/executorch/actions/runs/11356452635, correctly stopped. Reviewed By: huydhn Differential Revision: D64440539 Pulled By: kirklandsign fbshipit-source-id: 5fd77e8969d72c67d9e87407d7ca5da7730beb79
1 parent 254bdf9 commit 500019a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/android-release-artifacts.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,24 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
check-if-aar-exists:
17+
name: check-if-aar-exists
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 10
20+
steps:
21+
- name: Check if this RC version is already in S3
22+
shell: bash
23+
run: |
24+
VERSION="${{ inputs.version }}"
25+
if curl -I "https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar" | grep "200 OK"; then
26+
echo "AAR already exists at https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar"
27+
echo "Will skip build/upload"
28+
exit 1
29+
fi
30+
1631
build-aar:
1732
name: build-aar
33+
needs: check-if-aar-exists
1834
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
1935
with:
2036
runner: linux.2xlarge

0 commit comments

Comments
 (0)