mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-08 06:01:58 +00:00
12b264af44
Launch the Ryujinx.exe, first argument --no-gui or nogui, and the rest of the arguments should be your normal headless script. You can include the new option --use-main-config which will provide any arguments that you don't, filled in from your main config made by the UI. Input config is not inherited at this time.
167 lines
6.7 KiB
YAML
167 lines
6.7 KiB
YAML
name: Build job
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
env:
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
RYUJINX_BASE_VERSION: "1.2.0"
|
|
RELEASE: 0
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.platform.name }} (${{ matrix.configuration }})
|
|
runs-on: ${{ matrix.platform.os }}
|
|
timeout-minutes: 45
|
|
strategy:
|
|
matrix:
|
|
configuration: [Debug, Release]
|
|
platform:
|
|
- { name: win-x64, os: windows-latest, zip_os_name: win_x64 }
|
|
- { name: linux-x64, os: ubuntu-latest, zip_os_name: linux_x64 }
|
|
- { name: linux-arm64, os: ubuntu-latest, zip_os_name: linux_arm64 }
|
|
- { name: osx-x64, os: macos-13, zip_os_name: osx_x64 }
|
|
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
global-json-file: global.json
|
|
|
|
- name: Overwrite csc problem matcher
|
|
run: echo "::add-matcher::.github/csc.json"
|
|
|
|
- name: Get git short hash
|
|
id: git_short_hash
|
|
run: echo "result=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
- name: Change config filename
|
|
run: sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/PRConfig\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
shell: bash
|
|
if: github.event_name == 'pull_request' && matrix.platform.os != 'macos-13'
|
|
|
|
- name: Change config filename for macOS
|
|
run: sed -r -i '' 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/PRConfig\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
shell: bash
|
|
if: github.event_name == 'pull_request' && matrix.platform.os == 'macos-13'
|
|
|
|
- name: Build
|
|
run: dotnet build -c "${{ matrix.configuration }}" -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER
|
|
|
|
- name: Test
|
|
uses: TSRBerry/unstable-commands@v1
|
|
with:
|
|
commands: dotnet test --no-build -c "${{ matrix.configuration }}"
|
|
timeout-minutes: 10
|
|
retry-codes: 139
|
|
if: matrix.platform.name != 'linux-arm64'
|
|
|
|
- name: Publish Ryujinx
|
|
run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.platform.name }}" -o ./publish -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER src/Ryujinx --self-contained
|
|
if: github.event_name == 'pull_request' && matrix.platform.os != 'macos-13'
|
|
|
|
- name: Set executable bit
|
|
run: |
|
|
chmod +x ./publish/Ryujinx ./publish/Ryujinx.sh
|
|
if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
|
|
|
|
- name: Build AppImage
|
|
if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
|
|
run: |
|
|
PLATFORM_NAME="${{ matrix.platform.name }}"
|
|
|
|
sudo apt install -y zsync desktop-file-utils appstream
|
|
|
|
mkdir -p tools
|
|
export PATH="$PATH:$(readlink -f tools)"
|
|
|
|
# Setup appimagetool
|
|
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
|
|
chmod +x tools/appimagetool
|
|
chmod +x distribution/linux/appimage/build-appimage.sh
|
|
|
|
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
|
|
if [ "$PLATFORM_NAME" = "linux-x64" ]; then
|
|
ARCH_NAME=x64
|
|
export ARCH=x86_64
|
|
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
|
|
ARCH_NAME=arm64
|
|
export ARCH=aarch64
|
|
else
|
|
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
|
|
exit 1
|
|
fi
|
|
|
|
export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
|
|
BUILDDIR=publish OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh
|
|
shell: bash
|
|
|
|
- name: Upload Ryujinx artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ryujinx-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-${{ matrix.platform.zip_os_name }}
|
|
path: publish
|
|
if: github.event_name == 'pull_request' && matrix.platform.os != 'macos-13'
|
|
|
|
- name: Upload Ryujinx (AppImage) artifact
|
|
uses: actions/upload-artifact@v4
|
|
if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
|
|
with:
|
|
name: ryujinx-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-${{ matrix.platform.zip_os_name }}-AppImage
|
|
path: publish_appimage
|
|
|
|
build_macos:
|
|
name: macOS Universal (${{ matrix.configuration }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
strategy:
|
|
matrix:
|
|
configuration: [ Debug, Release ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
global-json-file: global.json
|
|
|
|
- name: Setup LLVM 14
|
|
run: |
|
|
wget https://apt.llvm.org/llvm.sh
|
|
chmod +x llvm.sh
|
|
sudo ./llvm.sh 14
|
|
|
|
- name: Install rcodesign
|
|
run: |
|
|
mkdir -p $HOME/.bin
|
|
gh release download -R indygreg/apple-platform-rs -O apple-codesign.tar.gz -p 'apple-codesign-*-x86_64-unknown-linux-musl.tar.gz'
|
|
tar -xzvf apple-codesign.tar.gz --wildcards '*/rcodesign' --strip-components=1
|
|
rm apple-codesign.tar.gz
|
|
mv rcodesign $HOME/.bin/
|
|
echo "$HOME/.bin" >> $GITHUB_PATH
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get git short hash
|
|
id: git_short_hash
|
|
run: echo "result=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
|
|
|
- name: Change config filename
|
|
run: sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/PRConfig\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
shell: bash
|
|
if: github.event_name == 'pull_request'
|
|
|
|
- name: Publish macOS Ryujinx
|
|
run: |
|
|
./distribution/macos/create_macos_build_ava.sh . publish_tmp publish ./distribution/macos/entitlements.xml "${{ env.RYUJINX_BASE_VERSION }}" "${{ steps.git_short_hash.outputs.result }}" "${{ matrix.configuration }}" "-p:ExtraDefineConstants=DISABLE_UPDATER"
|
|
|
|
- name: Upload Ryujinx artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ryujinx-${{ matrix.configuration }}-${{ env.RYUJINX_BASE_VERSION }}+${{ steps.git_short_hash.outputs.result }}-macos_universal
|
|
path: "publish/*.tar.gz"
|
|
if: github.event_name == 'pull_request'
|