Skip to content

Commit

Permalink
Remove warning suppression from Java Packaging pipeline. (#21010)
Browse files Browse the repository at this point in the history
### Description
Remove warning suppression from Java Packaging pipeline.


### Motivation and Context
We want the CI step not to produce warning.
  • Loading branch information
jchen351 authored Jun 24, 2024
1 parent adaf0e8 commit f81c0ec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,14 @@ if (cmakeBuildDir != null) {
}

tasks.register('cmakeCheck', Copy) {
group = 'verification'
from layout.buildDirectory.get()
include 'reports/**'
into cmakeBuildOutputDir
dependsOn(check)
}
} else {
println "cmakeBuildDir is not set. Skipping cmake tasks."
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ parameters:
steps:
- task: CmdLine@2
displayName: 'Gradle cmakeCheck'
continueOnError: ${{ parameters.buildOnly }}
inputs:
script: |
@echo on
call gradlew.bat cmakeCheck -DcmakeBuildDir=$(Build.BinariesDirectory)\RelWithDebInfo --warning-mode all
workingDirectory: $(Build.SourcesDirectory)\java
${{ if eq(parameters.buildOnly, true) }}:
script: |
call gradlew.bat testClasses -DcmakeBuildDir=$(Build.BinariesDirectory)\RelWithDebInfo
call gradlew.bat cmakeCheck -x test -DcmakeBuildDir=$(Build.BinariesDirectory)\RelWithDebInfo --warning-mode all
workingDirectory: $(Build.SourcesDirectory)\java
${{ else }}:
script: |
call gradlew.bat cmakeCheck -DcmakeBuildDir=$(Build.BinariesDirectory)\RelWithDebInfo --warning-mode all
workingDirectory: $(Build.SourcesDirectory)\java

- task: CmdLine@2
displayName: 'Add symbols and notices to Java'
Expand Down
6 changes: 3 additions & 3 deletions tools/ci_build/github/azure-pipelines/templates/win-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ stages:
parameters:
msbuildPlatform: ${{ parameters.msbuildPlatform }}
java_artifact_id: ${{ parameters.java_artifact_id }}
${{ if contains(parameters.ort_build_pool_name, 'CPU') }}:
buildOnly: false
${{ if or(contains(parameters.buildparameter, 'use_cuda'), contains(parameters.buildparameter, 'use_tensorrt')) }}:
# When it is a GPU build, we only assemble the java binaries, testing will be done in the later stage with GPU machine
${{ else }}:
buildOnly: true
${{ else }}:
buildOnly: false

- task: PublishBuildArtifacts@1
displayName: 'Publish Java temp binaries'
Expand Down

0 comments on commit f81c0ec

Please sign in to comment.