Skip to content

Commit

Permalink
Appveyor: Swap to xenia-build and only build the projects we need.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrChat committed Jun 13, 2016
1 parent 61cfc78 commit eb7b80b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
19 changes: 10 additions & 9 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ configuration:
#- Checked
- Release

build:
parallel: true # enable MSBuild parallel builds
project: build\xenia.sln # path to Visual Studio solution or project

# MSBuild verbosity level
#verbosity: quiet|minimal|normal|detailed
verbosity: minimal
#build:
# parallel: true # enable MSBuild parallel builds
# project: build\xenia.sln # path to Visual Studio solution or project
#
# # MSBuild verbosity level
# #verbosity: quiet|minimal|normal|detailed
# verbosity: minimal

# scripts to run before build
#before_build:
Expand All @@ -79,8 +79,9 @@ after_build:
- 7z a xenia-%appveyor_repo_branch%-%appveyor_repo_commit%.zip LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\Windows\Release\xenia.exe %APPVEYOR_BUILD_FOLDER%\build\bin\Windows\Release\xenia.pdb

# to run your custom scripts instead of automatic MSBuild
#build_script:
# - cmd: tools\buildbot\build.bat
# We also compile the tests here instead of later on.
build_script:
- cmd: xb.bat build --config=release --target=src\xenia-app --target=tests\xenia-cpu-ppc-tests

# to disable automatic builds
#build: off
Expand Down
28 changes: 18 additions & 10 deletions xenia-build
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def get_clang_format_binary():
A path to the clang-format executable.
"""
attempts = [
'C:\\Program Files\\LLVM\\bin\\clang-format.exe',
'C:\\Program Files (x86)\\LLVM\\bin\\clang-format.exe',
'clang-format-3.8',
'clang-format',
Expand Down Expand Up @@ -574,29 +575,36 @@ class BaseBuildCommand(Command):
print('')

print('- building (%s):%s...' % (
'all' if not len(args['target']) else ' '.join(args['target']),
'all' if not len(args['target']) else ', '.join(args['target']),
args['config']))
if sys.platform == 'win32':
result = shell_call([
'devenv',
'/nologo',
targets = None
if len(args['target']):
targets = '/t:' + ';'.join(target + (':Rebuild' if args['force'] else '')
for target in args['target'])
else:
targets = '/t:Rebuild' if args['force'] else None

result = subprocess.call([
'msbuild',
'build/xenia.sln',
'/rebuild' if args['force'] else '/build',
args['config'],
] + [('/project ', target) for target in args['target']] +
pass_args, throw_on_error=False)
'/nologo',
'/m',
'/v:m',
'/p:Configuration=' + args['config'],
] + ([targets] if targets is not None else []) + pass_args, shell=False)
elif sys.platform == 'darwin':
# TODO(benvanik): other platforms.
print('ERROR: don\'t know how to build on this platform.')
else:
# TODO(benvanik): allow gcc?
os.environ['CXX'] = 'clang++-3.8'
os.environ['CC'] = 'clang-3.8'
result = shell_call([
result = subprocess.call([
'make',
'-Cbuild/',
'config=%s_linux' % (args['config']),
] + pass_args + args['target'], throw_on_error=False)
] + pass_args + args['target'], shell=False)
print('')
if result != 0:
print('ERROR: build failed with one or more errors.')
Expand Down

0 comments on commit eb7b80b

Please sign in to comment.