diff options
| author | Theo Buehler <tb@openbsd.org> | 2026-06-15 03:22:54 +0200 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2026-06-15 03:22:54 +0200 |
| commit | e8c2190ea366d9b3761fd040de14e14110a87132 (patch) | |
| tree | fe7021295250d6632d46bf9f95078f1411cf1821 | |
| parent | dff64021e5c4f19756ad4e3fd24dab9c0a81befc (diff) | |
| parent | ff8452b2697f8b0c9cb65b7814a1573ef9bf54b8 (diff) | |
| download | portable-e8c2190ea366d9b3761fd040de14e14110a87132.tar.gz portable-e8c2190ea366d9b3761fd040de14e14110a87132.tar.bz2 portable-e8c2190ea366d9b3761fd040de14e14110a87132.zip | |
Land #1301 - detect VS CMake Generator
| -rw-r--r-- | .github/workflows/windows.yml | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index cdfdd25..5b16c1c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml | |||
| @@ -13,7 +13,7 @@ concurrency: | |||
| 13 | 13 | ||
| 14 | jobs: | 14 | jobs: |
| 15 | test: | 15 | test: |
| 16 | name: "${{ matrix.os }}/${{ matrix.arch }} (${{ matrix.generator }}${{ matrix.shared == 'ON' && ', shared' || '' }})" | 16 | name: "${{ matrix.os }}/${{ matrix.arch }} (${{ matrix.shared == 'ON' && 'shared' || 'static' }})" |
| 17 | runs-on: "${{ matrix.os }}" | 17 | runs-on: "${{ matrix.os }}" |
| 18 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} | 18 | if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} |
| 19 | permissions: | 19 | permissions: |
| @@ -24,12 +24,6 @@ jobs: | |||
| 24 | os: ["windows-2022", "windows-2025"] | 24 | os: ["windows-2022", "windows-2025"] |
| 25 | arch: ["ARM64", "x64", "Win32"] | 25 | arch: ["ARM64", "x64", "Win32"] |
| 26 | shared: ["ON", "OFF"] | 26 | shared: ["ON", "OFF"] |
| 27 | include: | ||
| 28 | - os: "windows-2022" | ||
| 29 | generator: "Visual Studio 17 2022" | ||
| 30 | - os: "windows-2025" | ||
| 31 | # XXX - use appropriate value | ||
| 32 | generator: "Visual Studio 17 2022" | ||
| 33 | steps: | 27 | steps: |
| 34 | - name: "Checkout repository" | 28 | - name: "Checkout repository" |
| 35 | uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | 29 | uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| @@ -50,8 +44,17 @@ jobs: | |||
| 50 | run: ./update.sh | 44 | run: ./update.sh |
| 51 | 45 | ||
| 52 | - name: "Configure CMake" | 46 | - name: "Configure CMake" |
| 53 | shell: cmd | 47 | shell: pwsh |
| 54 | run: cmake -Bbuild -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -D BUILD_SHARED_LIBS=${{ matrix.shared }} -D CMAKE_INSTALL_PREFIX=../local | 48 | run: | |
| 49 | $generator = cmake --help | | ||
| 50 | Select-String '^\s*\*?\s*(Visual Studio \d+ \d+)' | | ||
| 51 | Select-Object -First 1 | | ||
| 52 | ForEach-Object { $_.Matches[0].Groups[1].Value } | ||
| 53 | if (-not $generator) { | ||
| 54 | throw "No Visual Studio CMake generator found" | ||
| 55 | } | ||
| 56 | Write-Host "Using generator: $generator" | ||
| 57 | cmake -Bbuild -G "$generator" -A ${{ matrix.arch }} -D BUILD_SHARED_LIBS=${{ matrix.shared }} -D CMAKE_INSTALL_PREFIX=../local | ||
| 55 | 58 | ||
| 56 | - name: "Build" | 59 | - name: "Build" |
| 57 | shell: cmd | 60 | shell: cmd |
