ci(windows): load MSVC dev environment before building
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user