Skip to content

Commit d198698

Browse files
authored
make pytorch jni publish in nightly (#1994)
1 parent d3b2b55 commit d198698

3 files changed

+11
-6
lines changed

.github/workflows/native_jni_s3_pytorch_android.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ name: Native JNI S3 PyTorch Android
22

33
on:
44
workflow_dispatch:
5+
schedule:
6+
- cron: '0 6 * * *'
57

68
jobs:
79
build-pytorch-jni-android:
810
runs-on: ubuntu-18.04
911
env:
10-
PYTORCH_VERSION: "1.12.1"
1112
NDK_VERSION: "21.1.6352462"
1213

1314
steps:
@@ -27,6 +28,7 @@ jobs:
2728
- name: build android
2829
run: |
2930
export ANDROID_NDK=${ANDROID_SDK_ROOT}/ndk/${NDK_VERSION}
31+
PYTORCH_VERSION=${PYTORCH_VERSION:-$(cat gradle.properties | awk -F '=' '/pytorch_version/ {print $2}')}
3032
./gradlew :engines:pytorch:pytorch-native:compileAndroidJNI -Ppt_version=${PYTORCH_VERSION}
3133
- name: Configure AWS Credentials
3234
uses: aws-actions/configure-aws-credentials@v1
@@ -36,5 +38,6 @@ jobs:
3638
aws-region: us-east-2
3739
- name: Copy files to S3 with the AWS CLI
3840
run: |
41+
PYTORCH_VERSION=${PYTORCH_VERSION:-$(cat gradle.properties | awk -F '=' '/pytorch_version/ {print $2}')}
3942
aws s3 sync engines/pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch/${PYTORCH_VERSION}/jnilib
4043
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch/${PYTORCH_VERSION}/jnilib*"

.github/workflows/native_s3_pytorch_android.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
run: |
5050
aws s3 cp android_pytorch_tmp/build_android/${{ matrix.format }}_native.zip s3://djl-ai/publish/pytorch/${PYTORCH_VERSION}/android_native/
5151
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch/${PYTORCH_VERSION}/android_native*"
52-
- name: Upload pytorch src
53-
uses: actions/upload-artifact@v3
54-
with:
55-
name: pytorch-src-${{ matrix.format }}
56-
path: android_pytorch_tmp
52+
# - name: Upload pytorch src
53+
# uses: actions/upload-artifact@v3
54+
# with:
55+
# name: pytorch-src-${{ matrix.format }}
56+
# path: android_pytorch_tmp

.github/workflows/publish_android_packages.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Publish Android packages
22

33
on:
4+
schedule:
5+
- cron: '0 9 * * *'
46
workflow_dispatch:
57
inputs:
68
mode:

0 commit comments

Comments
 (0)