Introduce changes for this fork needed by Ryujinx

This commit is contained in:
Mary 2021-05-03 11:23:37 +02:00
parent abd696f7c0
commit d73f47d234
3 changed files with 54 additions and 9 deletions

View file

@ -1,6 +1,6 @@
name: build-native
on:
push:
# push:
workflow_dispatch:
inputs: {}
# schedule:
@ -16,9 +16,9 @@ jobs:
fail-fast: false
matrix:
platform:
- { 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: win-x64, os: windows-latest, flags: -A x64 -DHAVE_DINPUT_H=0 }
- { name: win-x86, os: windows-latest, flags: -A Win32 -DHAVE_DINPUT_H=0 }
- { name: win-arm64, os: windows-latest, flags: -A ARM64 -DHAVE_DINPUT_H=0 }
- { name: linux-x64, os: ubuntu-18.04, flags: -GNinja , target_apt_arch: ":amd64" }
- { name: linux-x86, os: ubuntu-18.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" }
@ -68,7 +68,7 @@ jobs:
g++-multilib
- uses: actions/checkout@v2
with:
repository: ppy/SDL
repository: libsdl-org/SDL
- uses: actions/checkout@v2
with:
path: 'SDL2-CS'

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

@ -0,0 +1,34 @@
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '5.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.0.15</VersionPrefix>
</PropertyGroup>
<PropertyGroup Label="NuGet">
<Authors>ppy Pty Ltd &amp; flibitijibibo</Authors>
<Authors>Thog &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,21 @@
<PackagePath>runtimes/win-x86/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\win-arm64\SDL2.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/win-arm64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\osx-x64\libSDL2.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/osx-x64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\osx-arm64\libSDL2.dylib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/osx-arm64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)native\linux-x64\libSDL2.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>runtimes/linux-x64/native</PackagePath>