Skip to content

Commit 69b0a2b

Browse files
committed
Fix jt install jvmci before cloning graal
1 parent 48eca7e commit 69b0a2b

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/actions/setup-jvmci-graal/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: 'Install JVMCI, set JAVA_HOME and clone Graal'
22
runs:
33
using: "composite"
44
steps:
5+
- name: Clone Graal
6+
run: jt sforceimports
7+
shell: bash
8+
working-directory: ${{ github.action_path }}
9+
510
- name: Install JVMCI
611
run: jt install jvmci
712
shell: bash
@@ -11,8 +16,3 @@ runs:
1116
run: echo "JAVA_HOME=$(jt install jvmci)" >> $GITHUB_ENV
1217
shell: bash
1318
working-directory: ${{ github.action_path }}
14-
15-
- name: Clone Graal
16-
run: jt mx sforceimports
17-
shell: bash
18-
working-directory: ${{ github.action_path }}

tool/jt.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def graal_common_json
186186

187187
def jvmci_version
188188
@jvmci_version ||= begin
189+
sforceimports unless File.directory?(GRAAL_DIR)
189190
common_json = File.read(graal_common_json)
190191
edition = ee_jdk? ? 'ee' : 'ce'
191192
regex = /"labsjdk-#{edition}-#{@jdk_version}":\s*\{\s*"name":\s*"labsjdk"\s*,\s*"version":\s*"[^"]+-(jvmci-[^"]+)"\s*,/
@@ -2509,6 +2510,10 @@ def bootstrap_toolchain
25092510
end
25102511
end
25112512

2513+
def sforceimports
2514+
mx('sforceimports', java_home: :none, primary_suite: TRUFFLERUBY_DIR)
2515+
end
2516+
25122517
private def build_graalvm(*options)
25132518
raise 'use --env jvm-ce instead' if options.delete('--graal')
25142519
raise 'use --env native instead' if options.delete('--native')
@@ -2544,14 +2549,14 @@ def bootstrap_toolchain
25442549
checkout_enterprise_revision(env) if cloned
25452550

25462551
if options.delete('--sforceimports') || sforceimports?(mx_base_args)
2547-
mx('sforceimports', java_home: :none, primary_suite: TRUFFLERUBY_DIR)
2552+
sforceimports
25482553
if ee
25492554
checkout_enterprise_revision(env) if !cloned
25502555
# sforceimports for optional suites imported in vm-enterprise like substratevm-enterprise-gcs
25512556
vm_enterprise = File.expand_path '../graal-enterprise/vm-enterprise', TRUFFLERUBY_DIR
25522557
mx('--env', env_path(env), 'sforceimports', java_home: :none, primary_suite: vm_enterprise)
25532558
# And still make sure we import the graal revision as in mx.truffleruby/suite.py
2554-
mx('sforceimports', java_home: :none, primary_suite: TRUFFLERUBY_DIR)
2559+
sforceimports
25552560
end
25562561
end
25572562

0 commit comments

Comments
 (0)