Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayan Shaw committed Mar 13, 2024
1 parent 23afa32 commit 8cc3919
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .pipelines/java_packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ stages:
pool: {name: 'onnxruntime-Win-CPU-2022'}

steps:
- task: PowerShell@2
displayName: 'Set version'
inputs:
targetType: 'inline'
script: |
$_OrtExtVersion=(cat version.txt)
echo "##vso[task.setvariable variable=OrtExtVersion;isOutput=true]$_OrtExtVersion"
workingDirectory: '$(Build.SourcesDirectory)'

- script: |
call .\build.bat -DOCOS_BUILD_JAVA=ON
displayName: build the extensions java package
Expand All @@ -25,7 +34,7 @@ stages:

- script: |
cd $(Build.ArtifactStagingDirectory)
jar xvf onnxruntime-extensions-$(cat version.txt).jar
jar xvf onnxruntime-extensions-$(OrtExtVersion).jar
tree $(Build.ArtifactStagingDirectory) /f
displayName: Unpack JAR to sign DLL
Expand All @@ -48,6 +57,9 @@ stages:
condition: always()

- job: Linux_CPU_Java_Packaging
dependsOn: Windows_CPU_Java_Packaging
variables:
ortVersion: $[ dependencies.Windows_CPU_Java_Packaging.outputs['OrtExtVersion'] ]
workspace:
clean: all
pool: {name: 'Azure-Pipelines-EO-Ubuntu-2004-aiinfra'}
Expand All @@ -65,7 +77,7 @@ stages:

- script: |
cd $(Build.ArtifactStagingDirectory)
jar xvf onnxruntime-extensions-$(cat version.txt).jar
jar xvf onnxruntime-extensions-$(ortVersion).jar
tree $(Build.ArtifactStagingDirectory) /f
displayName: Unpack JAR
Expand All @@ -85,6 +97,8 @@ stages:
dependsOn:
- Windows_CPU_Java_Packaging
- Linux_CPU_Java_Packaging
variables:
ortVersion: $[ dependencies.Windows_CPU_Java_Packaging.outputs['OrtExtVersion'] ]
workspace:
clean: all
pool:
Expand All @@ -103,7 +117,7 @@ stages:

- script: |
cd $(Build.ArtifactStagingDirectory)
jar xvf onnxruntime-extensions-$(cat version.txt).jar
jar xvf onnxruntime-extensions-$(ortVersion).jar
displayName: Unpack JAR to view contents
- task: DownloadPipelineArtifact@0
Expand All @@ -125,8 +139,8 @@ stages:
- script: |
cd $(Build.ArtifactStagingDirectory)
rm onnxruntime-extensions-$(cat version.txt).jar
jar cmf0 META-INF/MANIFEST.MF onnxruntime-extensions-$(cat version.txt).jar *
rm onnxruntime-extensions-$(ortVersion).jar
jar cmf0 META-INF/MANIFEST.MF onnxruntime-extensions-$(ortVersion).jar *
displayName: Combine and pack JAR with Windows, Linux and MacOS Binaries
- task: PublishPipelineArtifact@1
Expand Down

0 comments on commit 8cc3919

Please sign in to comment.