Introduce needed changes for Ryujinx's fork

This commit is contained in:
Mary 2022-11-18 17:56:02 +01:00
parent 30125e4c6d
commit 160927c206
3 changed files with 58 additions and 10 deletions

View file

@ -1,7 +1,11 @@
name: build-native
on:
workflow_dispatch:
inputs: {}
inputs:
rev:
description: 'Ryujinx/SDL commit to build'
required: false
default: 'master'
# schedule:
# - cron: '0 0 * * *'
env:
@ -18,10 +22,9 @@ jobs:
- { name: win-x64, os: windows-latest, flags: -A x64 }
- { name: win-x86, os: windows-latest, flags: -A Win32 }
- { name: win-arm64, os: windows-latest, flags: -A ARM64 }
- { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64" }
- { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64" }
- { name: linux-x86, os: ubuntu-20.04, flags: -GNinja, cmake_configure_env: CFLAGS=-m32 CXXFLAGS=-m32, target_apt_arch: ":i386" }
- { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" }
# NOTE: macOS 11.0 is the first released supported by Apple Silicon.
- { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" }
- { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" }
steps:
- name: Setup Linux dependencies
@ -71,10 +74,14 @@ jobs:
libxxf86vm-dev${{ matrix.platform.target_apt_arch }} \
libdrm-dev${{ matrix.platform.target_apt_arch }} \
libgbm-dev${{ matrix.platform.target_apt_arch }} \
libpulse-dev${{ matrix.platform.target_apt_arch }}
libpulse-dev${{ matrix.platform.target_apt_arch }} \
libhidapi-dev${{ matrix.platform.target_apt_arch }} \
libwayland-client++0$ \
libwayland-cursor++0$ \
- uses: actions/checkout@v2
with:
repository: libsdl-org/SDL
repository: Ryujinx/SDL
ref: ${{ github.event.inputs.rev }}
- uses: actions/checkout@v2
with:
path: 'SDL2-CS'
@ -103,6 +110,12 @@ jobs:
- name: Prepare release (OSX)
run: cp install_output/lib/libSDL2-2.0.dylib SDL2-CS/native/${{ matrix.platform.name }}/libSDL2.dylib
if: runner.os == 'macOS'
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform.name }}-binaries
path: install_output
if: github.event_name == 'pull_request'
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:

34
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Build
on:
workflow_dispatch:
inputs: {}
#push:
# branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '6.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack & Publish
run: |
dotnet pack --version-suffix "build${{ github.run_number }}" -c Release .\SDL2-CS.csproj -o .
$file_to_publish = Get-ChildItem -Path $dir -Filter *.nupkg | Select -First 1
echo $file_to_publish
nuget push $file_to_publish -Source https://api.nuget.org/v3/index.json

View file

@ -8,13 +8,14 @@
<Description>libSDL2 bindings for C#</Description>
<RootNamespace>SDL2</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<VersionPrefix>2.24.2</VersionPrefix>
</PropertyGroup>
<PropertyGroup Label="NuGet">
<Authors>ppy Pty Ltd &amp; flibitijibibo</Authors>
<Authors>marysaka &amp; ppy Pty Ltd &amp; flibitijibibo</Authors>
<Title>SDL2#</Title>
<PackageId>ppy.SDL2-CS</PackageId>
<PackageProjectUrl>https://github.com/ppy/SDL2-CS</PackageProjectUrl>
<RepositoryUrl>https://github.com/ppy/SDL2-CS</RepositoryUrl>
<PackageId>Ryujinx.SDL2-CS</PackageId>
<PackageProjectUrl>https://github.com/Ryujinx/SDL2-CS</PackageProjectUrl>
<RepositoryUrl>https://github.com/Ryujinx/SDL2-CS</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)native\win-x64\SDL2.dll">