@@ -4,7 +4,7 @@ local ci = import '../ci.jsonnet';
44{
55 local graalNodeJs = ci.jobtemplate + {
66 cd:: 'graal-nodejs' ,
7- suite_prefix:: 'nodejs' ,
7+ suite_prefix:: 'nodejs' , # for build job names
88 // increase default timelimit on windows and darwin-amd64
99 timelimit: if 'os' in self && (self .os == 'windows' || (self .os == 'darwin' && self .arch == 'amd64' )) then '1:15:00' else '45:00' ,
1010 },
@@ -16,8 +16,9 @@ local ci = import '../ci.jsonnet';
1616 // too slow on windows and darwin-amd64
1717 local enabled = 'os' in self && !(self .os == 'windows' || (self .os == 'darwin' && self .arch == 'amd64' )),
1818 artifact:: if enabled then 'nodejs' else '' ,
19- suiteimports+:: if enabled then ['vm' , 'substratevm' , 'tools' ] else [],
19+ suiteimports+:: if enabled then ['vm' , 'substratevm' , 'tools' ] else ['vm' ],
2020 nativeimages+:: if enabled then ['lib:graal-nodejs' , 'lib:jvmcicompiler' ] else [], // 'js'
21+ build_standalones:: true ,
2122 },
2223
2324 local gateTags(tags) = common.gateTags + {
@@ -29,9 +30,8 @@ local ci = import '../ci.jsonnet';
2930 local build = {
3031 run+: [
3132 ['[' , '${ARTIFACT_NAME}' , ']' , '||' , 'mx' , 'build' , '--force-javac' ], // build only if no artifact is being used
32- ] + (if 'os' in self && self .os == 'darwin' then [
33- # Ensure correct LC_RPATH
34- ['install_name_tool' , '-add_rpath' , '${JAVA_HOME}/lib' , 'out/Release/node' , '||' , 'true' ],
33+ ] + (if 'build_standalones' in self && self .build_standalones then [
34+ ['[' , '${ARTIFACT_NAME}' , ']' , '||' , 'mx' , 'build' , '--force-javac' , '--dependencies' , 'GRAALVM_STANDALONES' ],
3535 ] else []),
3636 },
3737
@@ -42,21 +42,20 @@ local ci = import '../ci.jsonnet';
4242 }
4343 },
4444
45- local gateSubstrateVmSmokeTest = {
46- run+: [
47- ['mx' , '--env' , 'svm' , 'build' ],
48- ['set-export' , 'GRAALVM_HOME' , ['mx' , '--quiet' , '--env' , 'svm' , 'graalvm-home' ]],
49- ['${GRAALVM_HOME}/bin/node' , '-e' , "console.log('Hello, World!')" ],
50- ['${GRAALVM_HOME}/bin/npm' , '--version' ],
51- ],
52- },
53-
54- local gateVmSmokeTest = build + {
45+ local gateVmSmokeTest = {
5546 run+: [
5647 ['set-export' , 'GRAALVM_HOME' , ['mx' , '--quiet' , 'graalvm-home' ]],
5748 ['${GRAALVM_HOME}/bin/node' , '-e' , "console.log('Hello, World!')" ],
5849 ['${GRAALVM_HOME}/bin/npm' , '--version' ],
59- ],
50+ # standalone smoke tests
51+ ['set-export' , 'STANDALONE_HOME' , ['mx' , '--quiet' , 'standalone-home' , 'nodejs' , '--type=jvm' ]],
52+ ['${STANDALONE_HOME}/bin/node' , '-e' , "console.log('Hello, World!')" ],
53+ ['${STANDALONE_HOME}/bin/npm' , '--version' ],
54+ ] + (if std.find ('substratevm' , super .suiteimports) != [] then [
55+ ['set-export' , 'STANDALONE_HOME' , ['mx' , '--quiet' , 'standalone-home' , 'nodejs' , '--type=native' ]],
56+ ['${STANDALONE_HOME}/bin/node' , '-e' , "console.log('Hello, World!')" ],
57+ ['${STANDALONE_HOME}/bin/npm' , '--version' ],
58+ ] else []),
6059 },
6160
6261 local gateCoverage = {
@@ -136,18 +135,11 @@ local ci = import '../ci.jsonnet';
136135 promoteToTarget(common.gate, [common.jdk21 + common.linux_amd64, common.jdk21 + common.linux_aarch64, common.jdk21 + common.darwin_aarch64, common.jdk21 + common.windows_amd64]) +
137136 promoteToTarget(common.postMerge, [common.jdk21 + common.darwin_amd64]),
138137
139- graalNodeJs + gateSubstrateVmSmokeTest + {name: 'substratevm -ce' } +
140- excludePlatforms( [ci.mainGatePlatform]) +
138+ graalNodeJs + vm_env + build + gateVmSmokeTest + ce + {name: 'graalvm -ce' } +
139+ promoteToTarget(common.gate, [ci.mainGatePlatform]) +
141140 promoteToTarget(common.gate, [common.jdk21 + common.darwin_aarch64, common.jdk21 + common.windows_amd64]) +
142141 promoteToTarget(common.postMerge, [common.jdk21 + common.darwin_amd64]),
143- graalNodeJs + gateSubstrateVmSmokeTest + {name: 'substratevm-ee' } +
144- excludePlatforms([ci.mainGatePlatform]),
145- # We run either gateSubstrateVmSmokeTest or gateVmSmokeTest, but not both.
146- graalNodeJs + vm_env + gateVmSmokeTest + ce + {name: 'graalvm-ce' } +
147- includePlatforms([ci.mainGatePlatform]) +
148- promoteToTarget(common.gate, [ci.mainGatePlatform]),
149- graalNodeJs + vm_env + gateVmSmokeTest + ee + {name: 'graalvm-ee' } +
150- includePlatforms([ci.mainGatePlatform]) +
142+ graalNodeJs + vm_env + build + gateVmSmokeTest + ee + {name: 'graalvm-ee' } +
151143 promoteToTarget(common.gate, [ci.mainGatePlatform]),
152144
153145 graalNodeJs + vm_env + build + auxEngineCache + ee + {name: 'aux-engine-cache' } + gateOnMain +
0 commit comments