Skip to content

Commit 1ac7485

Browse files
committed
ci: set up MSVC env before GraalVM native-image on Windows
The windows-latest runner has Visual Studio installed but does not activate the MSVC toolchain in the PATH by default. native-image requires cl.exe / link.exe from the x64 Native Tools environment, otherwise it exits with 'Failed to find vcvarsall.bat'. ilammy/msvc-dev-cmd@v1 runs the equivalent of opening an 'x64 Native Tools Command Prompt', fixing Windows native builds.
1 parent 3674b2f commit 1ac7485

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ jobs:
9494
&& echo "Imported intermediate CA: ${subj}" \
9595
|| echo "Intermediate already trusted: ${subj}"
9696
fi
97+
- name: Set up MSVC (required by GraalVM native-image on Windows)
98+
if: matrix.os == 'windows-latest'
99+
uses: ilammy/msvc-dev-cmd@v1
100+
with:
101+
arch: x64
97102
- name: Build native binary
98103
run: mvn -B -Pnative -DskipTests package native:compile-no-fork
99104
- name: Upload native binary

0 commit comments

Comments
 (0)