ci: remove restore-keys for vcpkg and use local bootstrap
This commit is contained in:
parent
b904cba040
commit
dafd20e182
3 changed files with 9 additions and 7 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -68,10 +68,9 @@ jobs:
|
|||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
vcpkg
|
||||
vcpkg_installed
|
||||
${{ env.LOCALAPPDATA }}/vcpkg
|
||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
|
||||
restore-keys: vcpkg-${{ runner.os }}
|
||||
|
||||
# Should only restore the .venv directory from cache.
|
||||
- name: Init Python venv
|
||||
|
|
@ -98,6 +97,8 @@ jobs:
|
|||
uses: seanmiddleditch/gha-setup-ninja@master
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
VCPKG_ROOT: "" # Unset deliberately to suppress 'already installed' warning.
|
||||
run: python ./scripts/install_deps.py
|
||||
|
||||
- name: Configure
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ def install(args):
|
|||
if env.is_windows() and not args.skip_vcpkg:
|
||||
import lib.vcpkg as vcpkg
|
||||
|
||||
vcpkg.install()
|
||||
vcpkg.install(args.ci_env)
|
||||
|
||||
if not args.skip_meson:
|
||||
if args.subprojects:
|
||||
|
|
|
|||
|
|
@ -21,14 +21,15 @@ import lib.cmd_utils as cmd_utils
|
|||
GIT_REPO = "https://github.com/microsoft/vcpkg.git"
|
||||
|
||||
|
||||
def install():
|
||||
vcpkg_bin = ensure_vcpkg()
|
||||
def install(ci_env):
|
||||
vcpkg_bin = ensure_vcpkg(ci_env)
|
||||
|
||||
cmd_utils.run([vcpkg_bin, "install"], print_cmd=True)
|
||||
|
||||
|
||||
def ensure_vcpkg():
|
||||
if cmd_utils.has_command("vcpkg"):
|
||||
def ensure_vcpkg(ci_env):
|
||||
# Don't use the local vcpkg if we're in CI, since this makes caching complicated.
|
||||
if not ci_env and cmd_utils.has_command("vcpkg"):
|
||||
print("Using system vcpkg")
|
||||
return "vcpkg"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue