2020-11-15 19:27:15 +01:00
|
|
|
name: Build job
|
|
|
|
|
2019-12-22 20:36:24 +01:00
|
|
|
on:
|
|
|
|
push:
|
2020-11-15 19:27:15 +01:00
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- '*.yml'
|
|
|
|
- 'README.md'
|
2019-12-22 20:36:24 +01:00
|
|
|
pull_request:
|
2020-11-15 19:27:15 +01:00
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- '*.yml'
|
|
|
|
- 'README.md'
|
|
|
|
|
2019-12-22 20:36:24 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-15 19:27:15 +01:00
|
|
|
name: ${{ matrix.os }} (${{ matrix.configuration }})
|
2019-12-22 20:36:24 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
2020-11-15 19:27:15 +01:00
|
|
|
configuration: [Debug, Release]
|
2021-02-28 11:56:15 +01:00
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
OS_NAME: Linux x64
|
|
|
|
DOTNET_RUNTIME_IDENTIFIER: linux-x64
|
|
|
|
RELEASE_ZIP_OS_NAME: linux_x64.tar.gz
|
|
|
|
|
|
|
|
- os: macOS-latest
|
|
|
|
OS_NAME: MacOS x64
|
|
|
|
DOTNET_RUNTIME_IDENTIFIER: osx-x64
|
|
|
|
RELEASE_ZIP_OS_NAME: osx_x64
|
|
|
|
|
|
|
|
- os: windows-latest
|
|
|
|
OS_NAME: Windows x64
|
|
|
|
DOTNET_RUNTIME_IDENTIFIER: win-x64
|
|
|
|
RELEASE_ZIP_OS_NAME: win_x64
|
|
|
|
|
2020-11-15 19:27:15 +01:00
|
|
|
fail-fast: false
|
|
|
|
env:
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
2019-12-22 20:36:24 +01:00
|
|
|
steps:
|
2020-11-15 19:27:15 +01:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-dotnet@v1
|
2019-12-22 20:36:24 +01:00
|
|
|
with:
|
2020-11-15 19:27:15 +01:00
|
|
|
dotnet-version: 5.0.x
|
2021-02-28 11:56:15 +01:00
|
|
|
- name: Get git short hash
|
|
|
|
id: git_short_hash
|
|
|
|
run: echo "::set-output name=result::$(git rev-parse --short HEAD)"
|
2021-01-24 14:29:16 +01:00
|
|
|
- name: Clear
|
|
|
|
run: dotnet clean && dotnet nuget locals all --clear
|
2019-12-22 20:36:24 +01:00
|
|
|
- name: Build
|
2021-02-28 11:56:15 +01:00
|
|
|
run: dotnet build -c "${{ matrix.configuration }}" /p:Version="1.0.0" /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER
|
2019-12-22 20:36:24 +01:00
|
|
|
- name: Test
|
2021-02-28 11:56:15 +01:00
|
|
|
run: dotnet test -c "${{ matrix.configuration }}"
|
|
|
|
- name: Publish
|
|
|
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish /p:Version="1.0.0" /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
- name: Packing artifacts (Normal)
|
|
|
|
run: |
|
|
|
|
mkdir output
|
|
|
|
7z a "./output/ryujinx-${{ matrix.configuration }}-1.0.0+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}.zip" ./publish
|
|
|
|
if: github.event_name == 'pull_request' && matrix.os != 'ubuntu-latest'
|
|
|
|
- name: Packing artifacts (Linux only)
|
|
|
|
run: |
|
|
|
|
mkdir output
|
|
|
|
7z a "ryujinx-${{ matrix.configuration }}-1.0.0+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}.tar" ./publish
|
|
|
|
7z a "./output/ryujinx-${{ matrix.configuration }}-1.0.0+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}.tar.gz" "ryujinx-${{ matrix.configuration }}-1.0.0+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}.tar"
|
|
|
|
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Output ${{ matrix.OS_NAME }} (${{ matrix.configuration }})
|
|
|
|
path: output
|
|
|
|
if: github.event_name == 'pull_request'
|