From 7967fe5bfd3e881353db9a4428ea913ce4ea15a5 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 2 Apr 2025 17:47:10 +0100 Subject: [PATCH] ci: Switch to dynamic library linkage in native Windows job This change significantly reduces the vcpkg binary cache size, improving CI caching performance. --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ef7bd78e9a..0cad85f4307 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -156,7 +156,7 @@ jobs: # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }} - windows-native: + windows-native-dll: name: ${{ matrix.job-name }} runs-on: windows-2022 @@ -202,7 +202,6 @@ jobs: - name: Using vcpkg with MSBuild run: | echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake" - echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake" # Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0. sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake" @@ -221,7 +220,7 @@ jobs: - name: Generate build system run: | - cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }} + cmake -B build --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }} - name: Save vcpkg binary cache uses: actions/cache/save@v4 @@ -238,6 +237,8 @@ jobs: - name: Run test suite if: matrix.job-type == 'standard' working-directory: build + env: + QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins' run: | ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release