Skip to content

GHA: disable VCPKG_APPLOCAL_DEPS to avoid flaky CI failures - #2114

Closed
vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:vcpkg-flake
Closed

vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:vcpkg-flake

Conversation

@vszakats

@vszakats vszakats commented Jun 22, 2026 •

Copy link
Copy Markdown
Member

During last week MSVC GHA jobs started failing on occasion. Log clues.
are "deploying dependencies", "The process cannot access the file
because it is being used by another process.", and "C:\vcpkg\vcpkg.exe
z-applocal". Turns out the latter command has been introduced recently.
Then two weeks ago vcpkg's cmake script switched to it by default for
the VCPKG_APPLOCAL_DEPS option. This option is enabled by default.
It's vcpkg's implementation of the DLL copying feature, which I just
dropped from libssh2 (suspecting it as a root cause for these failures).

Fix by disabling this option, since libssh2 CI jobs don't need it.

Examples, with shared libssh2:
combined with WINCNG:
Before: https://github.com/libssh2/libssh2/actions/runs/27901568257/job/82562736781 (229 steps)
After: https://github.com/libssh2/libssh2/actions/runs/27924142060/job/82623203836 (179 steps)
combined with OpenSSL:
Before: https://github.com/libssh2/libssh2/actions/runs/27902733625/job/82565870012 (229 steps)
After: https://github.com/libssh2/libssh2/actions/runs/27924142060/job/82623203795 (179 steps)

Fixing:

  D:/a/libssh2/libssh2/bld/tests/Release/test_read.exe: message: deploying dependencies
  The process cannot access the file because it is being used by another process.
  sftp_RW_nonblock.vcxproj -> D:\a\libssh2\libssh2\bld\example\Release\sftp_RW_nonblock.exe
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "setlocal [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: C:\vcpkg\vcpkg.exe z-applocal --target-binary=D:/a/libssh2/libssh2/bld/tests/Release/test_auth_pubkey_ok_ecdsa_signed.exe --installed-bin-dir=C:/vcpkg/installed/x64-windows/bin [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited with code 32. [D:\a\libssh2\libssh2\bld\tests\test_auth_pubkey_ok_ecdsa_signed.vcxproj]

Ref: https://github.com/libssh2/libssh2/actions/runs/27922679181/job/82619051657?pr=2113

Refs:
1e5e292
https://devblogs.microsoft.com/cppblog/whats-new-in-vcpkg-apr-2026/
https://github.com/microsoft/vcpkg/blame/a0b1c8d3a477c1cb4813d8e127a56961707ca42b/scripts/buildsystems/vcpkg.cmake#L48-L50
https://github.com/microsoft/vcpkg/blob/a0b1c8d3a477c1cb4813d8e127a56961707ca42b/scripts/buildsystems/vcpkg.cmake#L622
microsoft/vcpkg@b8ab03c
microsoft/vcpkg#52315

Bug: #2101 (comment)
Follow-up to 3b730f2 #2101

@vszakats vszakats changed the title GHA: try fixing flaky MSVC ailures GHA: try fixing flaky MSVC failures Jun 22, 2026
@vszakats vszakats changed the title GHA: try fixing flaky MSVC failures GHA: disable VCPKG_APPLOCAL_DEPS to avoid flaky CI failures Jun 22, 2026
@vszakats vszakats closed this in 30a0484 Jun 22, 2026
@vszakats
vszakats deleted the vcpkg-flake branch June 22, 2026 02:08
vszakats added a commit to curl/curl that referenced this pull request Jun 26, 2026
Add the necessary directory to `PATH` instead.

To disable a vcpkg feature (auto-copying DLL dependencies next to the
build targets) that was causing CI flakiness in the libssh2 repository.
In curl it currently cannot cause flakiness because targets (with DLL
dependencies) reside in separate directories.

AFAIU this vcpkg feature has been present and enabled by default for
a long time, but only a recent update made it visible in the log and
flaky at the same time, due to switching implementation.

This patch removes log noise and potential issues, improves efficiency,
and saves disk space: 74MB -> 71 in UWP, and 69MB -> 65 in the arm64 job.
Time saving is negligible with current jobs.

Refs:
libssh2/libssh2#2114
libssh2/libssh2@30a0484
microsoft/vcpkg#52315
https://learn.microsoft.com/vcpkg/reference/installation-tree-layout

Closes #22189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant