Skip to content

Commit 5f18767

Browse files
committed
[GR-14768] Build a GraalVM directly with the right SVM options for testing Ruby.
PullRequest: truffleruby/757
2 parents 2f8f3cc + 0db683f commit 5f18767

File tree

3 files changed

+32
-16
lines changed

3 files changed

+32
-16
lines changed

ci.jsonnet

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ local part_definitions = {
252252
self.svm_suite + ",truffleruby",
253253
"--disable-polyglot",
254254
"--disable-libpolyglot",
255-
"--force-bash-launchers=lli,truffleruby",
255+
"--force-bash-launchers=lli,native-image",
256256
"gate",
257257
"--no-warning-as-error",
258258
"--tags",
@@ -557,23 +557,37 @@ local composition_environment = utils.add_inclusion_tracking(part_definitions, "
557557
"ruby-test-cexts-darwin": darwin_gate + $.use.gem_test_pack + $.run.test_cexts,
558558
} +
559559

560-
local svm_test_platforms = {
561-
local shared = $.jdk.labsjdk8 + $.use.common + $.use.svm + $.cap.gate + $.svm.gate,
562-
563-
linux: $.platform.linux + shared + { "$.svm.gate":: { tags: "build,ruby_debug,ruby_product" } },
564-
darwin: $.platform.darwin + shared + { "$.svm.gate":: { tags: "build,darwin_ruby" } },
565-
};
560+
local svm_test_shared = $.jdk.labsjdk8 + $.use.common + $.use.svm + $.cap.gate + $.svm.gate;
566561
{
567-
local shared = $.use.build + $.svm.core + { timelimit: "01:00:00" },
568-
local tag_override = { "$.svm.gate":: { tags: "build,ruby" } },
562+
local shared = $.use.build + $.svm.core + {
563+
"$.svm.gate":: {
564+
tags: "build,ruby"
565+
},
566+
environment+: {
567+
EXTRA_IMAGE_BUILDER_ARGUMENTS: "-H:GreyToBlackObjectVisitorDiagnosticHistory=16", # GR-9912
568+
},
569+
timelimit: "01:00:00",
570+
},
569571

570-
"ruby-test-svm-graal-core-linux": shared + svm_test_platforms.linux + tag_override,
571-
"ruby-test-svm-graal-core-darwin": shared + svm_test_platforms.darwin + tag_override,
572+
"ruby-test-svm-graal-core-linux": $.platform.linux + svm_test_shared + shared,
573+
"ruby-test-svm-graal-core-darwin": $.platform.darwin + svm_test_shared + shared,
572574
} + {
573575
local shared = $.use.build + $.svm.enterprise + { timelimit: "01:15:00" },
574576

575-
"ruby-test-svm-graal-enterprise-linux": shared + svm_test_platforms.linux,
576-
"ruby-test-svm-graal-enterprise-darwin": shared + svm_test_platforms.darwin,
577+
"ruby-test-svm-graal-enterprise-linux": $.platform.linux + svm_test_shared + shared + {
578+
"$.svm.gate":: {
579+
tags: "build,ruby_product"
580+
},
581+
environment+: {
582+
EXTRA_IMAGE_BUILDER_ARGUMENTS: "-H:+VerifyGraalGraphs -H:+VerifyPhases -H:+AOTPriorityInline -H:+VerifyDeoptimizationEntryPoints",
583+
},
584+
},
585+
"ruby-test-svm-graal-enterprise-darwin": $.platform.darwin + svm_test_shared + shared + {
586+
"$.svm.gate":: {
587+
tags: "build,darwin_ruby"
588+
},
589+
# No extra verifications, this CI job is already slow
590+
},
577591
},
578592

579593
local other_rubies = {

mx.truffleruby/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "tools",
1010
"subdir": True,
1111
# version must always be equal to the version of the "sulong" import below
12-
"version": "982c4186d869613d1e4fd00040b5bad86338ce2a",
12+
"version": "32e335f78fdf36097d832d5af2f17fb789d5e02a",
1313
"urls": [
1414
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
1515
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -19,7 +19,7 @@
1919
"name": "sulong",
2020
"subdir": True,
2121
# version must always be equal to the version of the "tools" import above
22-
"version": "982c4186d869613d1e4fd00040b5bad86338ce2a",
22+
"version": "32e335f78fdf36097d832d5af2f17fb789d5e02a",
2323
"urls": [
2424
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
2525
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},

tool/jt.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ def run_ruby(*args)
710710
case arg
711711
when '--native'
712712
native = true
713+
vm_args << '--native'
713714
when '--no-core-load-path'
714715
core_load_path = false
715716
when '--graal'
@@ -1311,6 +1312,7 @@ def test_specs(command, *args)
13111312
if args.delete('--native')
13121313
verify_native_bin!
13131314
options << '-t' << find_launcher(true)
1315+
options << '-T--native'
13141316
else
13151317
options += %w[-T--vm.ea -T--vm.esa -T--vm.Xmx2G]
13161318
options << "-T--core.load_path=#{TRUFFLERUBY_DIR}/src/main/ruby"
@@ -1747,7 +1749,7 @@ def benchmark(*args)
17471749

17481750
run_args = []
17491751

1750-
if args.delete('--native') || (ENV.has_key?('JT_BENCHMARK_RUBY') && (ENV['JT_BENCHMARK_RUBY'] == find_launcher(true)))
1752+
if args.include?('--native') || (ENV.has_key?('JT_BENCHMARK_RUBY') && (ENV['JT_BENCHMARK_RUBY'] == find_launcher(true)))
17511753
# We already have a mechanism for setting the Ruby to benchmark, but elsewhere we use AOT_BIN with the "--native" flag.
17521754
# Favor JT_BENCHMARK_RUBY to AOT_BIN, but try both.
17531755
benchmark_ruby ||= find_launcher(true)

0 commit comments

Comments
 (0)