ci: AppVeyor fixes for Visual Studio 2019 16.8.1 image #20506

pull sipsorcery wants to merge 2 commits into bitcoin:master from sipsorcery:msvc-no-optimise changing 5 files +31 −52
  1. sipsorcery commented at 12:45 PM on November 26, 2020: member

    The motivation for this PR is twofold:

    1. Update the Qt binaries used by the appveyor CI job after a recent update to Visual Studio 2019 used in the Appveyor build image resulted in ABI incompatibilities,

    2. Remove optimisations and debug information from the Bitcoin Core Release msvc build to reduce the chance of future ABI incompatibility issues for future Visual Studio updates.

    The changes made in this PR are:

    • Changed appveyor config file hash to use a new version of Qt pre-compiled binaries built for Visual Studio 2019 v16.8.1.
    • Adjusted msvc compiler and linker settings to remove optimisations and debug information generation to help avoid future ABI issues on Visual Studio updates.
    • Tidied up debug and release configuration blocks in common project file to avoid duplication.
    • Updated appveyor config to use latest Visual Studio 2019 image.
    • Bumped vcpkg version to tag 2020.11-1 for binary caching feature*.

    See #20392 for related discussion.

    *Binary caching is a new vcpkg feature that allows dependency caching. This PR is not using the feature but by updating the vcpkg version it means it can be optionally used by other contributors in their own Appveyor configs. By caching the vcpkg dependencies using this feature my build times are reduced by approx 10 minutes.

  2. fanquake added the label Windows on Nov 26, 2020
  3. sipsorcery marked this as a draft on Nov 29, 2020
  4. Adjusted msvc compiler and linker settings to remove optimisations that are causing sporadic ABI issues on Visual Studio updates.
    Tidied up debug and release configuration blocks in common project file to avoid duplication.
    
    Updated appveyor config to use latest Visual Studio 2019 image.
    
    Changed appveyor config file hash to use a new version of Qt pre-compiled binaries built for Visual Studio 2019 v16.8.1.
    
    Bumped vcpkg version to tag '2020.11-1' for binary caching feature.
    
    See #20392 for related discussion.
    8b99e609e7
  5. in build_msvc/common.init.vcxproj:57 in 068417223c outdated
      60 |    </PropertyGroup>
      61 | -  <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
      62 | -    <LinkIncremental>false</LinkIncremental>
      63 | -    <WholeProgramOptimization>true</WholeProgramOptimization>
      64 | -    <UseDebugLibraries>false</UseDebugLibraries>
      65 | +  
    


    adamjonas commented at 10:31 PM on December 1, 2020:

    Heads up that the linter is complaining about the two spaces at the start of this line.


    sipsorcery commented at 12:05 PM on December 2, 2020:

    Thanks.

  6. sipsorcery force-pushed on Dec 2, 2020
  7. sipsorcery renamed this:
    WIP: AppVeyor CI fixes in preparation for next image bump
    AppVeyor CI fixes for Visual Studio 2019 16.8.1 image
    on Dec 2, 2020
  8. sipsorcery marked this as ready for review on Dec 2, 2020
  9. sipsorcery commented at 8:20 PM on December 2, 2020: member

    @MarcoFalke as a follow on to your comment here this PR should reduce the appveyor build times by approximately 20 minutes. From around 65 to around 45.

    The reduction is down to building the Qt libraries without msvc compiler optimisations. As mentioned above, removing the optimisations was to help with ABI compatibility. The build time reduction was a welcome side effect.

  10. hebasto approved
  11. hebasto commented at 9:39 PM on December 2, 2020: member

    ACK 8b99e609e7da5dd3601e9214d8f869e96108fffe, tested in my personal repo; did not check changes in the build_msvc/ directory.

    AppVeyor finished build in 46 min 31 sec.

  12. sipsorcery commented at 9:50 PM on December 2, 2020: member

    @hebasto thanks for checking. If you have time could you do me a favour (it's a quick set up) and check the vcpkg binary caching feature on your appveyor account?

    If so the steps are:

    appveyor_env

    The test is to see whether your build job pulls the pre-built vcpkg dependencies from my Azure devops account. The reason it may not is the way vcpkg generates the hash to determine whether the pre-built dependency is a match or not.

    If the pre-built dependencies are used your build time should be closer to 30 minutes.

  13. MarcoFalke renamed this:
    AppVeyor CI fixes for Visual Studio 2019 16.8.1 image
    ci: AppVeyor fixes for Visual Studio 2019 16.8.1 image
    on Dec 3, 2020
  14. Removed redundant git pull from appveyor config. 2c69381f3d
  15. in .appveyor.yml:26 in 8b99e609e7 outdated
      30 |        cd c:\tools\vcpkg
      31 |        $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
      32 | -      git pull origin master > $null
      33 | -      git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
      34 | +      git -c advice.detachedHead=false checkout $env:VCPKG_TAG
      35 | +      git pull origin $env:VCPKG_TAG
    


    MarcoFalke commented at 7:44 AM on December 3, 2020:

    Why does it first checkout the tag and then pull it? Shouldn't it be the other way round?

  16. MarcoFalke commented at 9:39 AM on December 3, 2020: member

    Concept ACK 2c69381f3de5091e103cb8bef299aba321503e7c

    Haven't reviewed the code, nor have I tested if building locally on Windows still works

  17. hebasto commented at 1:19 PM on December 3, 2020: member

    @sipsorcery

    @hebasto thanks for checking. If you have time could you do me a favour (it's a quick set up) and check the vcpkg binary caching feature on your appveyor account?

    Configured and checked: re-build has finished "in 30 min".

  18. sipsorcery commented at 1:22 PM on December 3, 2020: member

    Configured and checked: re-build has finished "in 30 min".

    Perfect, thanks!

  19. laanwj commented at 1:35 PM on December 3, 2020: member

    Concept ACK 2c69381f3de5091e103cb8bef299aba321503e7c Checked that this only touches the MSVC files.

  20. laanwj merged this on Dec 3, 2020
  21. laanwj closed this on Dec 3, 2020

  22. sidhujag referenced this in commit e754836a3f on Dec 3, 2020
  23. sipsorcery commented at 3:45 PM on December 3, 2020: member

    @MarcoFalke if you think it's a good idea you can add the environment setting below to the Bitcoin Core appveyor job to further reduce the build time by between 10 and 15 minutes. As mentioned above this setting is better put in the Appveyor build job settings rather than in the yml file.

    VCPKG_BINARY_SOURCES nuget,https://aaronrc.pkgs.visualstudio.com/bitcoin/_packaging/vcpkg-deps/nuget/v3/index.json,read

    Unlike previous attempts at caching vcpkg dependencies this one should be more reliable:

    • If a particular package doesn't have a matching nuget package it will be built from source,
    • If a new dependency is added to the vcpkg.json file it will be built from source,
    • If the Appveyor image gets updated the version hash of the vcpkg dependency changes and will cause it to be built from source,
    • The stored nuget packages are treated as readonly with the above environment variable. It requires a manual script to be run to add new packages.

    I've created a custom script to run as a standalone appveyor build job which builds the dependencies in vcpkg.json and stores the results as nuget packages in my Azure site. It would be trivial to switch to a different nuget storage location or even standard file storage if required. It's probably worth verifying that this approach does prove more reliable than previous attempts before expending too much effort.

  24. MarcoFalke referenced this in commit 249d61a382 on Dec 16, 2020
  25. MarcoFalke referenced this in commit 85dabd1249 on Dec 16, 2020
  26. hebasto referenced this in commit 55980f8d63 on Dec 16, 2020
  27. hebasto referenced this in commit a61564f11b on Dec 16, 2020
  28. 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: 2026-04-17 03:14 UTC

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