Skip to content

android-release-artifact only trigger if AAR doesn't exist #6248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/android-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,24 @@ concurrency:
cancel-in-progress: true

jobs:
check-if-aar-exists:
name: check-if-aar-exists
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Check if this RC version is already in S3
shell: bash
run: |
VERSION="${{ inputs.version }}"
if curl -I "https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar" | grep "200 OK"; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we need to verify the checksum here too. If yes, that can only be done after you build the aar archive as part of the linux_job workflow. Let me know if that's the case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AAR checksum is not deterministic because it’s a zip and it contains zip (jar). So not quite actionable here.

echo "AAR already exists at https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar"
echo "Will skip build/upload"
exit 1
fi

build-aar:
name: build-aar
needs: check-if-aar-exists
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.2xlarge
Expand Down
Loading