@@ -30,27 +30,46 @@ pipeline {
3030 stage('init') {
3131 steps {
3232 bat 'gradlew -version'
33-
34- // "cmd /c" for an OK exit code if no file is found
35- bat 'cmd /c del tests\\objectbox-java-test\\hs_err_pid*.log'
3633 }
3734 }
3835
39- stage('build-java') {
36+ stage('build-java-x64 ') {
4037 steps {
38+ // Remove files to avoid archiving them again.
39+ bat 'del /q /s hs_err_pid*.log'
40+
4141 bat "gradlew $gradleArgs $MVN_REPO_ARGS cleanTest build test"
4242 }
43+ post {
44+ always {
45+ junit '**/build/test-results/**/TEST-*.xml'
46+ archiveArtifacts artifacts: '**/hs_err_pid*.log', allowEmptyArchive: true
47+ }
48+ }
49+ }
50+
51+ stage('build-java-x86') {
52+ steps {
53+ // Remove files to avoid archiving them again.
54+ bat 'del /q /s hs_err_pid*.log'
55+
56+ // TEST_WITH_JAVA_X86 makes objectbox-java-test use 32-bit java executable and therefore
57+ // 32-bit ObjectBox to run tests (see build.gradle file).
58+ // Note: assumes JAVA_HOME_X86 is set to 32-bit JDK path.
59+ // Note: no space before && or value has space as well.
60+ bat "set TEST_WITH_JAVA_X86=true&& gradlew $gradleArgs $MVN_REPO_ARGS cleanTest build test"
61+ }
62+ post {
63+ always {
64+ junit '**/build/test-results/**/TEST-*.xml'
65+ archiveArtifacts artifacts: '**/hs_err_pid*.log', allowEmptyArchive: true
66+ }
67+ }
4368 }
4469 }
4570
4671 // For global vars see /jenkins/pipeline-syntax/globals
4772 post {
48- always {
49- junit '**/build/test-results/**/TEST-*.xml'
50- archiveArtifacts artifacts: 'tests/*/hs_err_pid*.log', allowEmptyArchive: true // Only on JVM crash.
51- // currently unused: archiveArtifacts '**/build/reports/findbugs/*'
52- }
53-
5473 failure {
5574 updateGitlabCommitStatus name: 'build-windows', state: 'failed'
5675 }
0 commit comments