Skip to content

Commit

Permalink
[Fix] Only copy java files when build_java is True (#20121)
Browse files Browse the repository at this point in the history
### Description


### Motivation and Context
Fix error in Nuget-CUDA-Packaging-Pipeline
  • Loading branch information
mszhanyi authored Mar 28, 2024
1 parent 3ed0c81 commit f7b52d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/ci_build/github/azure-pipelines/templates/win-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,18 @@ stages:
Get-ChildItem -Path "$(Agent.TempDirectory)/RelWithDebInfo" -Include *.pdb -File -Recurse | ForEach-Object { $_.Delete() }
Get-ChildItem -Path "$(Agent.TempDirectory)/RelWithDebInfo" -Include *.lib -File -Recurse | ForEach-Object { $_.Delete() }
Copy-Item -Path $(Build.BinariesDirectory)/RelWithDebInfo/RelWithDebInfo/onnxruntime.pdb -Destination $(Agent.TempDirectory)/RelWithDebInfo/RelWithDebInfo -Force
Copy-Item -Path $(Build.BinariesDirectory)/RelWithDebInfo/RelWithDebInfo/onnxruntime4j_jni.pdb -Destination $(Agent.TempDirectory)/RelWithDebInfo/RelWithDebInfo -Force
cd $(Agent.TempDirectory)/RelWithDebInfo
tree /f
displayName: 'Copy native test needs files'
workingDirectory: '$(Build.BinariesDirectory)'
- ${{ if eq(parameters['buildJava'], 'true') }}:
- powershell: |
Copy-Item -Path $(Build.BinariesDirectory)/RelWithDebInfo/RelWithDebInfo/onnxruntime4j_jni.pdb -Destination $(Agent.TempDirectory)/RelWithDebInfo/RelWithDebInfo -Force
Copy-Item -Path "$(Build.BinariesDirectory)/RelWithDebInfo/java" -Destination $(Agent.TempDirectory)/RelWithDebInfo/ -Recurse -Force
cd $(Agent.TempDirectory)/RelWithDebInfo
tree /f
displayName: 'Copy java folder for java test'
displayName: 'Copy java pad and folder for java test'
workingDirectory: '$(Build.BinariesDirectory)'
- task: PublishPipelineArtifact@1
Expand Down

0 comments on commit f7b52d2

Please sign in to comment.