2020-06-08 08:19:34 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore: [ gh-pages, master ]
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
2020-11-25 19:41:04 +00:00
|
|
|
- '.github/*_TEMPLATE/**'
|
2020-06-08 08:19:34 +00:00
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
2020-11-25 19:41:04 +00:00
|
|
|
- 'docs/**'
|
2020-06-08 08:19:34 +00:00
|
|
|
- 'LICENSE'
|
|
|
|
pull_request:
|
|
|
|
branches-ignore: [ gh-pages, master ]
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
2020-11-25 19:41:04 +00:00
|
|
|
- '.github/*_TEMPLATE/**'
|
2020-06-08 08:19:34 +00:00
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
2020-11-25 19:41:04 +00:00
|
|
|
- 'docs/**'
|
2020-06-08 08:19:34 +00:00
|
|
|
- 'LICENSE'
|
|
|
|
|
|
|
|
jobs:
|
2020-08-19 17:56:57 +00:00
|
|
|
build-windows:
|
2020-06-08 08:19:34 +00:00
|
|
|
runs-on: windows-latest
|
2020-08-19 17:56:57 +00:00
|
|
|
env:
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
2020-06-08 08:19:34 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-08-19 17:56:57 +00:00
|
|
|
cpu_arch: [ AVX, AVX2, AVX512 ]
|
2020-06-08 08:19:34 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup
|
|
|
|
run: .\xb setup
|
|
|
|
- name: Build
|
|
|
|
run: .\xb build --cpu_arch=${{ matrix.cpu_arch }} --config=Release --target=src\xenia-app --target=src\xenia-vfs-dump
|
|
|
|
- name: Prepare artifacts
|
2020-11-25 19:41:04 +00:00
|
|
|
id: prepare_artifacts
|
2020-06-08 08:19:34 +00:00
|
|
|
run: |
|
2020-08-19 17:56:57 +00:00
|
|
|
robocopy . build\bin\${{ runner.os }}\Release LICENSE /r:0 /w:0
|
|
|
|
robocopy build\bin\${{ runner.os }}\Release artifacts\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE /r:0 /w:0
|
|
|
|
robocopy build\bin\${{ runner.os }}\Release artifacts\xenia-vfs-dump xenia-vfs-dump.exe xenia-vfs-dump.pdb LICENSE /r:0 /w:0
|
|
|
|
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
|
|
|
|
7z a -mx1 xenia_canary.zip .\artifacts\xenia_canary\*.exe LICENSE
|
2020-11-25 19:41:04 +00:00
|
|
|
echo "::set-output name=short_commit_sha::$(git rev-parse --short HEAD)"
|
2020-08-19 17:56:57 +00:00
|
|
|
- name: Upload xenia-vfs-dump artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: matrix.cpu_arch == 'AVX'
|
2020-06-08 08:19:34 +00:00
|
|
|
with:
|
2020-08-19 17:56:57 +00:00
|
|
|
name: xenia-vfs-dump_canary
|
|
|
|
path: artifacts\xenia-vfs-dump
|
2020-09-02 07:26:22 +00:00
|
|
|
if-no-files-found: error
|
2020-08-19 17:56:57 +00:00
|
|
|
- name: Upload xenia artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: xenia_canary_${{ matrix.cpu_arch }}
|
2020-09-02 07:26:22 +00:00
|
|
|
path: artifacts\xenia_canary
|
|
|
|
if-no-files-found: error
|
2020-11-25 19:41:04 +00:00
|
|
|
- uses: softprops/action-gh-release@v1
|
|
|
|
if: |
|
2020-11-25 20:08:01 +00:00
|
|
|
github.repository == 'xenia-canary/xenia-canary' &&
|
2020-11-25 19:41:04 +00:00
|
|
|
github.event.action != 'pull_request' &&
|
2020-11-25 20:08:01 +00:00
|
|
|
contains(github.ref, 'refs/heads/canary') &&
|
2020-11-25 19:41:04 +00:00
|
|
|
matrix.cpu_arch == 'AVX'
|
2020-06-08 08:19:34 +00:00
|
|
|
with:
|
2020-11-25 19:41:04 +00:00
|
|
|
files: '*.zip'
|
|
|
|
tag_name: ${{ steps.prepare_artifacts.outputs.short_commit_sha }}
|
2020-06-08 08:19:34 +00:00
|
|
|
env:
|
2020-08-19 17:56:57 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|