Skip to content

Commit db81717

Browse files
authored
Update Java and Rust (#4383)
* Update Java and Rust Signed-off-by: Ryan Aslett <raslett@linuxfoundation.org> * Packer: Update rust installation process Signed-off-by: Ryan Aslett <raslett@linuxfoundation.org> --------- Signed-off-by: Ryan Aslett <raslett@linuxfoundation.org>
1 parent da8acfb commit db81717

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

orka/templates/macos-test.pkr.hcl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ variable "xcode_version" {
3838

3939
variable "rust_version" {
4040
type = string
41-
default = "1.82"
41+
default = "1.88"
4242
description = "Rust toolchain version to install via rustup. Matches RUSTC_VERSION in nodejs/node test-macos.yml."
4343
}
4444

@@ -242,24 +242,25 @@ build {
242242
"${local.homebrew_path}/bin/pipx ensurepath"
243243
]
244244
}
245-
// Install Java 17 for Jenkins.
245+
// Install Java 25 for Jenkins.
246246
provisioner "shell" {
247247
inline = [
248248
"echo 'Installing JRE...'",
249249
"eval \"$(${local.homebrew_path}/bin/brew shellenv)\"",
250-
"${local.homebrew_path}/bin/brew install --cask temurin@17",
250+
"${local.homebrew_path}/bin/brew install --cask temurin@25",
251251
]
252252
}
253253
// Install Rust via rustup (matches nodejs/node test-macos.yml RUSTC_VERSION).
254254
provisioner "shell" {
255255
environment_vars = ["HOME=/Users/admin", "USER=admin"]
256256
inline = [
257-
"echo 'Installing rustup...'",
258-
"eval \"$(${local.homebrew_path}/bin/brew shellenv)\"",
259-
"${local.homebrew_path}/bin/brew install rustup",
260-
"echo 'Installing Rust ${var.rust_version} toolchain...'",
261-
"rustup-init -y --no-modify-path --default-toolchain ${var.rust_version} --profile minimal",
262-
"rustup target add x86_64-apple-darwin",
257+
"echo 'Installing Rust ${var.rust_version} via rustup installer...'",
258+
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain ${var.rust_version} --profile minimal",
259+
// On arm64: adds the Intel cross-compile target (arm builds x86 binaries).
260+
// On x64: x86_64-apple-darwin is the host target already installed by the
261+
// toolchain installer, so this is a harmless no-op. Do not make this
262+
// architecture-conditional — the unconditional form is intentionally correct.
263+
"/Users/admin/.cargo/bin/rustup target add x86_64-apple-darwin",
263264
"echo 'export PATH=\"/Users/admin/.cargo/bin:$PATH\"' >> /Users/admin/.zprofile",
264265
"/Users/admin/.cargo/bin/rustup --version",
265266
"/Users/admin/.cargo/bin/rustc --version",

0 commit comments

Comments
 (0)