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 illusion
parent 435a9091ad
commit 9016a3ea08
4 changed files with 82 additions and 32 deletions

View File

@ -1,5 +1,10 @@
version: 1.0.{build}-{branch}
clone_depth: 1
matrix:
fast_finish: true
branches:
except:
- gh-pages
@ -17,6 +22,8 @@ skip_commits:
- src/**/*_gtk.*
- LICENSE
- README.md
- .azure-pipelines.yml
- .travis.yml
skip_branch_with_pr: true
@ -29,46 +36,26 @@ 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: |
IF NOT "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%"
IF NOT "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SWITCHES=--"
IF "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%_FOR-DEVS-ONLY"
IF "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SWITCHES="-pI know what I am doing." --"
7z a xenia_%ARCHIVE_SUFFIX%.zip %ARCHIVE_SWITCHES% LICENSE "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe" "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.pdb"
7z a xenia-vfs-dump_%ARCHIVE_SUFFIX%.zip %ARCHIVE_SWITCHES% LICENSE "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe" "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.pdb"
7z a SDL2.zip %ARCHIVE_SWITCHES% "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\SDL2.dll"
- |-
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: '*.zip'
- path: xenia-cpu-ppc-test.log
deploy:
- provider: Environment
name: xenia-master
release: xenia-$(appveyor_repo_branch)-v$(appveyor_build_version)
artifact: '*.zip'
draft: false
prerelease: true
on:
branch: master
configuration: release
appveyor_repo_tag: true
is_not_pr: true
deploy: off

59
.azure-pipelines.yml Normal file
View File

@ -0,0 +1,59 @@
trigger:
branches:
include:
- '*'
exclude:
- gh-pages
paths:
exclude:
- docs/*
- .github/*
- LICENSE
- README.md
- .appveyor.yml
- .travis.yml
pr:
branches:
include:
- '*'
exclude:
- gh-pages
paths:
exclude:
- docs/*
- .github/*
- LICENSE
- README.md
- .appveyor.yml
- .travis.yml
jobs:
- job:
pool:
vmImage: windows-latest
strategy:
matrix:
SSE2:
cpu_arch: SSE2
AVX:
cpu_arch: AVX
AVX2:
cpu_arch: AVX2
AVX512:
cpu_arch: AVX512
steps:
- script: xb setup
displayName: 'Setup'
- 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: |
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: $(cpu_arch)
displayName: Publish artifacts

View File

@ -206,7 +206,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.