AVX(2/512) builds

xenia-build:
 Make release the default config. (no longer need --config=Release)
 Add --cpu_arch argument;
  Valid options are SSE2 (default), AVX, AVX2, and AVX512.
CI:
 Remove unneeded env vars since we're only building Release for Windows anyway.
 Only do tests on AppVeyor since they only work there.
  AppVeyor:
   Remove empty tab/space.
   Remove unneeded cmds.
   Turn deploy off since it didn't do anything.
  GitHub Actions:
   Rename GitHub Actions artifacts.
Premake:
 Remove commented out garbage.
This commit is contained in:
Margen67 2019-10-20 13:51:32 -07:00 committed by Margen67
parent d0e3281741
commit 53544d76a8
5 changed files with 39 additions and 59 deletions

View File

@ -4,7 +4,7 @@ clone_depth: 1
matrix:
fast_finish: true
branches:
except:
- gh-pages
@ -17,6 +17,7 @@ skip_commits:
- .github/*
- LICENSE
- README.md
- .azure-pipelines.yml
- .travis.yml
skip_branch_with_pr: true
@ -30,42 +31,27 @@ init:
- git config --global core.autocrlf input
install:
- cmd: xb setup
platform: Windows
configuration:
- Release
# - Checked
- xb setup
build_script:
- cmd: xb build --config=%CONFIGURATION% --target=src\xenia-app --target=tests\xenia-cpu-ppc-tests --target=src\xenia-vfs-dump
- xb build --target=src\xenia-app --target=tests\xenia-cpu-ppc-tests --target=src\xenia-vfs-dump
after_build:
- cmd: |
7z a xenia-%appveyor_repo_branch%.zip LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe
7z a xenia-vfs-dump-%appveyor_repo_branch%.zip LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe
- |-
cd build\bin\Windows\Release
7z a ..\..\..\..\xenia-%appveyor_repo_branch%.zip ..\..\..\..\LICENSE xenia.exe
7z a ..\..\..\..\xenia-vfs-dump-%appveyor_repo_branch%.zip ..\..\..\..\LICENSE xenia-vfs-dump.exe
cd ..\..\..\..
before_test:
- cmd: xb gentests
- xb gentests
test_script:
- cmd: xb test --config=%CONFIGURATION% --no_build
- xb test --no_build
artifacts:
- path: xenia-cpu-ppc-test.log
- path: xenia-$(appveyor_repo_branch).zip
- path: xenia-vfs-dump-$(appveyor_repo_branch).zip
deploy:
- provider: Environment
name: xenia-canary
release: xenia-$(appveyor_repo_branch)-v$(appveyor_build_version)
artifact: xenia-$(appveyor_repo_branch).zip,xenia-vfs-dump-$(appveyor_repo_branch).zip
draft: false
prerelease: true
on:
branch: canary
configuration: release
appveyor_repo_tag: true
is_not_pr: true
deploy: off

View File

@ -33,31 +33,27 @@ jobs:
vmImage: windows-latest
strategy:
matrix:
Release:
configuration: Release
Checked:
configuration: Checked
SSE2:
cpu_arch: SSE2
AVX:
cpu_arch: AVX
AVX2:
cpu_arch: AVX2
AVX512:
cpu_arch: AVX512
steps:
- script: |
git config --global core.autocrlf input
xb setup
- script: xb setup
displayName: 'Setup'
- script: xb build --config=$(Configuration) --target=src\xenia-app --target=tests\xenia-cpu-ppc-tests --target=src\xenia-vfs-dump
displayName: 'Build $(Configuration)'
- script: xb build --cpu_arch=$(cpu_arch) --target=src\xenia-app --target=tests\xenia-cpu-ppc-tests --target=src\xenia-vfs-dump
displayName: 'Build'
- script: |
xb gentests
xb test --config=$(Configuration) --no_build
copy xenia-cpu-ppc-test.log $(Build.ArtifactStagingDirectory)
displayName: 'Tests'
- script: |
cd build\bin\Windows\$(Configuration)
cd build\bin\Windows\Release
7z a $(Build.ArtifactStagingDirectory)\xenia-$(Build.SourceBranchName).zip ..\..\..\..\LICENSE xenia.exe
7z a $(Build.ArtifactStagingDirectory)\xenia-vfs-dump-$(Build.SourceBranchName).zip ..\..\..\..\LICENSE xenia-vfs-dump.exe
displayName: 'Create archives'
- publish: $(Build.ArtifactStagingDirectory)
artifact: $(configuration)
artifact: $(cpu_arch)
displayName: Publish artifacts

View File

@ -7,8 +7,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
configuration: [Release]
platform: [Windows]
cpu_arch: [SSE2, AVX, AVX2, AVX512]
steps:
- uses: actions/checkout@master
@ -16,19 +15,16 @@ jobs:
run: xb setup
- name: Build
run: xb build --config=${{matrix.configuration}} --target=src\xenia-app --target=tests\xenia-cpu-ppc-tests --target=src\xenia-vfs-dump
run: xb build --cpu_arch=${{matrix.cpu_arch}} --target=src\xenia-app --target=tests\xenia-cpu-ppc-tests --target=src\xenia-vfs-dump
- name: After build
- name: Prepare artifacts
run: |
7z a artifacts\xenia-%appveyor_repo_branch%.zip LICENSE %GITHUB_WORKSPACE%\build\bin\${{matrix.platform}}\${{matrix.configuration}}\xenia.exe
7z a artifacts\xenia-vfs-dump-%appveyor_repo_branch%.zip LICENSE %GITHUB_WORKSPACE%\build\bin\${{matrix.platform}}\${{matrix.configuration}}\xenia-vfs-dump.exe
- name: Tests
run: |
xb gentests
xb.bat test --config=${{matrix.configuration}} --no_build
robocopy build\bin\Windows\Release artifacts xenia.exe xenia-vfs-dump.exe
robocopy . artifacts LICENSE
if errorlevel 8 exit /b 1
exit /b 0
- uses: actions/upload-artifact@master
with:
name: xenia-${{matrix.configuration}}
name: xenia-canary-${{matrix.cpu_arch}}
path: artifacts

View File

@ -192,8 +192,6 @@ filter("platforms:Windows")
"wsock32",
"ws2_32",
"xinput",
--"glu32",
--"opengl32",
"comctl32",
"shcore",
"shlwapi",
@ -221,7 +219,7 @@ solution("xenia")
systemversion("10.0")
filter({})
end
configurations({"Checked", "Debug", "Release"})
configurations({"Release", "Debug", "Checked"})
include("third_party/aes_128.lua")
include("third_party/capstone.lua")

View File

@ -586,8 +586,11 @@ class BaseBuildCommand(Command):
self.parser.add_argument(
'--cc', default='clang', help='Compiler toolchain passed to premake')
self.parser.add_argument(
'--config', choices=['checked', 'debug', 'release'], default='debug',
'--config', choices=['release', 'debug', 'checked'], default='release',
type=str.lower, help='Chooses the build configuration.')
self.parser.add_argument(
'--cpu_arch', choices=['sse2', 'avx', 'avx2', 'avx512'], default='sse2',
type=str.lower, help='Chooses the CPU architecture.')
self.parser.add_argument(
'--target', action='append', default=[],
help='Builds only the given target(s).')
@ -628,6 +631,7 @@ class BaseBuildCommand(Command):
'/m',
'/v:m',
'/p:Configuration=' + args['config'],
'/p:VCBuildAdditionalOptions=/arch:' + args['cpu_arch'],
] + ([targets] if targets is not None else []) + pass_args, shell=False)
elif sys.platform == 'darwin':
# TODO(benvanik): other platforms.