Author: brane
Date: Fri Jun  6 21:54:38 2025
New Revision: 1926194

URL: http://svn.apache.org/viewvc?rev=1926194&view=rev
Log:
In the Windows GitHub workflow, force the target platform and architecture
to avoid library mismatch during linking and feature checks.

* .github/workflows/windows-cmake.yml
  (SERF_WIN_PLATFORM, SERF_WIN_ARCHITECTURE): Set variables conditionally.
   Use them in the "Configure CMake" step.

Modified:
    serf/trunk/.github/workflows/windows-cmake.yml

Modified: serf/trunk/.github/workflows/windows-cmake.yml
URL: 
http://svn.apache.org/viewvc/serf/trunk/.github/workflows/windows-cmake.yml?rev=1926194&r1=1926193&r2=1926194&view=diff
==============================================================================
--- serf/trunk/.github/workflows/windows-cmake.yml (original)
+++ serf/trunk/.github/workflows/windows-cmake.yml Fri Jun  6 21:54:38 2025
@@ -34,13 +34,25 @@ jobs:
               core.exportVariable('ACTIONS_CACHE_URL', 
process.env.ACTIONS_CACHE_URL || '');
               core.exportVariable('ACTIONS_RUNTIME_TOKEN', 
process.env.ACTIONS_RUNTIME_TOKEN || '');
 
+      - name: Set build environment for x86
+        run: |
+            echo "SERF_WIN_PLATFORM=Win32" >> $GITHUB_ENV
+            echo "SERF_WIN_ARCHITECTURE=x86" >> $GITHUB_ENV
+        if: startsWith(matrix.triplet, 'x86-')
+
+      - name: Set build environment for x64
+        run: |
+            echo "SERF_WIN_PLATFORM=x64" >> $GITHUB_ENV
+            echo "SERF_WIN_ARCHITECTURE=x64" >> $GITHUB_ENV
+        if: startsWith(matrix.triplet, 'x64-')
+
       - name: Install dependencies
         run: vcpkg install --triplet ${{ matrix.triplet }} apr apr-util zlib 
openssl brotli
 
       - uses: actions/checkout@v3
 
       - name: Configure CMake
-        run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ 
matrix.build-type }} -G "${{ matrix.generator }}" 
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake 
-DAPR_ROOT=C:/vcpkg/installed/${{ matrix.triplet }} 
-DAPRUtil_ROOT=C:/vcpkg/installed/${{ matrix.triplet }} 
-DOPENSSL_ROOT_DIR=C:/vcpkg/installed/${{ matrix.triplet }} 
-DZLIB_ROOT=C:/vcpkg/installed/${{ matrix.triplet }} 
-DBrotli_ROOT=C:/vcpkg/installed/${{ matrix.triplet }}
+        run: cmake -B ${{github.workspace}}/build -G "${{ matrix.generator }}" 
-A ${{env.SERF_WIN_ARCHITECTURE}} 
-D-DCMAKE_GENERATOR_PLATFORM=${{env.SERF_WIN_PLATFORM}} 
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake 
-DAPR_ROOT=C:/vcpkg/installed/${{ matrix.triplet }} 
-DAPRUtil_ROOT=C:/vcpkg/installed/${{ matrix.triplet }} 
-DOPENSSL_ROOT_DIR=C:/vcpkg/installed/${{ matrix.triplet }} 
-DZLIB_ROOT=C:/vcpkg/installed/${{ matrix.triplet }} 
-DBrotli_ROOT=C:/vcpkg/installed/${{ matrix.triplet }}
 
       - name: Build
         run: cmake --build ${{github.workspace}}/build --config ${{ 
matrix.build-type }}


Reply via email to