From: Ivan Zhakov Date: Tue, 2 Jun 2026 10:49:33 +0000 (+0000) Subject: Fix Windows GHA build. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=767d9550e7c9036fa1604c15f975f7c590d95752;p=thirdparty%2Fapache%2Fhttpd.git Fix Windows GHA build. * .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 --- diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 55c325602d..b830668d74 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 }}