Skip to content

Commit 807667b

Browse files
Cache vcpkg dependency (#13)
1 parent 45a47b4 commit 807667b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.azure/default-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
steps:
2323
- checkout: self
2424
clean: true
25+
26+
- task: CacheBeta@1
27+
inputs:
28+
key: vcpkg | ${{ parameters.agentOs }} | azure-pipelines.yml
29+
path: ./submodules/vcpkg/installed
30+
cacheHitVar: CACHE_RESTORED
31+
displayName: Cache vcpkg packages
2532

2633
- ${{ parameters.beforeBuild }}
2734

azure-pipelines.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
cMakeRunArgs: '-A x64'
99
beforeBuild:
1010
- powershell: "& vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg"
11+
condition: ne(variables.CACHE_RESTORED, 'true')
1112
displayName: vcpkg install dependencies
1213

1314
- template: .azure/default-build.yml
@@ -21,11 +22,13 @@ jobs:
2122
- bash: "./submodules/vcpkg/bootstrap-vcpkg.sh"
2223
displayName: Bootstrap vcpkg
2324
- bash: "./submodules/vcpkg/vcpkg install cpprestsdk"
25+
condition: ne(variables.CACHE_RESTORED, 'true')
2426
displayName: vcpkg install dependencies
2527

2628
- template: .azure/default-build.yml
2729
parameters:
2830
agentOs: Linux
2931
beforeBuild:
3032
- script: sudo vcpkg install cpprestsdk boost-system boost-chrono boost-thread --vcpkg-root ./submodules/vcpkg
33+
condition: ne(variables.CACHE_RESTORED, 'true')
3134
displayName: vcpkg install dependencies

0 commit comments

Comments
 (0)