Skip to content

Commit 1e7ef78

Browse files
thedavidwengkblaschke
authored andcommitted
Disable vcpkg applocal for static Windows builds to fix file-lock flake
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
1 parent bc78b7f commit 1e7ef78

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/build_windows.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ jobs:
6565
run: |
6666
if("${{ matrix.libs }}" -eq "shared") {
6767
$shared_libs = "ON"
68+
$applocal_deps = "ON"
6869
} else {
6970
$shared_libs = "OFF"
71+
# Static triplets link everything (incl. CRT) statically, so there are no DLLs to deploy.
72+
# Disabling applocal removes a proven file-lock race (MSB3073, exit 32) with zero benefit lost.
73+
$applocal_deps = "OFF"
7074
}
7175
if("${{ matrix.fslib }}" -eq "boost") {
7276
$use_boost = "ON"
@@ -100,6 +104,7 @@ jobs:
100104
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>$($runtime)" `
101105
-DCMAKE_VERBOSE_MAKEFILE=YES `
102106
-DBUILD_SHARED_LIBS="$($shared_libs)" `
107+
-DVCPKG_APPLOCAL_DEPS="$($applocal_deps)" `
103108
-DENABLE_BOOST_FILESYSTEM="$($use_boost)" `
104109
-DENABLE_CXX_INTERFACE=YES `
105110
-DBUILD_TESTING=YES `
@@ -133,9 +138,12 @@ jobs:
133138
}
134139
if("${{ matrix.libs }}" -eq "shared") {
135140
$runtime = "DLL"
141+
$applocal_deps = "ON"
136142
} else {
137143
$runtime = ""
138144
$triplet = $triplet + "-static"
145+
# Same as above: nothing to deploy for static builds, only file-lock risk.
146+
$applocal_deps = "OFF"
139147
}
140148
if("${{ matrix.runs-on }}" -eq "windows-2022") {
141149
$generator = "Visual Studio 17 2022"
@@ -151,6 +159,7 @@ jobs:
151159
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>$($runtime)" `
152160
-DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" `
153161
-DVCPKG_TARGET_TRIPLET="$($triplet)" `
162+
-DVCPKG_APPLOCAL_DEPS="$($applocal_deps)" `
154163
-DENABLE_BOOST_FILESYSTEM="$($use_boost)" `
155164
-DCMAKE_VERBOSE_MAKEFILE=ON
156165

0 commit comments

Comments
 (0)