build: The vcpkg tool has introduced a proper way to use manifests #19960

pull sipsorcery wants to merge 1 commits into bitcoin:master from sipsorcery:vcpkg_manifest changing 6 files +38 −30
  1. sipsorcery commented at 7:11 pm on September 15, 2020: member

    The vcpkg tool has introduced a proper way to use manifests. This PR replaces the custom text file mechanism with the new manifest approach.

    It is planned that vckpg manifests will include the ability to version dependencies in the future. Dependency versions would solve a number of issues that currently require workarounds with the appveyor CI.

  2. DrahtBot added the label Docs on Sep 15, 2020
  3. DrahtBot added the label Tests on Sep 15, 2020
  4. sipsorcery force-pushed on Sep 15, 2020
  5. fanquake commented at 10:06 pm on September 15, 2020: member
    Concept ACK
  6. fanquake added the label Windows on Sep 15, 2020
  7. sipsorcery renamed this:
    WIP: The vcpkg tool has introduced a proper way to use manifests
    Appveyor CI: The vcpkg tool has introduced a proper way to use manifests
    on Sep 15, 2020
  8. hebasto commented at 9:43 am on September 19, 2020: member
    Concept ACK.
  9. in build_msvc/vcpkg.json:3 in 2358c14ebb outdated
    0@@ -0,0 +1,19 @@
    1+{
    2+  "name": "bitcoin-core",
    3+  "version-string": "0.20.99",
    


    MarcoFalke commented at 9:54 am on September 19, 2020:
    Does this need to be bumped at the same time the other version string is bumped?

    MarcoFalke commented at 10:09 am on September 19, 2020:

    “End users can set these fields to whatever they want, but the name must be all lowercase characters.” From the Link in OP

    So I’d suggest to set this to something not entangled with the bitcoin core version. Maybe just "1"?


    sipsorcery commented at 10:12 am on September 19, 2020:
    You beat me to it and as you’ve mentioned it’s arbitrary. The version field (https://vcpkg.readthedocs.io/en/latest/specifications/manifests/) seems to be intended for use when creating vcpkg port files rather than consuming them. It is a mandatory field though so has to be set to something. I’ve gone ahead and set it to 1 to avoid any perception it relates to any other release or version numbers.
  10. MarcoFalke removed the label Docs on Sep 19, 2020
  11. MarcoFalke removed the label Tests on Sep 19, 2020
  12. MarcoFalke added the label Build system on Sep 19, 2020
  13. MarcoFalke renamed this:
    Appveyor CI: The vcpkg tool has introduced a proper way to use manifests
    build: The vcpkg tool has introduced a proper way to use manifests
    on Sep 19, 2020
  14. MarcoFalke commented at 10:02 am on September 19, 2020: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #19077 (wallet: Add sqlite as an alternative wallet database and use it for new descriptor wallets by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  15. in build_msvc/README.md:16 in d52b53e559 outdated
    11@@ -12,10 +12,9 @@ Quick Start
    12 The minimal steps required to build Bitcoin Core with the msbuild toolchain are below. More detailed instructions are contained in the following sections.
    13 
    14 ```
    15-vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion
    16-vcpkg integrate install
    17+cd build_msvc
    18 py -3 build_msvc\msvc-autogen.py
    


    fanquake commented at 11:27 am on September 19, 2020:
    0py -3 msvc-autogen.py
    
  16. in .appveyor.yml:27 in 8c95190814 outdated
    31-      Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
    32-      .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
    33-      Write-Host "vcpkg packages installed successfully."
    34-      .\vcpkg integrate install
    35-      cd "$env:APPVEYOR_BUILD_FOLDER"
    36+      cd $env:APPVEYOR_BUILD_FOLDER
    


    MarcoFalke commented at 8:23 am on September 20, 2020:
    Is it needed to remove the "?

    sipsorcery commented at 8:24 am on September 24, 2020:
    No, reverted, thx.
  17. MarcoFalke approved
  18. MarcoFalke commented at 8:24 am on September 20, 2020: member
    Please squash and format the commit message with subject line and body
  19. in build_msvc/README.md:30 in 8c95190814 outdated
    33-- Boost
    34-- DoubleConversion
    35-- libevent
    36-- Qt5
    37-- ZeroMQ
    38+The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are listed in the `build_msvc/vcpkg.json` file. The `msbuild` project files are configured to automatically install the `vcpg` dependencies.
    


    fanquake commented at 8:26 am on September 20, 2020:
    0The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are listed in the `build_msvc/vcpkg.json` file. The `msbuild` project files are configured to automatically install the `vcpkg` dependencies.
    

    sipsorcery commented at 8:24 am on September 24, 2020:
    Thx, fixed.
  20. sipsorcery force-pushed on Sep 24, 2020
  21. MarcoFalke approved
  22. MarcoFalke commented at 1:33 pm on September 24, 2020: member
    Approach ACK b92a074570e06b07fdd87a8ed03d1cf7139c7407
  23. fanquake commented at 12:38 pm on September 29, 2020: member

    This looks good now. However can you follow up with:

    Please squash and format the commit message with subject line and body

  24. Update msvc build to use new vcpkg manifest
    The vcpkg tool has introduced a proper way to use manifests, https://devblogs.microsoft.com/cppblog/vcpkg-accelerate-your-team-development-environment-with-binary-caching-and-manifests/. This PR replaces the custom text file mechanism with the new manifest approach.
    
    It is planned that vckpg manifests will include the ability to version dependencies in the future. Dependency versions would solve a number of issues that currently require workarounds with the appveyor CI.
    
    Set vcpkg manifest version to 1 to avoid any perception it's related to any release or other version numbering.
    712f95d332
  25. sipsorcery force-pushed on Sep 29, 2020
  26. sipsorcery commented at 12:51 pm on September 29, 2020: member
    I’ve adjusted my commit message to have a better lead (subject) line. Was that the problem?
  27. fanquake approved
  28. fanquake commented at 1:13 pm on September 29, 2020: member

    ACK 712f95d3324d02310dd468e7bfd1e1b0df432e77 - This is a nice simplification. I tested this in a Windows VM; packages were downloaded and installed automatically as required:

    vcpkg

    I’ve adjusted my commit message to have a better lead (subject) line. Was that the problem?

    Thanks. Yes it was.

    One other thought. Is there any Appveyor related cache me might need to nuke to make sure this is really working there as expected?

  29. in .appveyor.yml:14 in 712f95d332
    10@@ -11,25 +11,19 @@ environment:
    11   QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
    12   QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
    13   VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
    14-  VCPKG_COMMIT_ID: 'f3f329a048eaff759c1992c458f2e12351486bc7'
    15+  VCPKG_COMMIT_ID: '13590753fec479c5b0a3d48dd553dde8d49615fc'
    


    hebasto commented at 1:14 pm on September 29, 2020:

    sipsorcery commented at 1:27 pm on September 29, 2020:
    No good reason. I’ve always built from the vcpkg master branch, checked that the dependencies work and used that commit. The vcpkg repo is a bit different to code only repos in that commits are made for the library port configs as well as the source code use to build the vcpkg executable.
  30. in build_msvc/.gitignore:27 in 712f95d332
    23@@ -24,3 +24,4 @@ libtest_util/libtest_util.vcxproj
    24 */Win32
    25 libbitcoin_qt/QtGeneratedFiles/*
    26 test_bitcoin-qt/QtGeneratedFiles/*
    27+vcpkg_installed
    


    hebasto commented at 1:18 pm on September 29, 2020:
    nit: add EOL?
  31. in build_msvc/README.md:30 in 712f95d332
    33-- Boost
    34-- DoubleConversion
    35-- libevent
    36-- Qt5
    37-- ZeroMQ
    38+The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are listed in the `build_msvc/vcpkg.json` file. The `msbuild` project files are configured to automatically install the `vcpkg` dependencies.
    


    hebasto commented at 1:23 pm on September 29, 2020:
    0The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are listed in the [`build_msvc/vcpkg.json`](https://github.com/bitcoin/bitcoin/tree/master/build_msvc/vcpkg.json) file. The `msbuild` project files are configured to automatically install the `vcpkg` dependencies.
    
  32. sipsorcery commented at 1:23 pm on September 29, 2020: member

    One other thought. Is there any Appveyor related cache me might need to nuke to make sure this is really working there as expected?

    Nope. All appveyor caching has already been removed. Predominantly due to nasty issues with the cached vcpkg dependencies getting messed up between different PR branches.

    With this new manifest approach it might be feasible to re-introduce a cache of the vcpkg dependencies at some point, and save 20mins per build, but best to leave that until the manifest change is bedded down.

  33. in build_msvc/vcpkg.json:19 in 712f95d332
    14+      "name": "libevent",
    15+      "features": ["thread"]
    16+    },
    17+    "zeromq"
    18+  ]
    19+}
    


    hebasto commented at 1:24 pm on September 29, 2020:
    Add EOL?
  34. hebasto commented at 1:27 pm on September 29, 2020: member
  35. MarcoFalke merged this on Sep 30, 2020
  36. MarcoFalke closed this on Sep 30, 2020

  37. sidhujag referenced this in commit 495336d826 on Sep 30, 2020
  38. hebasto commented at 4:25 pm on October 2, 2020: member
    @sipsorcery Could you look into the recent “error MSB3073” AppVeyor fails?
  39. sipsorcery commented at 6:15 pm on October 2, 2020: member
    So far haven’t found anything likely that changed around 5 hours ago when the builds started failing. Will keep digging.
  40. MarcoFalke commented at 5:22 pm on October 28, 2020: member
    This may have increased the average msbuild time (at least on appveyor)
  41. sipsorcery commented at 10:08 am on October 29, 2020: member

    @MarcoFalke yes I see what you mean. It seems that build takes approximately 10 minutes longer subsequent to the change in this PR.

    One possibility is the vcpkg dependencies may now be being built for both debug and release. Previously the line below restricted them to only release. I’ll do some testing.

    0Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
    
  42. sipsorcery commented at 10:54 am on November 25, 2020: member

    Finally got around to running the build tests to compare the build durations using the original vcpkg install mechanism and the new vcpkg manifest mechanism.

    The original way seems to be a few minutes faster but not a smoking gun for a 10 minute increase. Perhaps the manifest + the removal of the set(VCPKG_BUILD_TYPE release) could account for it. The VCPKG_BUILD_TYPE setting should be put back and I’ll create a PR for that.

    Build runs with vcpkg installed from command line: Average duration approx. 25 minutes.

     0Run 1:
     1c:\Tools\vcpkg>vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-process boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion sqlite3 -> 14:12
     2c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
     3c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 10:37
     4
     5Run 2:
     6c:\Tools\vcpkg>vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-process boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion sqlite3 -> 16:10
     7c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
     8c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 09:40
     9
    10Run 3:
    11c:\Tools\vcpkg>vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-process boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion sqlite3 -> 15:29
    12c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
    13c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 09:36
    14
    15Run 4:
    16c:\Tools\vcpkg>vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-process boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion sqlite3 -> 15:12
    17c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
    18c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 09:39
    

    Build runs with vcpkg installed using manifest mechanism: Average duration approx. 28 minutes.

     0Run 1:
     1c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
     2c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 26:58
     3
     4Run 2:
     5c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
     6c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 27:00
     7
     8Run 3:
     9c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
    10c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 27:15
    11
    12Run 4:
    13c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
    14c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 30:31
    15
    16Run 5:
    17c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
    18c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 30:31
    19
    20Run 6:
    21c:\Dev\github\sipsorcery_bitcoin\build_msvc>msvc-autogen.py
    22c:\Dev\github\sipsorcery_bitcoin\build_msvc>msbuild /m bitcoin.sln /p:Configuration=Release /p:Platform=x64 /t:clean,build -> 24:51
    
  43. sipsorcery referenced this in commit fa18e7cbc5 on Nov 25, 2020
  44. MarcoFalke referenced this in commit 19b8071eae on Nov 25, 2020
  45. sidhujag referenced this in commit a985056063 on Nov 25, 2020
  46. MarcoFalke referenced this in commit e7b53d4721 on Dec 16, 2020
  47. hebasto referenced this in commit c80c8c250b on Dec 16, 2020
  48. laanwj referenced this in commit ac125e960f on Jan 2, 2021
  49. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me