GHA CI: simplify vcpkg commands

This commit is contained in:
Chocobo1 2023-09-04 16:49:44 +08:00
parent 5b57abc7d8
commit 479639162d

View file

@ -44,26 +44,13 @@ jobs:
- name: Install dependencies from vcpkg
run: |
# tell vcpkg to only build Release variants of the dependencies
New-Item `
-Path "${{ github.workspace }}" `
-Name "triplets_overlay" `
-ItemType Directory
Copy-Item `
"${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake" `
"${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake"
Add-Content `
"${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake" `
-Value "set(VCPKG_BUILD_TYPE release)"
# clear buildtrees after each package installation to reduce disk space requirements
$packages = `
"openssl:x64-windows-static-release",
"zlib:x64-windows-static-release"
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
--overlay-triplets="${{ github.workspace }}/triplets_overlay" `
--no-dry-run
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install `
--overlay-triplets="${{ github.workspace }}/triplets_overlay" `
--clean-after-build `
$packages