Skip to content

Commit 7967fe5

Browse files
committed
ci: Switch to dynamic library linkage in native Windows job
This change significantly reduces the vcpkg binary cache size, improving CI caching performance.
1 parent 639279e commit 7967fe5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
157157
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
158158

159-
windows-native:
159+
windows-native-dll:
160160
name: ${{ matrix.job-name }}
161161
runs-on: windows-2022
162162

@@ -202,7 +202,6 @@ jobs:
202202
- name: Using vcpkg with MSBuild
203203
run: |
204204
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
205-
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake"
206205
# Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
207206
sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
208207
@@ -221,7 +220,7 @@ jobs:
221220

222221
- name: Generate build system
223222
run: |
224-
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
223+
cmake -B build --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
225224
226225
- name: Save vcpkg binary cache
227226
uses: actions/cache/save@v4
@@ -238,6 +237,8 @@ jobs:
238237
- name: Run test suite
239238
if: matrix.job-type == 'standard'
240239
working-directory: build
240+
env:
241+
QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins'
241242
run: |
242243
ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release
243244

0 commit comments

Comments
 (0)