Skip to content

Commit 3470023

Browse files
committed
[GR-18163] Fix jt install jvmci before cloning graal
PullRequest: truffleruby/4058
2 parents a9afcef + 605004c commit 3470023

File tree

4 files changed

+26
-21
lines changed

4 files changed

+26
-21
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 }}

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-20.04
1515
steps:
1616
- name: Clone TruffleRuby
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0 # Necessary for jt check_abi
2020
- name: Setup system Ruby
@@ -23,7 +23,7 @@ jobs:
2323
run: echo "$PWD/bin" >> $GITHUB_PATH
2424

2525
- name: Restore ~/.mx/cache
26-
uses: actions/cache@v2
26+
uses: actions/cache@v3
2727
with:
2828
path: ~/.mx/cache
2929
key: mx-cache-lint-${{ runner.os }}-${{ hashFiles('common.json') }}
@@ -48,7 +48,7 @@ jobs:
4848
working-directory: build
4949
steps:
5050
- name: Clone TruffleRuby
51-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
5252
with:
5353
path: build
5454
- name: Setup system Ruby
@@ -59,7 +59,7 @@ jobs:
5959
run: echo "$PWD/bin" >> $GITHUB_PATH
6060

6161
- name: Restore ~/.mx/cache
62-
uses: actions/cache@v2
62+
uses: actions/cache@v3
6363
with:
6464
path: ~/.mx/cache
6565
key: mx-cache-build-${{ runner.os }}-${{ hashFiles('build/common.json') }}
@@ -89,7 +89,7 @@ jobs:
8989
working-directory: build
9090
steps:
9191
- name: Clone TruffleRuby
92-
uses: actions/checkout@v2
92+
uses: actions/checkout@v4
9393
with:
9494
path: build
9595
- name: Setup system Ruby
@@ -100,7 +100,7 @@ jobs:
100100
run: echo "$PWD/bin" >> $GITHUB_PATH
101101

102102
- name: Restore ~/.mx/cache
103-
uses: actions/cache@v2
103+
uses: actions/cache@v3
104104
with:
105105
path: ~/.mx/cache
106106
key: mx-cache-build-native-${{ runner.os }}-${{ hashFiles('build/common.json') }}
@@ -131,7 +131,7 @@ jobs:
131131
runs-on: ubuntu-20.04
132132
steps:
133133
- name: Clone TruffleRuby
134-
uses: actions/checkout@v2
134+
uses: actions/checkout@v4
135135
- name: Setup system Ruby
136136
uses: ruby/setup-ruby@v1
137137
- name: Setup jt
@@ -158,7 +158,7 @@ jobs:
158158
- :library :cext :security :command_line :tracepoint # command_line ~5min, others < 2min
159159
steps:
160160
- name: Clone TruffleRuby
161-
uses: actions/checkout@v2
161+
uses: actions/checkout@v4
162162
- name: Setup system Ruby
163163
uses: ruby/setup-ruby@v1
164164
- name: Setup jt
@@ -177,7 +177,7 @@ jobs:
177177
runs-on: ubuntu-20.04
178178
steps:
179179
- name: Clone TruffleRuby
180-
uses: actions/checkout@v2
180+
uses: actions/checkout@v4
181181
- name: Setup system Ruby
182182
uses: ruby/setup-ruby@v1
183183
- name: Setup jt
@@ -196,7 +196,7 @@ jobs:
196196
runs-on: ubuntu-20.04
197197
steps:
198198
- name: Clone TruffleRuby
199-
uses: actions/checkout@v2
199+
uses: actions/checkout@v4
200200
- name: Setup system Ruby
201201
uses: ruby/setup-ruby@v1
202202
- name: Setup jt
@@ -222,7 +222,7 @@ jobs:
222222
runs-on: ubuntu-20.04
223223
steps:
224224
- name: Clone TruffleRuby
225-
uses: actions/checkout@v2
225+
uses: actions/checkout@v4
226226
- name: Setup system Ruby
227227
uses: ruby/setup-ruby@v1
228228
- name: Setup jt
@@ -245,7 +245,7 @@ jobs:
245245
ruby: ['3.0', '3.1', '3.2']
246246
runs-on: ubuntu-latest
247247
steps:
248-
- uses: actions/checkout@v2
248+
- uses: actions/checkout@v4
249249
- uses: ruby/setup-ruby@v1
250250
with:
251251
ruby-version: ${{ matrix.ruby }}

doc/user/testing-truffleruby-in-ci.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
ruby: [ 2.6, truffleruby, truffleruby-head ]
21+
ruby: [ '3.2', truffleruby, truffleruby-head ]
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
- uses: ruby/setup-ruby@v1
2626
with:
2727
ruby-version: ${{ matrix.ruby }}

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*,/
@@ -2512,6 +2513,10 @@ def bootstrap_toolchain
25122513
end
25132514
end
25142515

2516+
def sforceimports
2517+
mx('sforceimports', java_home: :none, primary_suite: TRUFFLERUBY_DIR)
2518+
end
2519+
25152520
private def build_graalvm(*options)
25162521
raise 'use --env jvm-ce instead' if options.delete('--graal')
25172522
raise 'use --env native instead' if options.delete('--native')
@@ -2547,14 +2552,14 @@ def bootstrap_toolchain
25472552
checkout_enterprise_revision(env) if cloned
25482553

25492554
if options.delete('--sforceimports') || sforceimports?(mx_base_args)
2550-
mx('sforceimports', java_home: :none, primary_suite: TRUFFLERUBY_DIR)
2555+
sforceimports
25512556
if ee
25522557
checkout_enterprise_revision(env) if !cloned
25532558
# sforceimports for optional suites imported in vm-enterprise like substratevm-enterprise-gcs
25542559
vm_enterprise = File.expand_path '../graal-enterprise/vm-enterprise', TRUFFLERUBY_DIR
25552560
mx('--env', env_path(env), 'sforceimports', java_home: :none, primary_suite: vm_enterprise)
25562561
# And still make sure we import the graal revision as in mx.truffleruby/suite.py
2557-
mx('sforceimports', java_home: :none, primary_suite: TRUFFLERUBY_DIR)
2562+
sforceimports
25582563
end
25592564
end
25602565

0 commit comments

Comments
 (0)