Skip to content

Commit c98fd09

Browse files
[vcpkg-docs] Add note about GitHub hosted agents (#13641)
* [vcpkg_docs] Add note about GitHub hosted agents * [vcpkg-docs] Add ./ prefixes to GitHub example Co-authored-by: Robert Schumacher <[email protected]>
1 parent 794f4c0 commit c98fd09

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/users/binarycaching.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ If your CI system of choice is not listed, we welcome PRs to add them!
1414

1515
To use vcpkg with GitHub Packages, we recommend using the `NuGet` backend.
1616

17+
>**NOTE 2020-09-21**: GitHub's hosted agents come with an older, pre-installed copy of vcpkg on the path that does not support the latest binary caching. This means that direct calls to `bootstrap-vcpkg` or `vcpkg` without a path prefix may call an unintended vcpkg instance. We recommend taking the following two steps to avoid issues if you want to use your own copy of vcpkg:
18+
> 1. Run the equivalent of `rm -rf "$VCPKG_INSTALLATION_ROOT"` using `shell: 'bash'`
19+
> 2. Always call `vcpkg` and `bootstrap-vcpkg` with a path prefix, such as `./vcpkg`, `vcpkg/vcpkg`, `.\bootstrap-vcpkg.bat`, etc
20+
1721
```yaml
1822
# actions.yaml
1923
#
@@ -38,7 +42,7 @@ steps:
3842
shell: 'bash'
3943
# Replace <OWNER> with your organization name
4044
run: >
41-
${{ matrix.mono }} `vcpkg/vcpkg fetch nuget | tail -n 1`
45+
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1`
4246
sources add
4347
-source "https://nuget.pkg.github.com/<OWNER>/index.json"
4448
-storepasswordincleartext
@@ -50,7 +54,7 @@ steps:
5054
- name: 'vcpkg package restore'
5155
shell: 'bash'
5256
run: >
53-
vcpkg/vcpkg install sqlite3 cpprestsdk --triplet ${{ matrix.triplet }}
57+
./vcpkg/vcpkg install sqlite3 cpprestsdk --triplet ${{ matrix.triplet }}
5458
```
5559
5660
If you're using [manifests](../specifications/manifests.md), you can omit the `vcpkg package restore` step: it will be run automatically as part of your build.

0 commit comments

Comments
 (0)