aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/windows.yml26
1 files changed, 22 insertions, 4 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 4814ffa..27e6633 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -22,8 +22,15 @@ jobs:
22 fail-fast: false 22 fail-fast: false
23 matrix: 23 matrix:
24 os: ["windows-2022", "windows-2025"] 24 os: ["windows-2022", "windows-2025"]
25 arch: ["ARM64", "x64", "Win32"] 25 arch: ["x64", "Win32"]
26 shared: ["ON", "OFF"] 26 shared: ["ON", "OFF"]
27 include:
28 - os: "windows-11-arm"
29 arch: "ARM64"
30 shared: "ON"
31 - os: "windows-11-arm"
32 arch: "ARM64"
33 shared: "OFF"
27 steps: 34 steps:
28 - name: "Checkout repository" 35 - name: "Checkout repository"
29 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 36 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -53,12 +60,24 @@ jobs:
53 if ($LASTEXITCODE -ne 0) { 60 if ($LASTEXITCODE -ne 0) {
54 throw "IO::Socket::SSL::Utils is unavailable" 61 throw "IO::Socket::SSL::Utils is unavailable"
55 } 62 }
63
64 $vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
65 $component = if ('${{ matrix.arch }}' -eq 'ARM64') {
66 'Microsoft.VisualStudio.Component.VC.Tools.ARM64'
67 } else {
68 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
69 }
70 $version = & $vswhere -latest -products * -requires $component -property installationVersion
71 if (-not $version) {
72 throw "No Visual Studio installation with $component found"
73 }
74 $major = $version.Split('.')[0]
56 $generator = cmake --help | 75 $generator = cmake --help |
57 Select-String '^\s*\*?\s*(Visual Studio \d+ \d+)' | 76 Select-String "^\s*\*?\s*(Visual Studio $major \d+)" |
58 Select-Object -First 1 | 77 Select-Object -First 1 |
59 ForEach-Object { $_.Matches[0].Groups[1].Value } 78 ForEach-Object { $_.Matches[0].Groups[1].Value }
60 if (-not $generator) { 79 if (-not $generator) {
61 throw "No Visual Studio CMake generator found" 80 throw "No CMake generator found for Visual Studio $major"
62 } 81 }
63 Write-Host "Using generator: $generator" 82 Write-Host "Using generator: $generator"
64 cmake -Bbuild -G "$generator" -A ${{ matrix.arch }} -D BUILD_SHARED_LIBS=${{ matrix.shared }} -D CMAKE_INSTALL_PREFIX=../local "-DPERL_EXECUTABLE=$perl" 83 cmake -Bbuild -G "$generator" -A ${{ matrix.arch }} -D BUILD_SHARED_LIBS=${{ matrix.shared }} -D CMAKE_INSTALL_PREFIX=../local "-DPERL_EXECUTABLE=$perl"
@@ -68,7 +87,6 @@ jobs:
68 run: cmake --build build --config Release 87 run: cmake --build build --config Release
69 88
70 - name: "Test" 89 - name: "Test"
71 if: matrix.arch != 'ARM64'
72 shell: cmd 90 shell: cmd
73 run: ctest --test-dir build -C Release --output-on-failure 91 run: ctest --test-dir build -C Release --output-on-failure
74 92