mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-06-30 19:03:42 -04:00
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@ -1,9 +1,9 @@
|
|||||||
name: Build
|
name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: master
|
branches: ["master"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: "*"
|
branches: ["*"]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "README.md"
|
- "README.md"
|
||||||
- ".github/ISSUE_TEMPLATE/**"
|
- ".github/ISSUE_TEMPLATE/**"
|
||||||
@ -35,7 +35,9 @@ jobs:
|
|||||||
- name: setup dotnet
|
- name: setup dotnet
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: |
|
||||||
|
6.0.x
|
||||||
|
8.0.x
|
||||||
|
|
||||||
- name: setup dependencies
|
- name: setup dependencies
|
||||||
run: |
|
run: |
|
||||||
@ -81,7 +83,9 @@ jobs:
|
|||||||
- name: setup dotnet
|
- name: setup dotnet
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: |
|
||||||
|
6.0.x
|
||||||
|
8.0.x
|
||||||
|
|
||||||
- name: build projects
|
- name: build projects
|
||||||
run: dotnet build -c Release /p:BuildArch=${{ matrix.arch }}
|
run: dotnet build -c Release /p:BuildArch=${{ matrix.arch }}
|
||||||
@ -114,7 +118,9 @@ jobs:
|
|||||||
- name: setup dotnet
|
- name: setup dotnet
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: |
|
||||||
|
6.0.x
|
||||||
|
8.0.x
|
||||||
|
|
||||||
- name: build projects
|
- name: build projects
|
||||||
run: dotnet build -c Release /p:BuildArch=${{ matrix.arch }}
|
run: dotnet build -c Release /p:BuildArch=${{ matrix.arch }}
|
||||||
@ -167,7 +173,9 @@ jobs:
|
|||||||
- name: setup dotnet
|
- name: setup dotnet
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: |
|
||||||
|
6.0.x
|
||||||
|
8.0.x
|
||||||
|
|
||||||
- name: create NuGet Package
|
- name: create NuGet Package
|
||||||
run: dotnet pack Raylib-cs -c Release --output nuget
|
run: dotnet pack Raylib-cs -c Release --output nuget
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<StartupObject>Examples.Program</StartupObject>
|
<StartupObject>Examples.Program</StartupObject>
|
||||||
<RunWorkingDirectory>$(MSBuildThisFileDirectory)</RunWorkingDirectory>
|
<RunWorkingDirectory>$(MSBuildThisFileDirectory)</RunWorkingDirectory>
|
||||||
|
4
Raylib-cs.Native/Native.cs
Normal file
4
Raylib-cs.Native/Native.cs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
namespace Raylib_cs.Native
|
||||||
|
{
|
||||||
|
internal class Native { }
|
||||||
|
}
|
@ -1,8 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="ConfigureNative">
|
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="ConfigureNative">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
|
||||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
|
<DebugType>none</DebugType>
|
||||||
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
|
<GenerateDependencyFile>False</GenerateDependencyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="../Raylib-cs/Build.props" />
|
<Import Project="../Raylib-cs/Build.props" />
|
||||||
@ -44,11 +46,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content
|
<Content Include="$(OutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)" Link="%(Filename)%(Extension)" CopyToOutputDirectory="PreserveNewest" Condition="Exists('$(OutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)')" />
|
||||||
Include="$(OutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)"
|
|
||||||
Link="%(Filename)%(Extension)"
|
|
||||||
CopyToOutputDirectory="PreserveNewest"
|
|
||||||
Condition="Exists('$(OutputPath)native/raylib/$(NativePre)raylib.$(NativeExt)')" />
|
|
||||||
|
|
||||||
<CMakeArgs Include="-B $(OutputPath)native" />
|
<CMakeArgs Include="-B $(OutputPath)native" />
|
||||||
<CMakeArgs Include="-S $(BaseIntermediateOutputPath)raylib-$(TargetRaylibTag)" />
|
<CMakeArgs Include="-S $(BaseIntermediateOutputPath)raylib-$(TargetRaylibTag)" />
|
||||||
@ -58,25 +56,16 @@
|
|||||||
<CMakeArgs Include="-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" />
|
<CMakeArgs Include="-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded" />
|
||||||
<CMakeArgs Include="-D CMAKE_MINIMUM_REQUIRED_VERSION=3.15" />
|
<CMakeArgs Include="-D CMAKE_MINIMUM_REQUIRED_VERSION=3.15" />
|
||||||
<CMakeArgs Include="-D CMAKE_POLICY_DEFAULT_CMP0091=NEW" />
|
<CMakeArgs Include="-D CMAKE_POLICY_DEFAULT_CMP0091=NEW" />
|
||||||
|
<!-- <CMakeArgs Include="-D GLFW_BUILD_WAYLAND=ON" /> -->
|
||||||
<!-- <CMakeArgs Include="-D GRAPHICS=GRAPHICS_API_OPENGL_43" /> -->
|
<!-- <CMakeArgs Include="-D GRAPHICS=GRAPHICS_API_OPENGL_43" /> -->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="ConfigureNative" Condition="$(SkipLocalBuild) != true">
|
<Target Name="ConfigureNative" Condition="$(SkipLocalBuild) != true">
|
||||||
<DownloadFile
|
<DownloadFile SourceUrl="https://github.com/raysan5/raylib/archive/refs/tags/$(TargetRaylibTag).zip" DestinationFolder="$(BaseIntermediateOutputPath)" DestinationFileName="raylib.zip" Condition="!Exists('$(BaseIntermediateOutputPath)raylib.zip')" />
|
||||||
SourceUrl="https://github.com/raysan5/raylib/archive/refs/tags/$(TargetRaylibTag).zip"
|
|
||||||
DestinationFolder="$(BaseIntermediateOutputPath)"
|
|
||||||
DestinationFileName="raylib.zip"
|
|
||||||
Condition="!Exists('$(BaseIntermediateOutputPath)raylib.zip')" />
|
|
||||||
|
|
||||||
<Unzip
|
<Unzip SourceFiles="$(BaseIntermediateOutputPath)raylib.zip" DestinationFolder="$(BaseIntermediateOutputPath)" OverwriteReadOnlyFiles="true" Condition="!Exists('$(BaseIntermediateOutputPath)raylib-$(TargetRaylibTag)')" />
|
||||||
SourceFiles="$(BaseIntermediateOutputPath)raylib.zip"
|
|
||||||
DestinationFolder="$(BaseIntermediateOutputPath)"
|
|
||||||
OverwriteReadOnlyFiles="true"
|
|
||||||
Condition="!Exists('$(BaseIntermediateOutputPath)raylib-$(TargetRaylibTag)')" />
|
|
||||||
|
|
||||||
<Exec Command="cmake @(CMakeArgs, ' ') $(CMakeExtraArgs)"
|
|
||||||
Condition="!Exists('$(BaseIntermediateOutputPath)native/CMakeCache.txt')" />
|
|
||||||
|
|
||||||
|
<Exec Command="cmake @(CMakeArgs, ' ') $(CMakeExtraArgs)" />
|
||||||
<Exec Command="cmake --build $(OutputPath)native --config $(Configuration)" />
|
<Exec Command="cmake --build $(OutputPath)native --config $(Configuration)" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>12</LangVersion>
|
<LangVersion>12</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.6.2" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" />
|
||||||
<PackageReference Include="coverlet.collector" Version="1.3.0" />
|
<PackageReference Include="coverlet.collector" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
|
||||||
<EnableDefaultItems>false</EnableDefaultItems>
|
<EnableDefaultItems>false</EnableDefaultItems>
|
||||||
<AssemblyName>Raylib-cs</AssemblyName>
|
<AssemblyName>Raylib-cs</AssemblyName>
|
||||||
<RootNamespace>Raylib_cs</RootNamespace>
|
<RootNamespace>Raylib_cs</RootNamespace>
|
||||||
|
Reference in New Issue
Block a user