Use MSVC in GitHub Actions
GitHub Actions using MSVC in the past might have used the msvc-dev-cmd action, but as of this writing it was last updated in 2023 and giving deprecation warnings. An alternative without needing an Action was based on libass project:
steps:
# from https://github.com/libass/libass/blob/0.17.5/.github/workflows/meson.yml#L118-L125
- name: Setup MSVC
run: |
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsPath = & $vswhere -latest -products * -property installationPath
if (-not $vsPath) { throw "Could not find a Visual Studio installation" }
"VS=$vsPath"
"VS=$vsPath" >> $env:GITHUB_ENVThis works for ARM64 and x64 builds, example