diff --git a/.appveyor.yml b/.appveyor.yml index ea14bfe14..d20804592 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,10 @@ version: 1.0.{build}-{branch} +clone_depth: 1 + +matrix: + fast_finish: true + branches: except: - gh-pages @@ -12,6 +17,7 @@ skip_commits: - .github/* - LICENSE - README.md + - .azure-pipelines.yml - .travis.yml skip_branch_with_pr: true @@ -25,46 +31,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 diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml new file mode 100644 index 000000000..dc310950f --- /dev/null +++ b/.azure-pipelines.yml @@ -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 diff --git a/premake5.lua b/premake5.lua index 91b8c2342..a8fafd2bf 100644 --- a/premake5.lua +++ b/premake5.lua @@ -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") diff --git a/xenia-build b/xenia-build index 7a63b65dd..e91eccb91 100755 --- a/xenia-build +++ b/xenia-build @@ -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.