Native Publish PyTorch #80
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Native Publish PyTorch | |
on: | |
workflow_dispatch: | |
inputs: | |
mode: | |
description: 'staging/snapshot, default is snapshot' | |
required: true | |
default: 'snapshot' | |
package_type: | |
description: 'cpu/gpu, default is gpu' | |
required: true | |
default: 'cpu' | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
# Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Download native binaries | |
run: ./gradlew :engines:pytorch:pytorch-native:dPTNL -Ppackage_type=${{ inputs.package_type }} | |
- name: Publish to snapshot/staging repository | |
working-directory: engines/pytorch/pytorch-native | |
run: ./gradlew publish -P${{ github.event.inputs.mode }} | |
env: | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }} | |
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_ossrhUsername }} | |
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_ossrhPassword }} |