Skip to content

Investigate using vcpkg's binary caching #1718

Description

We recently encountered a sporadic CI failure in vcpkg:

Running 'vcpkg install --recurse boost-build --triplet x86-windows --clean-after-build' in directory 'C:\a\1\s/vcpkg' ...
C:\a\1\s\vcpkg\vcpkg.exe install --recurse boost-build --triplet x86-windows --clean-after-build
Computing installation plan...
Error: database corrupted. Package boost-math:arm-windows is installed but dependency boost-algorithm:arm-windows is not.
Note: Updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.
##[error]Last command execution failed with error code '1'.
##[error]Error: Last command execution failed with error code '1'.
##[error]vcpkg failed with error: 'Error: Last command execution failed with error code '1'.'.
Finishing: Run vcpkg to Install boost-build

Possibly related to our use of Azure Pipelines caching:

- task: Cache@2
displayName: vcpkg/installed Caching
timeoutInMinutes: 10
inputs:
key: '"${{ parameters.targetPlatform }}" | "$(${{ parameters.vcpkgSHAVar }})" | "2020-03-01.01"'
path: '$(${{ parameters.vcpkgLocationVar }})/installed'
cacheHitVar: CACHE_RESTORED

We should investigate using vcpkg's new binary caching feature: https://github.com/microsoft/vcpkg/blob/master/docs/users/binarycaching.md#azure-devops-artifacts

Also, I'd like to understand whether we actually need to build boost-math at all. We could use it header-only (confirmed by Casey Carter (@CaseyCarter)); is there a way to ask vcpkg to just download and extract the headers but not build the sources? I saw that there's an --only-downloads option, but I don't know if it does what I imagine.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!infrastructureRelated to repository automation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions