ci(setup-deps/windows): use vcpkg for msvc

Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
Seth Flynn 2025-05-05 13:00:20 -04:00
parent 7f78f6b85f
commit 463cf43161
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86
2 changed files with 29 additions and 0 deletions

View File

@ -25,6 +25,31 @@ runs:
arch: ${{ inputs.vcvars-arch }}
vsversion: 2022
- name: Setup vcpkg cache (MSVC)
if: ${{ inputs.msystem == '' && inputs.build-type == 'Debug' }}
shell: pwsh
env:
USERNAME: ${{ github.repository_owner }}
FEED_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
run: |
.$(vcpkg fetch nuget) `
sources add `
-Source "$env:FEED_URL" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "$env:USERNAME" `
-Password "$env:GITHUB_TOKEN"
.$(vcpkg fetch nuget) `
setapikey "$env:GITHUB_TOKEN" `
-Source "$env:FEED_URL"
Write-Output "VCPKG_BINARY_SOURCES=clear;nuget,$env:FEED_URL,readwrite" >> "$GITHUB_ENV"
- name: Setup vcpkg environment (MSVC)
if: ${{ inputs.msystem == '' }}
shell: bash
run: |
echo "CMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> "$GITHUB_ENV"
- name: Setup MSYS2 (MinGW)
if: ${{ inputs.msystem != '' }}
uses: msys2/setup-msys2@v2

View File

@ -69,6 +69,10 @@ jobs:
build:
name: Build (${{ matrix.artifact-name }})
permissions:
# Required for vcpkg binary cache
packages: write
strategy:
fail-fast: false
matrix: