-
Notifications
You must be signed in to change notification settings - Fork 524
[TEST ONLY] #9787
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
[TEST ONLY] #9787
Changes from all commits
20bf919
a30d118
738d5b2
5f88fbc
a3cb8d1
ca4646e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,10 @@ on: | |
description: Version name to be uploaded for AAR release | ||
required: false | ||
type: string | ||
upload_to_maven: | ||
description: Upload the AAR to maven staging repository | ||
required: false | ||
type: boolean | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
@@ -31,11 +35,14 @@ jobs: | |
build-aar: | ||
name: build-aar | ||
needs: check-if-aar-exists | ||
if: ${{ !github.event.pull_request.head.repo.fork }} | ||
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@release/2.7 | ||
secrets: inherit | ||
permissions: | ||
id-token: write | ||
contents: read | ||
with: | ||
secrets-env: EXECUTORCH_MAVEN_SIGNING_KEYID EXECUTORCH_MAVEN_SIGNING_PASSWORD EXECUTORCH_MAVEN_CENTRAL_PASSWORD EXECUTORCH_MAVEN_CENTRAL_USERNAME EXECUTORCH_MAVEN_SIGNING_GPG_KEY_CONTENTS | ||
runner: linux.2xlarge | ||
docker-image: executorch-ubuntu-22.04-clang12-android | ||
submodules: 'true' | ||
|
@@ -52,6 +59,16 @@ jobs: | |
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool buck2 | ||
export ARTIFACTS_DIR_NAME=artifacts-to-be-uploaded | ||
|
||
mkdir -p ~/.gradle | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious if these secrets can be used after building the aar archive, or do they need to be set in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After the build, before publish in here: https://github.com/pytorch/executorch/pull/9787/files#diff-bb64d4a0ad63db311f02484469ec3e9c1fc264c8fe6c3e190ec962348af963b3R129 This PR is WIP, and will fix afterwards. |
||
touch ~/.gradle/gradle.properties | ||
echo "signing.keyId=${SECRET_EXECUTORCH_MAVEN_SIGNING_KEYID}" >> ~/.gradle/gradle.properties | ||
echo "signing.password=${SECRET_EXECUTORCH_MAVEN_SIGNING_PASSWORD}" >> ~/.gradle/gradle.properties | ||
echo "mavenCentralUsername=${SECRET_EXECUTORCH_MAVEN_CENTRAL_USERNAME}" >> ~/.gradle/gradle.properties | ||
echo "mavenCentralPassword=${SECRET_EXECUTORCH_MAVEN_CENTRAL_PASSWORD}" >> ~/.gradle/gradle.properties | ||
echo "signing.secretKeyRingFile=/tmp/secring.gpg" >> ~/.gradle/gradle.properties | ||
|
||
echo -n "$SECRET_EXECUTORCH_MAVEN_SIGNING_GPG_KEY_CONTENTS" | base64 -d > /tmp/secring.gpg | ||
|
||
# Build AAR Package | ||
mkdir aar-out | ||
export BUILD_AAR_DIR=aar-out | ||
|
@@ -61,6 +78,12 @@ jobs: | |
|
||
shasum -a 256 "${ARTIFACTS_DIR_NAME}/executorch.aar" | ||
|
||
# Publish to maven staging | ||
UPLOAD_TO_MAVEN="${{ inputs.upload_to_maven }}" | ||
if [[ "$UPLOAD_TO_MAVEN" == "true" ]]; then | ||
(cd aar-out; ANDROID_HOME="${ANDROID_SDK:-/opt/android/sdk}" ./gradlew :executorch_android:publishToMavenCentral) | ||
fi | ||
|
||
upload-release-aar: | ||
name: upload-release-aar | ||
needs: build-aar | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably need line 46 and 48 from https://github.com/pytorch/executorch/blob/main/.github/workflows/apple.yml#L46-L48 too