enabling msbuild in ci now that we can fetch needed meta build bits from efrocache

This commit is contained in:
Eric Froemling 2021-06-17 15:11:14 -05:00
parent fa7ade1e99
commit 7f5fec0e3e
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98

View File

@ -847,29 +847,49 @@ def gen_flat_data_code() -> None:
def win_ci_binary_build() -> None:
"""Simple windows binary build for ci."""
from efrotools.efrocache import get_target
import json
import subprocess
get_target('build/prefab/lib/windows/Debug_Win32/'
'BallisticaCoreGenericInternal.lib')
get_target('build/prefab/lib/windows/Debug_Win32/'
'BallisticaCoreGenericInternal.pdb')
get_target('ballisticacore-windows/Generic/BallisticaCore.ico')
from efrotools.efrocache import get_target
if bool(False):
subprocess.run(
[
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\'
'Enterprise\\MSBuild\\Current\\Bin\\MSBuild.exe',
'ballisticacore-windows\\Generic'
'\\BallisticaCoreGeneric.vcxproj',
'-target:Build',
'-property:Configuration=Debug',
'-property:Platform=Win32',
'-property:VisualStudioVersion=16',
],
check=True,
)
print('so far so good 4', flush=True)
# We'll need to pull a handfull 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 the compile requires.
with open('src/meta/.meta_manifest_public.json') as infile:
meta_public: List[str] = json.loads(infile.read())
with open('src/meta/.meta_manifest_private.json') as infile:
meta_private: List[str] = json.loads(infile.read())
for target in meta_public + meta_private:
if target.startswith('src/ballistica/generated/'):
needed_targets.add(target)
for target in needed_targets:
get_target(target)
# Do the thing.
subprocess.run(
[
'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\'
'Enterprise\\MSBuild\\Current\\Bin\\MSBuild.exe',
'ballisticacore-windows\\Generic'
'\\BallisticaCoreGeneric.vcxproj',
'-target:Build',
'-property:Configuration=Debug',
'-property:Platform=Win32',
'-property:VisualStudioVersion=16',
],
check=True,
)
def genchangelog() -> None: