Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,38 @@ jobs:
run: exit 1
windows_msvc:
runs-on: windows-latest
env:
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\vcpkg-cache,readwrite"
steps:
- uses: actions/checkout@v6

- uses: ilammy/msvc-dev-cmd@v1

- name: Compute vcpkg cache key
id: vcpkg-key
shell: pwsh
run: |
$commit = git -C "$env:VCPKG_INSTALLATION_ROOT" rev-parse --short HEAD
"key=vcpkg-${{ runner.os }}-$env:ImageVersion-$commit" >> $env:GITHUB_OUTPUT

- name: Cache vcpkg binaries
uses: actions/cache@v6
with:
path: ${{ github.workspace }}/vcpkg-cache
key: ${{ steps.vcpkg-key.outputs.key }}
restore-keys: vcpkg-${{ runner.os }}-

- name: Install dependencies
run: |
vcpkg install gettext libiconv libcsv libxlsxwriter zlib --triplet x64-windows
vcpkg integrate install

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v3

- name: Fix library filename and paths for MSVC
shell: pwsh
run: |
$libDir = "C:\vcpkg\installed\x64-windows\lib"
$libDir = "$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\lib"

if (Test-Path "$libDir\iconv.lib") {
Copy-Item "$libDir\iconv.lib" "$libDir\libiconv.lib" -Force
}
Expand Down Expand Up @@ -160,8 +177,6 @@ jobs:

- name: Test
shell: pwsh
env:
PATH: C:\vcpkg\installed\x64-windows\bin;${{ env.PATH }}
run: |
# pwsh only fails the step on the last command's exit code, so
# check each executable explicitly
Expand Down
Loading