101 lines
2.9 KiB
YAML
101 lines
2.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- 'gh-pages'
|
|
- 'master'
|
|
paths-ignore:
|
|
- '.github/CONTRIBUTING.md'
|
|
- '.github/FUNDING.md'
|
|
- '.github/ISSUE_TEMPLATE/*'
|
|
- 'docs/*'
|
|
- 'docs/*/*'
|
|
- '.appveyor.yml'
|
|
- '.azure-pipelines.yml'
|
|
- '.travis.yml'
|
|
- 'LICENSE'
|
|
- 'README.md'
|
|
pull_request:
|
|
branches-ignore:
|
|
- 'gh-pages'
|
|
- 'master'
|
|
paths-ignore:
|
|
- '.github/CONTRIBUTING.md'
|
|
- '.github/FUNDING.md'
|
|
- '.github/ISSUE_TEMPLATE/*'
|
|
- 'docs/*'
|
|
- 'docs/*/*'
|
|
- '.appveyor.yml'
|
|
- '.azure-pipelines.yml'
|
|
- '.travis.yml'
|
|
- 'LICENSE'
|
|
- 'README.md'
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
cpu_arch: [AVX, AVX2, AVX512]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup
|
|
run: .\xb setup
|
|
|
|
- name: Build
|
|
run: .\xb build --cpu_arch=${{ matrix.cpu_arch }} --target=src\xenia-app --target=src\xenia-vfs-dump
|
|
|
|
- name: Prepare artifacts
|
|
run: |
|
|
robocopy . build\bin\Windows\Release LICENSE /r:0 /w:0
|
|
robocopy build\bin\Windows\Release artifacts\xenia-canary xenia-canary.exe LICENSE /r:0 /w:0
|
|
robocopy build\bin\Windows\Release artifacts\xenia-vfs-dump xenia-vfs-dump.exe LICENSE /r:0 /w:0
|
|
If ($LastExitCode -le 7) { $LastExitCode = 0 }
|
|
7z a -mx1 xenia-canary.zip LICENSE .\artifacts\xenia-canary\*.exe
|
|
|
|
- name: Upload xenia-canary artifacts
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: xenia-canary-${{ matrix.cpu_arch }}
|
|
path: artifacts\xenia-canary
|
|
|
|
- name: Upload xenia-vfs-dump artifacts
|
|
uses: actions/upload-artifact@v1
|
|
if: matrix.cpu_arch == 'AVX'
|
|
with:
|
|
name: xenia-vfs-dump
|
|
path: artifacts\xenia-vfs-dump
|
|
|
|
- name: Upload SDL2 artifact(s)
|
|
uses: actions/upload-artifact@v1
|
|
if: matrix.cpu_arch == 'AVX'
|
|
with:
|
|
name: SDL2
|
|
path: build\bin\Windows\Release\SDL2.dll
|
|
|
|
- name: Create Release
|
|
if: github.event.action != 'pull_request' && github.ref == 'refs/heads/canary' && matrix.cpu_arch == 'AVX'
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: tag-${{ github.sha }}
|
|
release_name: xenia-canary-${{ github.sha }}
|
|
|
|
- name: Upload Release Asset
|
|
if: github.event.action != 'pull_request' && github.ref == 'refs/heads/canary' && matrix.cpu_arch == 'AVX'
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: xenia-canary.zip
|
|
asset_name: xenia-canary.zip
|
|
asset_content_type: application/zip
|