Skip to content

Commit 85e1d68

Browse files
pks-tgitster
authored andcommitted
ci: use Visual Studio for win+meson job on GitHub Workflows
In 7304bd2 (ci: wire up Visual Studio build with Meson, 2025-01-22) we have wired up a new CI job that builds and tests Git with Meson on a Windows machine. The expectation here was that this build uses the Visual Studio toolchain to do so, and that is true on GitLab CI. But on GitHub Workflows it is not the case because we've got GCC in our PATH, and thus Meson favors that compiler toolchain over Visual Studio's. Fix this by explicitly asking Meson to use the Visual Studio toolchain. While this is only really required for GitHub Workflows, let's also pass the flag in GitLab CI so that we don't implicitly assume the toolchain that Meson is going to pick. Reported-by: Johannes Schindelin <[email protected]> Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2363346 commit 85e1d68

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ jobs:
265265
run: pip install meson ninja
266266
- name: Setup
267267
shell: pwsh
268-
run: meson setup build -Dperl=disabled -Dcredential_helpers=wincred
268+
run: meson setup build --vsenv -Dperl=disabled -Dcredential_helpers=wincred
269269
- name: Compile
270270
shell: pwsh
271271
run: meson compile -C build

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ build:msvc-meson:
164164
extends: .msvc-meson
165165
stage: build
166166
script:
167-
- meson setup build -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
167+
- meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
168168
- meson compile -C build
169169
artifacts:
170170
paths:

0 commit comments

Comments
 (0)