@@ -30,27 +30,46 @@ pipeline {
30
30
stage('init') {
31
31
steps {
32
32
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'
36
33
}
37
34
}
38
35
39
- stage('build-java') {
36
+ stage('build-java-x64 ') {
40
37
steps {
38
+ // Remove files to avoid archiving them again.
39
+ bat 'del /q /s hs_err_pid*.log'
40
+
41
41
bat "gradlew $gradleArgs $MVN_REPO_ARGS cleanTest build test"
42
42
}
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
+ }
43
68
}
44
69
}
45
70
46
71
// For global vars see /jenkins/pipeline-syntax/globals
47
72
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
-
54
73
failure {
55
74
updateGitlabCommitStatus name: 'build-windows', state: 'failed'
56
75
}
0 commit comments