2020-11-15 10:27:15 -08:00
|
|
|
name: Build job
|
|
|
|
|
2019-12-22 11:36:24 -08:00
|
|
|
on:
|
2021-04-07 12:20:15 -07:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
2019-12-22 11:36:24 -08:00
|
|
|
push:
|
2021-03-20 13:48:37 -07:00
|
|
|
branches: [ master ]
|
2020-11-15 10:27:15 -08:00
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- '*.yml'
|
|
|
|
- 'README.md'
|
2019-12-22 11:36:24 -08:00
|
|
|
pull_request:
|
2020-11-15 10:27:15 -08:00
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- '*.yml'
|
|
|
|
- 'README.md'
|
|
|
|
|
2019-12-22 11:36:24 -08:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-15 10:27:15 -08:00
|
|
|
name: ${{ matrix.os }} (${{ matrix.configuration }})
|
2019-12-22 11:36:24 -08:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
2020-11-15 10:27:15 -08:00
|
|
|
configuration: [Debug, Release]
|
2021-02-28 02:56:15 -08:00
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
OS_NAME: Linux x64
|
|
|
|
DOTNET_RUNTIME_IDENTIFIER: linux-x64
|
2021-03-20 13:46:49 -07:00
|
|
|
RELEASE_ZIP_OS_NAME: linux_x64
|
2021-02-28 02:56:15 -08:00
|
|
|
|
|
|
|
- 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 10:27:15 -08:00
|
|
|
fail-fast: false
|
|
|
|
env:
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
2019-12-22 11:36:24 -08:00
|
|
|
steps:
|
2020-11-15 10:27:15 -08:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-dotnet@v1
|
2019-12-22 11:36:24 -08:00
|
|
|
with:
|
2020-11-15 10:27:15 -08:00
|
|
|
dotnet-version: 5.0.x
|
2021-04-07 12:17:16 -07:00
|
|
|
- name: Ensure NuGet Source
|
|
|
|
uses: fabriciomurta/ensure-nuget-source@v1
|
2021-02-28 02:56:15 -08:00
|
|
|
- name: Get git short hash
|
|
|
|
id: git_short_hash
|
2021-04-07 12:17:16 -07:00
|
|
|
run: echo "::set-output name=result::$(git rev-parse --short "${{ github.sha }}")"
|
2021-01-24 05:29:16 -08:00
|
|
|
- name: Clear
|
|
|
|
run: dotnet clean && dotnet nuget locals all --clear
|
2019-12-22 11:36:24 -08:00
|
|
|
- name: Build
|
2021-02-28 02:56:15 -08: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 11:36:24 -08:00
|
|
|
- name: Test
|
2021-02-28 02:56:15 -08:00
|
|
|
run: dotnet test -c "${{ matrix.configuration }}"
|
|
|
|
- name: Publish
|
2021-03-20 13:46:49 -07:00
|
|
|
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 Ryujinx
|
2021-03-20 13:48:37 -07:00
|
|
|
if: github.event_name == 'pull_request'
|
2021-02-28 02:56:15 -08:00
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-03-20 13:46:49 -07:00
|
|
|
name: ryujinx-${{ matrix.configuration }}-1.0.0+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}
|
|
|
|
path: publish
|
2021-03-20 13:48:37 -07:00
|
|
|
if: github.event_name == 'pull_request'
|