Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Nov 24, 2023

This PR is an alternative to #28905 and reverts it.

To avoid toolset version incompatibilities, which result in errors like this:

LINK : fatal error C1900: Il mismatch between 'P1' version '20230904' and 'P2' version '20221215' [D:\a\bitcoin\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
LINK : fatal error LNK1257: code generation failed [D:\a\bitcoin\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
LINK : fatal error LNK1327: failure during running link.exe [D:\a\bitcoin\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]

it is enough to set it explicitly in the vcpkg triplet file (see the second commit). The VCToolsVersion environment variable is set by the ilammy/msvc-dev-cmd action.

Please note that the #28905 is not optimal:

I guess this is something we'll just have to maintain forever? That's a shame, because it also adds ~30% runtime to this CI job.

The GHA VS installation includes its own vcpkg package manager, which is
available since VS 17.6. This change avoids any ambiguity about which
copy of vcpkg we run.
This change avoids toolset incompatibilities that cause linker errors.
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 24, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK pablomartin4btc
Stale ACK sipsorcery

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Nov 24, 2023
Copy link
Member

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 70100f8 since I've reviewed to be reverted #28905.

@sipsorcery
Copy link
Contributor

Does the CI job still cache the vcpkg dependencies? Will this PR still work if there a minor version update on the build image?

@hebasto
Copy link
Member Author

hebasto commented Nov 25, 2023

Does the CI job still cache the vcpkg dependencies?

It does.

Will this PR still work if there a minor version update on the build image?

I've added the toolset version to the cache key:

key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'toolset_version', 'build_msvc/vcpkg.json') }}

so the cache will be invalidated if it is changed.

@sipsorcery
Copy link
Contributor

sipsorcery commented Nov 25, 2023

utACK 4335e55.

utACK 70100f8.

@DrahtBot DrahtBot requested a review from sipsorcery November 25, 2023 19:54
@hebasto
Copy link
Member Author

hebasto commented Nov 25, 2023

@sipsorcery

utACK 4335e55.

Wrong hash?

:)

@hebasto
Copy link
Member Author

hebasto commented Nov 27, 2023

cc @maflcko @fanquake

@maflcko
Copy link
Member

maflcko commented Nov 27, 2023

Seems fine to do this, if this makes CI faster and there are no major downsides

@fanquake fanquake merged commit c1b7332 into bitcoin:master Nov 28, 2023
@hebasto hebasto deleted the 231124-toolset branch November 28, 2023 10:55
@bitcoin bitcoin locked and limited conversation to collaborators Nov 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants