2020-11-15 18:27:15 +00:00
|
|
|
name: Build job
|
|
|
|
|
2019-12-22 19:36:24 +00:00
|
|
|
on:
|
2021-04-07 19:20:15 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
2022-01-22 16:56:09 +00:00
|
|
|
#push:
|
|
|
|
# branches: [ master ]
|
|
|
|
# paths-ignore:
|
|
|
|
# - '.github/*'
|
|
|
|
# - '.github/ISSUE_TEMPLATE/**'
|
|
|
|
# - '*.yml'
|
|
|
|
# - 'README.md'
|
2019-12-22 19:36:24 +00:00
|
|
|
pull_request:
|
2020-11-15 18:27:15 +00:00
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- '*.yml'
|
|
|
|
- 'README.md'
|
|
|
|
|
2019-12-22 19:36:24 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-15 18:27:15 +00:00
|
|
|
name: ${{ matrix.os }} (${{ matrix.configuration }})
|
2019-12-22 19:36:24 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
2020-11-15 18:27:15 +00:00
|
|
|
configuration: [Debug, Release]
|
2021-02-28 10:56:15 +00:00
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
OS_NAME: Linux x64
|
|
|
|
DOTNET_RUNTIME_IDENTIFIER: linux-x64
|
2021-03-20 20:46:49 +00:00
|
|
|
RELEASE_ZIP_OS_NAME: linux_x64
|
2021-02-28 10:56:15 +00: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
|
2022-06-01 00:01:16 +00:00
|
|
|
DOTNET_RUNTIME_IDENTIFIER: win10-x64
|
2021-02-28 10:56:15 +00:00
|
|
|
RELEASE_ZIP_OS_NAME: win_x64
|
|
|
|
|
2020-11-15 18:27:15 +00:00
|
|
|
fail-fast: false
|
|
|
|
env:
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
2022-05-03 21:35:12 +00:00
|
|
|
RYUJINX_BASE_VERSION: "1.1.0"
|
2019-12-22 19:36:24 +00:00
|
|
|
steps:
|
2022-10-21 08:31:38 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-dotnet@v3
|
2019-12-22 19:36:24 +00:00
|
|
|
with:
|
2021-11-28 20:24:17 +00:00
|
|
|
dotnet-version: 6.0.x
|
2021-04-07 19:17:16 +00:00
|
|
|
- name: Ensure NuGet Source
|
|
|
|
uses: fabriciomurta/ensure-nuget-source@v1
|
2021-02-28 10:56:15 +00:00
|
|
|
- name: Get git short hash
|
|
|
|
id: git_short_hash
|
2022-10-21 08:31:38 +00:00
|
|
|
run: echo "result=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
2021-01-24 13:29:16 +00:00
|
|
|
- name: Clear
|
|
|
|
run: dotnet clean && dotnet nuget locals all --clear
|
2019-12-22 19:36:24 +00:00
|
|
|
- name: Build
|
2022-05-03 21:35:12 +00:00
|
|
|
run: dotnet build -c "${{ matrix.configuration }}" /p:Version="${{ env.RYUJINX_BASE_VERSION }}" /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER
|
2019-12-22 19:36:24 +00:00
|
|
|
- name: Test
|
2022-10-21 08:31:38 +00:00
|
|
|
run: dotnet test --no-build -c "${{ matrix.configuration }}"
|
2021-07-06 20:08:44 +00:00
|
|
|
- name: Publish Ryujinx
|
2022-05-03 21:35:12 +00:00
|
|
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish /p:Version="${{ env.RYUJINX_BASE_VERSION }}" /p:DebugType=embedded /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx --self-contained
|
2021-03-20 20:48:37 +00:00
|
|
|
if: github.event_name == 'pull_request'
|
2021-07-06 20:08:44 +00:00
|
|
|
- name: Publish Ryujinx.Headless.SDL2
|
2022-05-03 21:35:12 +00:00
|
|
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish_sdl2_headless /p:Version="${{ env.RYUJINX_BASE_VERSION }}" /p:DebugType=embedded /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx.Headless.SDL2 --self-contained
|
2021-07-06 20:08:44 +00:00
|
|
|
if: github.event_name == 'pull_request'
|
2022-05-15 11:30:15 +00:00
|
|
|
- name: Publish Ryujinx.Ava
|
|
|
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish_ava /p:Version="1.0.0" /p:DebugType=embedded /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx.Ava
|
|
|
|
if: github.event_name == 'pull_request'
|
2021-07-06 20:08:44 +00:00
|
|
|
- name: Upload Ryujinx artifact
|
2022-10-21 08:31:38 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-02-28 10:56:15 +00:00
|
|
|
with:
|
2022-05-03 21:35:12 +00:00
|
|
|
name: ryujinx-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}
|
2021-03-20 20:46:49 +00:00
|
|
|
path: publish
|
2021-03-20 20:48:37 +00:00
|
|
|
if: github.event_name == 'pull_request'
|
2021-07-06 20:08:44 +00:00
|
|
|
- name: Upload Ryujinx.Headless.SDL2 artifact
|
2022-10-21 08:31:38 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-07-06 20:08:44 +00:00
|
|
|
with:
|
2022-05-15 11:30:15 +00:00
|
|
|
name: sdl2-ryujinx-headless-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}
|
2021-07-06 20:08:44 +00:00
|
|
|
path: publish_sdl2_headless
|
|
|
|
if: github.event_name == 'pull_request'
|
2022-05-15 11:30:15 +00:00
|
|
|
- name: Upload Ryujinx.Ava artifact
|
2022-10-21 08:31:38 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-05-15 11:30:15 +00:00
|
|
|
with:
|
|
|
|
name: ava-ryujinx-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}
|
|
|
|
path: publish_ava
|
|
|
|
if: github.event_name == 'pull_request'
|