def win_ci_install_prereqs() -> None: """Install bits needed for basic win ci.""" import json from efrotools.efrocache import get_target # We'll need to pull a handful of things out of efrocache for the # build to succeed. Normally this would happen through our Makefile # targets but we can't use them under raw window so we need to just # hard-code whatever we need here. needed_targets: set[str] = { 'build/prefab/lib/windows/Debug_Win32/' 'BallisticaCoreGenericInternal.lib', 'build/prefab/lib/windows/Debug_Win32/' 'BallisticaCoreGenericInternal.pdb', 'ballisticacore-windows/Generic/BallisticaCore.ico' } # Look through everything that gets generated by our meta builds # and pick out anything we need for our basic builds/tests. with open('src/meta/.meta_manifest_public.json', encoding='utf-8') as infile: meta_public: list[str] = json.loads(infile.read()) with open('src/meta/.meta_manifest_private.json', encoding='utf-8') as infile: meta_private: list[str] = json.loads(infile.read()) for target in meta_public + meta_private: if (target.startswith('src/ballistica/generated/') or target.startswith('assets/src/ba_data/python/ba/_generated/')): needed_targets.add(target) for target in needed_targets: get_target(target)
def efrocache_get() -> None: """Get a file from efrocache.""" from efrotools.efrocache import get_target if len(sys.argv) != 3: raise RuntimeError('Expected exactly 1 arg') get_target(sys.argv[2])