Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 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
13 changes: 13 additions & 0 deletions .github/workflows/android-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,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
Copy link
Contributor

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

    if: ${{ !github.event.pull_request.head.repo.fork }}
    secrets: inherit

runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-clang12-android
submodules: 'true'
Expand All @@ -52,6 +55,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
Copy link
Contributor

Choose a reason for hiding this comment

The 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 gradle.properties before the build?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Expand Down
2 changes: 1 addition & 1 deletion extension/android/executorch_android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT)
signAllPublications()

coordinates("org.pytorch", "executorch-android", "0.5.0-SNAPSHOT")
coordinates("org.pytorch", "executorch-android", "0.6.0-rc1")

pom {
name = "ExecuTorch Android"
Expand Down
1 change: 1 addition & 0 deletions scripts/build_android_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ build_aar() {
find . -type f -name "*.so" -exec "$ANDROID_NDK"/toolchains/llvm/prebuilt/*/bin/llvm-strip {} \;
fi
ANDROID_HOME="${ANDROID_SDK:-/opt/android/sdk}" ./gradlew build
ANDROID_HOME="${ANDROID_SDK:-/opt/android/sdk}" ./gradlew :executorch_android:publishToMavenCentral
cp executorch_android/build/outputs/aar/executorch_android-debug.aar executorch.aar
popd
}
Expand Down
Loading