You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service.
# Restore both vcpkg and its artifacts from the GitHub cache service.
57
+
- name: Restore Dependency Cache.
58
+
uses: actions/cache@v2
59
+
with:
60
+
# The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
61
+
# built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
62
+
# The other paths starting with '!' are exclusions: they contain termporary files generated during the build of the installed packages.
63
+
path: |
64
+
${{ env.VCPKG_ROOT }}
65
+
!${{ env.VCPKG_ROOT }}/buildtrees
66
+
!${{ env.VCPKG_ROOT }}/packages
67
+
!${{ env.VCPKG_ROOT }}/downloads
68
+
!${{ env.VCPKG_ROOT }}/installed
69
+
# The key is composed in a way that it gets properly invalidated: this must happen whenever vcpkg's Git commit id changes, or the list of packages changes. In this case a cache miss must happen and a new entry with a new key with be pushed to GitHub the cache service.
70
+
# The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm.
71
+
# Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already).
# On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly. As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK.
75
+
- uses: ilammy/msvc-dev-cmd@v1
76
+
77
+
# Run CMake to generate Ninja project files, using the vcpkg's toolchain file to resolve and install the dependencies as specified in vcpkg.json.
78
+
- name: Install Dependencies.
79
+
run: |
80
+
cmake --preset ninja-multi-vcpkg
81
+
82
+
# Build the whole project with Ninja (which is spawn by CMake). Debug configuration.
0 commit comments