Binary Caching 기능 설명
환경변수를 사용해 기능을 활성화 하는 방법
$env:VCPKG_FEATURE_FLAGS="binarycaching"
export VCPKG_FEATURE_FLAGS="binarycaching"
vcpkg-tool 소스코드
- https://github.com/microsoft/vcpkg-tool/blob/main/src/vcpkg/binarycaching.cpp
...
ABI Hash 계산
- https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching#abi-hash
VCPKG_BINARY_SOURCES
예시
문서 상으로는 [,rw]
라고 표기하고 있는데 실제로는 readwrite
로 작성해야 동작...
여러 Source를 같이 사용하는 경우, ;
를 사용해 구분
$env:VCPKG_AWS_SOURCE="..."
$env:VCPKG_AZURE_SOURCE="..."
$env:VCPKG_BINARY_SOURCES="defaukt;$env:VCPKG_AWS_SOURCE;$env:VCPKG_AZURE_SOURCE"
File
$DiskPath="D:/vcpkg-caches"
$env:VCPKG_BINARY_SOURCES="files,$DiskPath,readwrite"
NuGet
NuGet config 파일이 필요할 수 있음
# If the repository is private ...
$NugetConfigPath="D:/nuget-config.xml"
$env:VCPKG_BINARY_SOURCES="nuget,https://nexus.instance.com/repositories/nuget,readwrite;nugetconfig,$NugetConfigPath"
<configuration>
<!-- apikeys -->
<!-- packageSources -->
<!-- packageSourceCredentials -->
</configuration>
AWS S3
$BucketName="..."
$env:VCPKG_BINARY_SOURCES="x-aws,s3://$BucketName/,readwrite"
$BucketName="..."
$FolderName="vcpkg-caches"
$env:VCPKG_BINARY_SOURCES="x-aws,s3://$BucketName/$FolderName/,readwrite"
Azure Blob Storage
$BlobStorageName="..."
$BlobStorageFolder="vcpkg-caches"
$BlobStorageSAS="sv=...&se=...&st=...&sig=..."
$env:VCPKG_BINARY_SOURCES="x-azblob,https://$BlobStorageName.blob.core.windows.net/$BlobStorageFolder,$BlobStorageSAS,readwrite"