@@ -20,18 +20,16 @@ const matrix = new MatrixBuilder();
20
20
matrix . addAxis ( {
21
21
name : 'java_distribution' ,
22
22
values : [
23
- 'corretto' ,
24
- 'liberica' ,
25
- 'microsoft' ,
26
- 'oracle' ,
27
- 'temurin' ,
28
- 'zulu' ,
23
+ { value : 'corretto' , weight : 1 } ,
24
+ { value : 'liberica' , weight : 1 } ,
25
+ { value : 'microsoft' , weight : 1 } ,
26
+ { value : 'oracle' , weight : 1 } ,
27
+ { value : 'semeru' , weight : 4 } ,
28
+ { value : 'temurin' , weight : 1 } ,
29
+ { value : 'zulu' , weight : 1 } ,
29
30
]
30
31
} ) ;
31
32
32
- // TODO: support different JITs (see https://github.com/actions/setup-java/issues/279)
33
- matrix . addAxis ( { name : 'jit' , title : '' , values : [ 'hotspot' ] } ) ;
34
-
35
33
// See the supported versions at https://foojay.io/almanac/java-17/
36
34
matrix . addAxis ( {
37
35
name : 'java_version' ,
@@ -92,12 +90,16 @@ matrix.setNamePattern([
92
90
'tz' , 'locale' ,
93
91
] ) ;
94
92
93
+ // Semeru uses OpenJ9 jit which has no option for making hash codes the same
94
+ // See https://github.com/eclipse-openj9/openj9/issues/17309
95
+ matrix . exclude ( { java_distribution : { value : 'semeru' } , hash : { value : 'same' } } ) ;
96
+ matrix . exclude ( { java_distribution : { value : 'semeru' } , java_version : '19' } ) ;
95
97
// Microsoft Java has no distribution for 8, 18, 19
96
- matrix . exclude ( { java_distribution : 'microsoft' , java_version : '8' } ) ;
97
- matrix . exclude ( { java_distribution : 'microsoft' , java_version : '18' } ) ;
98
- matrix . exclude ( { java_distribution : 'microsoft' , java_version : '19' } ) ;
98
+ matrix . exclude ( { java_distribution : { value : 'microsoft' } , java_version : '8' } ) ;
99
+ matrix . exclude ( { java_distribution : { value : 'microsoft' } , java_version : '18' } ) ;
100
+ matrix . exclude ( { java_distribution : { value : 'microsoft' } , java_version : '19' } ) ;
99
101
// Oracle supports 17+ only
100
- matrix . exclude ( { java_distribution : 'oracle' , java_version : [ '8' , '11' , '19' ] } ) ;
102
+ matrix . exclude ( { java_distribution : { value : 'oracle' } , java_version : [ '8' , '11' , '19' ] } ) ;
101
103
// TODO: remove when compileJava with "same hashcode" issues are resolved
102
104
// See https://bugs.openjdk.org/browse/JDK-8288590 is resolved
103
105
// See https://github.com/jqwik-team/jqwik/pull/460#issuecomment-1428261036
@@ -133,14 +135,19 @@ include.forEach(v => {
133
135
} ) ;
134
136
include . forEach ( v => {
135
137
let jvmArgs = [ ] ;
136
-
138
+ // Extra JVM arguments passed to test execution
139
+ let testJvmArgs = [ ] ;
137
140
if ( v . hash . value === 'same' ) {
138
- jvmArgs . push ( '-XX:+UnlockExperimentalVMOptions' , '-XX:hashCode=2' ) ;
141
+ // javac has issues with "same hashcode" option (see https://bugs.openjdk.org/browse/JDK-8288590)
142
+ // On the other hand, kotlinc uses "object identity" a lot. It works properly,
143
+ // but it becomes slow as HashMap degrades. So we pass "same hashcode" to test executions only.
144
+ testJvmArgs . push ( '-XX:+UnlockExperimentalVMOptions' , '-XX:hashCode=2' ) ;
139
145
}
140
146
// Pass locale via _JAVA_OPTIONS so all the forked processes inherit it
141
147
jvmArgs . push ( `-Duser.country=${ v . locale . country } ` ) ;
142
148
jvmArgs . push ( `-Duser.language=${ v . locale . language } ` ) ;
143
- if ( v . jit === 'hotspot' && Math . random ( ) > 0.5 ) {
149
+ v . java_distribution = v . java_distribution . value ;
150
+ if ( v . java_distribution !== 'semeru' && Math . random ( ) > 0.5 ) {
144
151
// The following options randomize instruction selection in JIT compiler
145
152
// so it might reveal missing synchronization in TestNG code
146
153
v . name += ', stress JIT' ;
@@ -164,7 +171,8 @@ include.forEach(v => {
164
171
jvmArgs . push ( '-XX:+StressCCP' ) ;
165
172
}
166
173
}
167
- v . testExtraJvmArgs = jvmArgs . join ( ' ' ) ;
174
+ v . extraJvmArgs = jvmArgs . join ( ' ' ) ;
175
+ v . testExtraJvmArgs = testJvmArgs . join ( ' ::: ' ) ;
168
176
delete v . hash ;
169
177
} ) ;
170
178
0 commit comments