Skip to content

Commit c9b78e7

Browse files
committed
Clone the graal-enterprise version matching our Truffle import
* Removes the last dependency on other repos' master, making the CI more stable. * Remove `mx sversions` as we know the version, it's always our imported Truffle version.
1 parent a6fcc19 commit c9b78e7

File tree

2 files changed

+17
-31
lines changed

2 files changed

+17
-31
lines changed

ci.jsonnet

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ local part_definitions = {
138138
is_after+:: ["$.use.build"],
139139
setup+: [
140140
["cd", "../graal/compiler"],
141-
["mx", "sversions"],
142141
["mx", "build"],
143142
["cd", "../../main"],
144143
],
@@ -159,18 +158,20 @@ local part_definitions = {
159158
},
160159

161160
enterprise: {
162-
# Otherwise the TruffleRuby build will change the runtime Truffle version
163161
is_after+:: ["$.use.build"],
164-
setup+: [
165-
[
166-
"git",
167-
"clone",
168-
["mx", "urlrewrite", "https://github.com/graalvm/graal-enterprise.git"],
169-
"../graal-enterprise",
170-
],
162+
163+
clone::
164+
local url = ["mx", "urlrewrite", "https://github.com/graalvm/graal-enterprise.git"],
165+
repo = "../graal-enterprise",
166+
suite_file = "graal-enterprise/mx.graal-enterprise/suite.py",
167+
find_commit_importing_truffle = ["git", "-C", repo, "log", "--reverse", "--pretty=%H", "-m", "-S"] + jt(["truffle_version"]) + ["--grep=PullRequest:", suite_file, "|", "head", "-1"];
168+
[
169+
["git", "clone", url, repo],
170+
["git", "-C", repo, "checkout", find_commit_importing_truffle],
171+
],
172+
173+
setup+: self.clone + [
171174
["cd", "../graal-enterprise/graal-enterprise"],
172-
["mx", "sforceimports"],
173-
["mx", "sversions"],
174175
["mx", "build"],
175176
["cd", "../../main"],
176177
],
@@ -198,13 +199,6 @@ local part_definitions = {
198199

199200
svm_suite:: "/substratevm",
200201

201-
setup+: [
202-
["cd", "../graal/substratevm"],
203-
["mx", "sforceimports"],
204-
["mx", "sversions"],
205-
["cd", "../../main"],
206-
],
207-
208202
environment+: {
209203
HOST_VM_CONFIG: "graal-core",
210204
GRAAL_HOME: "$BUILD_DIR/graal/compiler",
@@ -213,23 +207,11 @@ local part_definitions = {
213207
},
214208

215209
enterprise: {
216-
# Otherwise the TruffleRuby build will change the runtime Truffle version
217210
is_after+:: ["$.use.build"],
218211

219212
svm_suite:: "/substratevm-enterprise",
220213

221-
setup+: [
222-
[
223-
"git",
224-
"clone",
225-
["mx", "urlrewrite", "https://github.com/graalvm/graal-enterprise.git"],
226-
"../graal-enterprise",
227-
],
228-
["cd", "../graal-enterprise/substratevm-enterprise"],
229-
["mx", "sforceimports"],
230-
["mx", "sversions"],
231-
["cd", "../../main"],
232-
],
214+
setup+: $.graal.enterprise.clone,
233215

234216
environment+: {
235217
HOST_VM_CONFIG: "graal-enterprise",

tool/jt.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,10 @@ def help
622622
TXT
623623
end
624624

625+
def truffle_version
626+
puts super
627+
end
628+
625629
def mx(*args)
626630
super(*args)
627631
end

0 commit comments

Comments
 (0)