svn commit: r1926628 - /apr/apr/trunk/.github/workflows/windows.yml
| Newsgroups | gmane.comp.apache.apr.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ivan
Date: Sat Jun 21 19:08:50 2025
New Revision: 1926628
URL: http://svn.apache.org/viewvc?rev=1926628&view=rev
Log:
* .github/workflows/windows.yml: Save VS DevEnv environment to GITHUB_ENV to
avoid calling VsDevCmd.bat script on all steps.
Modified:
apr/apr/trunk/.github/workflows/windows.yml
Modified: apr/apr/trunk/.github/workflows/windows.yml
URL: http://svn.apache.org/viewvc/apr/apr/trunk/.github/workflows/windows.yml?rev=1926628&r1=1926627&r2=1926628&view=diff
==============================================================================
--- apr/apr/trunk/.github/workflows/windows.yml (original)
+++ apr/apr/trunk/.github/workflows/windows.yml Sat Jun 21 19:08:50 2025
@@ -127,6 +127,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
+ - name: Prepare Environment
+ shell: pwsh
+ run: |
+ $root = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
+ Import-Module "$root\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
+ Enter-VsDevShell -VsInstallPath $root -DevCmdArguments "-arch=${{ matrix.arch }}"
+
+ ls env: | foreach { "$($_.Name)=$($_.Value)" >> $env:GITHUB_ENV }
+
- name: Install dependencies
if: ${{ matrix.packages != '' }}
run: vcpkg install --triplet ${{ matrix.triplet }} ${{ matrix.packages }}
@@ -138,7 +147,6 @@ jobs:
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
shell: cmd
run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cmake -B ${{github.workspace}}/build ^
-G "${{ matrix.generator }}" ^
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ^
@@ -153,7 +161,6 @@ jobs:
# Build your program with the given configuration
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 }}
- name: Test