xenia-canary/.github/workflows/CI.yml

101 lines
2.9 KiB
YAML
Raw Normal View History

name: CI
2019-10-26 09:32:32 +00:00
2019-11-02 09:38:27 +00:00
on:
push:
branches-ignore:
- 'gh-pages'
- 'master'
2019-11-02 09:38:27 +00:00
paths-ignore:
- '.github/CONTRIBUTING.md'
- '.github/FUNDING.md'
- '.github/ISSUE_TEMPLATE/*'
- 'docs/*'
- 'docs/*/*'
- '.appveyor.yml'
2020-01-16 16:51:48 +00:00
- '.azure-pipelines.yml'
- '.travis.yml'
- 'LICENSE'
- 'README.md'
2019-11-02 09:38:27 +00:00
pull_request:
branches-ignore:
- 'gh-pages'
- 'master'
2019-11-02 09:38:27 +00:00
paths-ignore:
- '.github/CONTRIBUTING.md'
- '.github/FUNDING.md'
- '.github/ISSUE_TEMPLATE/*'
- 'docs/*'
- 'docs/*/*'
- '.appveyor.yml'
2020-01-16 16:51:48 +00:00
- '.azure-pipelines.yml'
- '.travis.yml'
- 'LICENSE'
- 'README.md'
2019-10-26 09:32:32 +00:00
jobs:
build:
runs-on: windows-latest
strategy:
2020-01-25 13:40:23 +00:00
fail-fast: false
2019-10-26 09:32:32 +00:00
matrix:
cpu_arch: [AVX, AVX2, AVX512]
2019-10-26 09:32:32 +00:00
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
2019-10-26 09:32:32 +00:00
- name: Setup
run: .\xb setup
- name: Build
run: .\xb build --cpu_arch=${{ matrix.cpu_arch }} --target=src\xenia-app --target=src\xenia-vfs-dump
2019-10-26 09:32:32 +00:00
- 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
2019-10-26 09:32:32 +00:00
- name: Upload xenia-canary artifacts
uses: actions/upload-artifact@v1
2019-10-26 09:32:32 +00:00
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