ci(windows): load MSVC dev environment before building
Release / linux (push) Successful in 16m7s
Release / windows (push) Failing after 31m11s

rustc resolves link.exe via PATH for the windows-msvc target, but Git for
Windows ships GNU coreutils' link.exe which shadows MSVC's linker, breaking
every build-script link. Add ilammy/msvc-dev-cmd@v1 before the tauri build so
PATH/LIB/INCLUDE point at the real MSVC toolchain (and it fails fast if MSVC
is missing instead of at link time).
This commit is contained in:
2026-09-01 06:26:07 +08:00
parent 46e0dc2cee
commit 4ac738e6e9
+10
View File
@@ -212,6 +212,16 @@ jobs:
cp "$WINROOT"/bin/mariadb-dump.exe "$WINROOT"/bin/mariadb.exe "$OUT"/ cp "$WINROOT"/bin/mariadb-dump.exe "$WINROOT"/bin/mariadb.exe "$OUT"/
cp "$WINROOT"/lib/libmariadb.dll "$OUT"/ cp "$WINROOT"/lib/libmariadb.dll "$OUT"/
# rustc resolves `link.exe` via PATH for the windows-msvc target, but Git
# for Windows ships GNU coreutils with its own `link.exe` that shadows
# MSVC's linker (`link: extra operand ...`). Load the MSVC dev
# environment so PATH/LIB/INCLUDE point at the real MSVC toolchain.
# Fails fast here (instead of at link time) if the toolchain is missing.
- name: Set up MSVC build environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Build installers - name: Build installers
shell: bash shell: bash
run: bun run --filter gridline-desktop tauri build run: bun run --filter gridline-desktop tauri build