Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Yellow-Dog-Man/Compressonator.NET
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablePrime committed Feb 6, 2025
2 parents aae45bd + 6d21414 commit 994fbfd
Show file tree
Hide file tree
Showing 19 changed files with 63 additions and 9 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,21 @@ on:

jobs:
build:
runs-on: windows-latest
name: build-and-test-${{matrix.os}}
runs-on: ${{ matrix.os }}
env:
BUILD_RUNTIME: ${{ matrix.os == 'ubuntu-latest' && 'linux-x64' || 'windows-x64' }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --configuration Release
3 changes: 1 addition & 2 deletions Compressonator.NET.Samples/Compressonator.NET.Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
Expand Down
23 changes: 23 additions & 0 deletions Compressonator.NET.Tests/Compressonator.NET.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest" Version="3.6.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Compressonator.NET\Compressonator.NET.csproj" />
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions Compressonator.NET.Tests/MSTestSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
17 changes: 17 additions & 0 deletions Compressonator.NET.Tests/NativeTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Compressonator.NET.Tests;

[TestClass]
public sealed class NativeTests
{
[TestMethod]
public void TestSDKNative()
{
Assert.IsTrue(SDK_NativeMethods.IsSupported, "SDK Native methods should be supported");
}

[TestMethod]
public void TestFrameworkNative()
{
Assert.IsTrue(FrameworkNativeMethods.IsSupported, "Framework Native Methods should be supported.");
}
}
6 changes: 6 additions & 0 deletions Compressonator.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Compressonator.NET", "Compr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Compressonator.NET.Samples", "Compressonator.NET.Samples\Compressonator.NET.Samples.csproj", "{A6A2F93F-7A66-4792-A4C2-2913C7071B24}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Compressonator.NET.Tests", "Compressonator.NET.Tests\Compressonator.NET.Tests.csproj", "{5C813410-F2AB-4948-909A-463E308E4D23}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{A6A2F93F-7A66-4792-A4C2-2913C7071B24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6A2F93F-7A66-4792-A4C2-2913C7071B24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6A2F93F-7A66-4792-A4C2-2913C7071B24}.Release|Any CPU.Build.0 = Release|Any CPU
{5C813410-F2AB-4948-909A-463E308E4D23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C813410-F2AB-4948-909A-463E308E4D23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C813410-F2AB-4948-909A-463E308E4D23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C813410-F2AB-4948-909A-463E308E4D23}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 3 additions & 6 deletions Compressonator.NET/Compressonator.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
<TargetFramework>netstandard2.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<!--Default runtime identifier-->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,7 +29,7 @@
</ItemGroup>

<!-- WINDOWS -->
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<ItemGroup>
<ContentWithTargetPath Include="Native\win-x64\*.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
Expand All @@ -41,11 +38,11 @@
</ItemGroup>

<ItemGroup>
<None Include="Native\win-x64\*.dll" Pack="True" PackagePath="runtimes\win-x64\native\"></None>
<None Include="Native\win-x64\*.dll" Pack="True" PackagePath="runtimes\win-x64\native\" ></None>
</ItemGroup>

<!-- LINUX -->
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64'">
<ItemGroup>
<ContentWithTargetPath Include="Native\linux-x64\*.so">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
Expand Down
Binary file not shown.
Binary file modified Compressonator.NET/Native/linux-x64/libCMP_Compressonator.so
Binary file not shown.
Binary file removed Compressonator.NET/Native/linux-x64/libCMP_Core.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Compressonator.NET/Native/linux-x64/libCMP_Framework.so
Binary file not shown.
Binary file not shown.
Binary file removed Compressonator.NET/Native/linux-x64/libImage_DDS.so
Binary file not shown.
Binary file removed Compressonator.NET/Native/linux-x64/libImage_EXR.so
Binary file not shown.
Binary file removed Compressonator.NET/Native/linux-x64/libImage_KTX.so
Binary file not shown.
Binary file removed Compressonator.NET/Native/linux-x64/libImage_TGA.so
Binary file not shown.

0 comments on commit 994fbfd

Please sign in to comment.