diff --git a/.github/workflows/call-build-windows.yaml b/.github/workflows/call-build-windows.yaml index 1b8602460c9..993868c9e4b 100644 --- a/.github/workflows/call-build-windows.yaml +++ b/.github/workflows/call-build-windows.yaml @@ -72,7 +72,7 @@ jobs: shell: bash call-build-windows-package: - runs-on: windows-latest + runs-on: ${{ matrix.config.os }} environment: ${{ inputs.environment }} needs: - call-build-windows-get-meta @@ -85,16 +85,19 @@ jobs: cmake_additional_opt: "" vcpkg_triplet: x86-windows-static cmake_version: "3.31.6" + os: windows-latest - name: "Windows 64bit" arch: x64 cmake_additional_opt: "" vcpkg_triplet: x64-windows-static cmake_version: "3.31.6" + os: windows-latest - name: "Windows 64bit (Arm64)" arch: amd64_arm64 cmake_additional_opt: "-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_PROCESSOR=ARM64" vcpkg_triplet: arm64-windows-static cmake_version: "3.31.6" + os: windows-11-arm permissions: contents: read # Default environment variables can be overridden below. To prevent library pollution - without this other random libraries may be found on the path leading to failures. @@ -204,6 +207,47 @@ jobs: with: args: install gzip nsis -y + - name: Get WiX Toolset w/ chocolatey + if: ${{ matrix.config.arch == 'amd64_arm64' }} + uses: crazy-max/ghaction-chocolatey@dff3862348493b11fba2fbc49147b6d2dfe09b66 # v4.0.0 + with: + args: install wixtoolset -y + + - name: Export WiX Toolset path + if: ${{ matrix.config.arch == 'amd64_arm64' }} + run: | + $wix = [Environment]::GetEnvironmentVariable("WIX", "Machine") + if (-not $wix) { + $wix = [Environment]::GetEnvironmentVariable("WIX", "Process") + } + if (-not $wix) { + $candidates = @( + "${env:ProgramFiles(x86)}", + "${env:ProgramFiles}" + ) | Where-Object { $_ -and (Test-Path $_) } + foreach ($candidate in $candidates) { + $wix = Get-ChildItem -Path $candidate -Directory -Filter "WiX Toolset v*" | + Sort-Object Name -Descending | + Select-Object -First 1 -ExpandProperty FullName + if ($wix) { + break + } + } + } + if (-not $wix) { + throw "WiX Toolset installation path could not be located" + } + + $wixBin = Join-Path $wix "bin" + if (!(Test-Path (Join-Path $wixBin "candle.exe")) -or + !(Test-Path (Join-Path $wixBin "light.exe"))) { + throw "WiX Toolset candle.exe/light.exe could not be located in $wixBin" + } + + "WIX=$wix" | Out-File -FilePath $env:GITHUB_ENV -Append + $wixBin | Out-File -FilePath $env:GITHUB_PATH -Append + shell: pwsh + # http://man7.org/linux/man-pages/man1/date.1.html - name: Get Date id: get-date