Introduce needed changes for Ryujinx's fork

This commit is contained in:
Mary 2022-11-18 18:04:32 +01:00 committed by TSR Berry
parent b4c039993e
commit b6e8330d71
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
3 changed files with 59 additions and 23 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:
@ -16,12 +20,11 @@ jobs:
matrix:
platform:
- { name: win-x64, os: windows-latest, flags: -A x64 }
- { name: win-x86, os: windows-latest, flags: -A Win32 }
#- { 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-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: 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="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,11 +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@v3
with:
repository: 'libsdl-org/SDL'
ref: 'SDL2'
repository: Ryujinx/SDL
ref: ${{ github.event.inputs.rev }}
- uses: actions/checkout@v3
with:
path: 'SDL2-CS'
@ -104,6 +110,11 @@ jobs:
- name: Prepare release (macOS)
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
- 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.27.0</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">
@ -27,11 +28,6 @@
<PackagePath>runtimes/win-arm64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\win-x86\SDL2.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/win-x86/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\osx-x64\libSDL2.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/osx-x64/native</PackagePath>
@ -47,11 +43,6 @@
<PackagePath>runtimes/linux-x64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\linux-x86\libSDL2.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/linux-x86/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\ios\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/ios/native</PackagePath>