From 7f24adeebbec76ba89ac2ad57559aa03dbd46741 Mon Sep 17 00:00:00 2001 From: nmammeri Date: Mon, 10 Jun 2024 10:41:55 +0200 Subject: [PATCH] ci: fix ci workflow --- .github/workflows/release_pyton_pytest.yml | 3 +++ extract-core/build.rs | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_pyton_pytest.yml b/.github/workflows/release_pyton_pytest.yml index ce2292f..a53374c 100644 --- a/.github/workflows/release_pyton_pytest.yml +++ b/.github/workflows/release_pyton_pytest.yml @@ -45,6 +45,7 @@ jobs: with: java-version: '22' distribution: 'graalvm-community' + set-java-home: 'true' - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -101,6 +102,7 @@ jobs: with: java-version: '22' distribution: 'graalvm-community' + set-java-home: 'true' - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -140,6 +142,7 @@ jobs: with: java-version: '22' distribution: 'liberica' + set-java-home: 'true' - name: Build wheels uses: PyO3/maturin-action@v1 with: diff --git a/extract-core/build.rs b/extract-core/build.rs index 09bc345..7e4677a 100644 --- a/extract-core/build.rs +++ b/extract-core/build.rs @@ -65,6 +65,10 @@ pub fn check_graalvm(target_os: &str) { "macos" => "24.0.1.r22-nik", _ => "22.0.1-graalce" }; + let native_image_exe = match target_os { + "windows" => "native-image.cmd", + _ => "native-image" + }; let help_msg = format!("\nWe recommend using sdkman to install and \ manage different JDKs. See https://sdkman.io/usage for more information.\n\ You can install graalvm using:\n \ @@ -76,7 +80,7 @@ pub fn check_graalvm(target_os: &str) { match java_home { Some(java_home) => { // Check that native-image is in JAVA_HOME/bin - let native_image = java_home.join("bin").join("native-image"); + let native_image = java_home.join("bin").join(native_image_exe); if !native_image.exists() { panic!("Your JAVA_HOME env variable is pointing to: {}. Please make sure your \ JAVA_HOME is pointing to a valid GraalVM JDK. {}", java_home.display(), help_msg);