Compare commits

...

20 commits

Author SHA1 Message Date
Malte Rosenbjerg
17bbb24138
Merge f31dc2b1cd into 1c4333ee4c 2024-12-05 10:11:35 +01:00
Malte Rosenbjerg
1c4333ee4c
Merge pull request #552 from rosenbjerg/bump-dependencies--instances
Some checks failed
CI / ci (macos-13) (push) Has been cancelled
CI / ci (ubuntu-latest) (push) Has been cancelled
CI / ci (windows-latest) (push) Has been cancelled
Bump Instances
2024-12-05 10:05:06 +01:00
Malte Rosenbjerg
855e6ece30 Bump Instances 2024-12-05 10:59:59 +02:00
Malte Rosenbjerg
6836b143c7
Merge pull request #551 from rosenbjerg/bump-dependencies
Some checks are pending
CI / ci (macos-13) (push) Waiting to run
CI / ci (ubuntu-latest) (push) Waiting to run
CI / ci (windows-latest) (push) Waiting to run
Bump packages
2024-12-04 23:07:53 +01:00
Malte Rosenbjerg
82387dfded
Merge branch 'main' into bump-dependencies 2024-12-04 21:54:58 +01:00
Malte Rosenbjerg
8656a86c47
Merge pull request #409 from rosenbjerg/chore/deterministic-dotnet-builds
Deterministic .NET builds
2024-12-04 21:54:39 +01:00
Malte Rosenbjerg
9d0f8893a5 Use codecov/codecov-action@v4 instead of 5 2024-12-04 22:25:36 +02:00
Malte Rosenbjerg
c7f8c19be7 Specify codecov os 2024-12-04 22:19:57 +02:00
Malte Rosenbjerg
217c1d99e2 Bump extension package nuget version 2024-12-04 22:16:22 +02:00
Malte Rosenbjerg
dedd913682 Bump packages 2024-12-04 22:15:02 +02:00
Malte Rosenbjerg
09faf340fb
Merge branch 'main' into chore/deterministic-dotnet-builds 2024-12-04 20:59:32 +01:00
Malte Rosenbjerg
f31dc2b1cd
Merge branch 'main' into bugfix/ensure-ffmpeg-not-found-throws-ffmpegexception 2024-12-04 20:58:27 +01:00
Malte Rosenbjerg
d43ea98e0e
Merge branch 'main' into bugfix/ensure-ffmpeg-not-found-throws-ffmpegexception 2024-12-04 20:55:04 +01:00
Vlad Jerca
5e62d9ba36
Merge branch 'main' into chore/deterministic-dotnet-builds 2024-06-28 13:52:40 +02:00
Malte Rosenbjerg
508cce8827 Change test path to non-existing directory 2023-02-23 22:00:19 +01:00
Malte Rosenbjerg
349b6044d1 Wrap Instances exception for expected behaviour 2023-02-23 19:18:34 +01:00
Malte Rosenbjerg
e9264a3c2a Update ci.yml 2023-02-22 17:52:56 +01:00
Malte Rosenbjerg
06f5bfa598 Update CI paths 2023-02-22 17:52:29 +01:00
Malte Rosenbjerg
cc2d9890f9 CI yaml fixes 2023-02-22 17:50:35 +01:00
Malte Rosenbjerg
86a500309d Set ContinuousIntegrationBuild to true 2023-02-22 17:49:09 +01:00
8 changed files with 48 additions and 16 deletions

View file

@ -3,19 +3,25 @@ name: CI
on: on:
push: push:
branches: branches:
- master - main
paths: paths:
- .github/workflows/ci.yml - .github/workflows/ci.yml
- Directory.Build.props
- FFMpegCore/** - FFMpegCore/**
- FFMpegCore.Test/** - FFMpegCore.Test/**
- FFMpegCore.Extensions.SkiaSharp/**
- FFMpegCore.Extensions.System.Drawing.Common/**
pull_request: pull_request:
branches: branches:
- main - main
- release - release
paths: paths:
- .github/workflows/ci.yml - .github/workflows/ci.yml
- Directory.Build.props
- FFMpegCore/** - FFMpegCore/**
- FFMpegCore.Test/** - FFMpegCore.Test/**
- FFMpegCore.Extensions.SkiaSharp/**
- FFMpegCore.Extensions.System.Drawing.Common/**
jobs: jobs:
ci: ci:
@ -47,8 +53,9 @@ jobs:
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'
name: Upload coverage reports to Codecov name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5 uses: codecov/codecov-action@v4
with: with:
fail_ci_if_error: true fail_ci_if_error: true
directory: FFMpegCore.Test/TestResults directory: FFMpegCore.Test/TestResults
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
os: windows

View file

@ -13,5 +13,14 @@
<PackageProjectUrl>https://github.com/rosenbjerg/FFMpegCore</PackageProjectUrl> <PackageProjectUrl>https://github.com/rosenbjerg/FFMpegCore</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en</NeutralLanguage> <NeutralLanguage>en</NeutralLanguage>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<Description>Image extension for FFMpegCore using SkiaSharp</Description> <Description>Image extension for FFMpegCore using SkiaSharp</Description>
<PackageVersion>5.0.0</PackageVersion> <PackageVersion>5.0.1</PackageVersion>
<PackageOutputPath>../nupkg</PackageOutputPath> <PackageOutputPath>../nupkg</PackageOutputPath>
<PackageReleaseNotes> <PackageReleaseNotes>
</PackageReleaseNotes> </PackageReleaseNotes>
@ -13,8 +13,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.88.6" /> <PackageReference Include="SkiaSharp" Version="3.116.0" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" /> <PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.116.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<Description>Image extension for FFMpegCore using System.Common.Drawing</Description> <Description>Image extension for FFMpegCore using System.Common.Drawing</Description>
<PackageVersion>5.0.0</PackageVersion> <PackageVersion>5.0.1</PackageVersion>
<PackageOutputPath>../nupkg</PackageOutputPath> <PackageOutputPath>../nupkg</PackageOutputPath>
<PackageReleaseNotes> <PackageReleaseNotes>
</PackageReleaseNotes> </PackageReleaseNotes>
@ -13,7 +13,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="7.0.0"/> <PackageReference Include="System.Drawing.Common" Version="9.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,6 +1,9 @@
using System.Reflection; using System.Reflection;
using FFMpegCore.Arguments; using FFMpegCore.Arguments;
using FFMpegCore.Exceptions;
using FFMpegCore.Helpers;
using FluentAssertions; using FluentAssertions;
using Instances.Exceptions;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FFMpegCore.Test namespace FFMpegCore.Test
@ -99,5 +102,12 @@ public void Audible_Aax_Test()
var arg = new AudibleEncryptionKeyArgument("62689101"); var arg = new AudibleEncryptionKeyArgument("62689101");
arg.Text.Should().Be($"-activation_bytes 62689101"); arg.Text.Should().Be($"-activation_bytes 62689101");
} }
[TestMethod]
public void Throws_FFMpegException_when_ffmpeg_not_found()
{
var exception = Assert.ThrowsException<FFMpegException>(() => FFMpegHelper.VerifyFFMpegExists(new FFOptions { BinaryFolder = "./folder/that/does/not/exist" }));
Assert.IsInstanceOfType<InstanceFileNotFoundException>(exception.InnerException);
}
} }
} }

View file

@ -20,7 +20,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" /> <PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" /> <PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
<PackageReference Include="SkiaSharp" Version="2.88.6" /> <PackageReference Include="SkiaSharp" Version="3.116.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -17,10 +17,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Instances" Version="3.0.0" /> <PackageReference Include="Instances" Version="3.0.1" />
<PackageReference Include="System.Text.Json" Version="9.0.0" /> <PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -42,8 +42,16 @@ public static void VerifyFFMpegExists(FFOptions ffMpegOptions)
return; return;
} }
try
{
var result = Instance.Finish(GlobalFFOptions.GetFFMpegBinaryPath(ffMpegOptions), "-version"); var result = Instance.Finish(GlobalFFOptions.GetFFMpegBinaryPath(ffMpegOptions), "-version");
_ffmpegVerified = result.ExitCode == 0; _ffmpegVerified = result.ExitCode == 0;
}
catch (Exception e)
{
throw new FFMpegException(FFMpegExceptionType.Operation, "ffmpeg was not found on your system", e);
}
if (!_ffmpegVerified) if (!_ffmpegVerified)
{ {
throw new FFMpegException(FFMpegExceptionType.Operation, "ffmpeg was not found on your system"); throw new FFMpegException(FFMpegExceptionType.Operation, "ffmpeg was not found on your system");