ci: use Visual Studio for win+meson job on GitHub Workflows

In 7304bd2bc3 (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 <johannes.schindelin@gmx.de>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-03-31 10:33:11 +02:00
committed by Junio C Hamano
parent 23633466df
commit 85e1d6819f
2 changed files with 2 additions and 2 deletions

View File

@@ -265,7 +265,7 @@ jobs:
run: pip install meson ninja run: pip install meson ninja
- name: Setup - name: Setup
shell: pwsh shell: pwsh
run: meson setup build -Dperl=disabled -Dcredential_helpers=wincred run: meson setup build --vsenv -Dperl=disabled -Dcredential_helpers=wincred
- name: Compile - name: Compile
shell: pwsh shell: pwsh
run: meson compile -C build run: meson compile -C build

View File

@@ -164,7 +164,7 @@ build:msvc-meson:
extends: .msvc-meson extends: .msvc-meson
stage: build stage: build
script: script:
- meson setup build -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
- meson compile -C build - meson compile -C build
artifacts: artifacts:
paths: paths: