Skip to content

Commit

Permalink
Adding java build and packaging stage to cuda-packaging-pipeline.yml (#…
Browse files Browse the repository at this point in the history
…20812)

### Description
Adding java build/packaging stage to `cuda-packaging-pipeline.yml`



### Motivation and Context
This way we can enable publishing the Java Cuda 12 along with Nuget CUDA
12
  • Loading branch information
jchen351 authored May 27, 2024
1 parent 454fcdd commit b1b8cb0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,35 +144,7 @@ stages:
parameters :
condition : 'succeeded'

- stage: Download_Java_Tools
dependsOn: []
jobs:
- job: Download_Java_Tools
pool:
name: 'onnxruntime-Ubuntu2204-AMD-CPU'
steps:
- checkout: none
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()
- task: CmdLine@2
displayName: Download Java Tools
inputs:
script: |
mkdir -p java-tools
pushd java-tools
wget --tries=3 https://oss.sonatype.org/service/local/repositories/releases/content/org/junit/platform/junit-platform-console-standalone/1.6.2/junit-platform-console-standalone-1.6.2.jar -P ./
wget --tries=3 https://oss.sonatype.org/service/local/repositories/releases/content/com/google/protobuf/protobuf-java/3.21.7/protobuf-java-3.21.7.jar -P ./
popd
workingDirectory: '$(Agent.TempDirectory)'
- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Java Tools Artifact'
inputs:
targetPath: '$(Agent.TempDirectory)/java-tools'
artifact: 'onnxruntime-java-tools'
- template: templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- template: stages/download-java-tools-stage.yml

- template: templates/c-api-cpu.yml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,15 @@ stages:
win_cuda_home: ${{ variables.win_cuda_home }}
DoEsrp: ${{ parameters.DoEsrp }}
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
buildJava: false
buildJava: true
buildNodejs: false
SpecificArtifact: ${{ parameters.SpecificArtifact }}
BuildId: ${{ parameters.BuildId }}

- template: stages/download-java-tools-stage.yml

- template: stages/java-cuda-packaging-stage.yml
parameters:
CudaVersion: ${{ parameters.CudaVersion }}
SpecificArtifact: ${{ parameters.SpecificArtifact }}
BuildId: ${{ parameters.BuildId }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
stages:
- stage: Download_Java_Tools
dependsOn: []
jobs:
- job: Download_Java_Tools
pool:
name: 'onnxruntime-Ubuntu2204-AMD-CPU'
steps:
- checkout: none
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()
- task: CmdLine@2
displayName: Download Java Tools
inputs:
script: |
mkdir -p java-tools
pushd java-tools
wget --tries=3 https://oss.sonatype.org/service/local/repositories/releases/content/org/junit/platform/junit-platform-console-standalone/1.6.2/junit-platform-console-standalone-1.6.2.jar -P ./
wget --tries=3 https://oss.sonatype.org/service/local/repositories/releases/content/com/google/protobuf/protobuf-java/3.21.7/protobuf-java-3.21.7.jar -P ./
popd
workingDirectory: '$(Agent.TempDirectory)'
- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Java Tools Artifact'
inputs:
targetPath: '$(Agent.TempDirectory)/java-tools'
artifact: 'onnxruntime-java-tools'
- template: ../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'

0 comments on commit b1b8cb0

Please sign in to comment.