]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix Windows GHA build.
authorIvan Zhakov <ivan@apache.org>
Tue, 2 Jun 2026 10:49:33 +0000 (10:49 +0000)
committerIvan Zhakov <ivan@apache.org>
Tue, 2 Jun 2026 10:49:33 +0000 (10:49 +0000)
* .github/workflows/windows.yml
  (): Use Enter-VsDevShell to find VS installation and save
   environment variables to GITHUB_ENV.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1934871 13f79535-47bb-0310-9956-ffa450edef68

.github/workflows/windows.yml

index 55c325602d4666b0c6fa2d82bce41cb7a2dedd96..b830668d74be335c2c3cb7f4bc04eb51b9e60776 100644 (file)
@@ -20,7 +20,6 @@ on:
 
 jobs:
   build:
-    if: false
     strategy:
       fail-fast: false
       matrix:
@@ -37,6 +36,14 @@ jobs:
     env: 
       VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
     steps:
+      - name: Prepare Environment
+        run: |
+          $root = &(Join-Path ${env:ProgramFiles(x86)} "\Microsoft Visual Studio\Installer\vswhere.exe") -property installationpath -latest
+          Import-Module (Join-Path $root "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
+          Enter-VsDevShell -VsInstallPath $root -DevCmdArguments "-arch=${{ matrix.arch }}"
+
+          ls env: | foreach { "$($_.Name)=$($_.Value)" >> $env:GITHUB_ENV }
+
       - name: Export GitHub Actions cache environment variables
         uses: actions/github-script@v7
         with:
@@ -52,7 +59,6 @@ jobs:
       - name: Configure CMake
         shell: cmd
         run: |
-            call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
             cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ^
                 -G "${{ matrix.generator }}" ^
                 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ^
@@ -62,5 +68,4 @@ jobs:
       - name: Build
         shell: cmd
         run: |
-            call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
             cmake --build ${{github.workspace}}/build --config ${{ matrix.build-type }}