Skip to content

Commit

Permalink
[WiP] Drop support for .NET Standard 2.0 and Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Nov 5, 2023
1 parent bdfd7c4 commit ad5b606
Show file tree
Hide file tree
Showing 39 changed files with 139 additions and 338 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jobs:
- os: ubuntu-22.04
container: mcr.microsoft.com/dotnet/sdk:7.0-alpine3.18
script: ./build.sh
# TODO(kleisauke): Re-enable Mono CI when C# 9 features are supported.
# - os: ubuntu-22.04
# script: ./build/test-mono.sh
# allow_failures: true
- os: macos-12
script: ./build.sh
- os: windows-2022
Expand All @@ -45,5 +41,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Test
continue-on-error: ${{ matrix.allow_failures == true }}
run: ${{ matrix.script }}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ which gives some more background.

## Supported platforms

- .NET Framework (4.5.2 and higher)
- .NET Core (.NETStandard 2.0 and higher on Windows, Linux and macOS)
- Mono
- .NET Framework 4.5.2 and higher
- .NET 6.0 and higher

## Install

Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if ((Get-Command "dotnet" -ErrorAction SilentlyContinue) -eq $null) {
exit 1
}

Write-Output "Microsoft (R) .NET Core SDK version $(& dotnet --version)"
Write-Output "Microsoft (R) .NET SDK version $(& dotnet --version)"

ExecSafe { & dotnet build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false /nologo /clp:NoSummary --verbosity quiet }
ExecSafe { & dotnet run --project $BuildProjectFile --no-build -- $BuildArguments }
8 changes: 2 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ export NUKE_TELEMETRY_OPTOUT=1
# EXECUTION
###########################################################################

# Do not use -x to check for the presence of dotnet,
# because that might fail on bash under Alpine 3.14, see:
# https://github.com/alpinelinux/docker-alpine/issues/156
# https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
if ! [ -e "$(command -v dotnet)" ]; then
if ! [ -x "$(command -v dotnet)" ]; then
echo 'Error: dotnet is not installed.' >&2
exit 1
fi

echo "Microsoft (R) .NET Core SDK version $(dotnet --version)"
echo "Microsoft (R) .NET SDK version $(dotnet --version)"

dotnet build "$BUILD_PROJECT_FILE" -nodeReuse:false -p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
dotnet run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
11 changes: 0 additions & 11 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,10 @@ protected override void OnBuildInitialized()
.DependsOn(Clean)
.Executes(() =>
{
// Need to build the macOS and *nix DLL first.
DotNetBuild(c => c
.SetProjectFile(Solution.NetVips)
.SetConfiguration(Configuration)
.SetFramework("netstandard2.0")
.AddProperty("Platform", "AnyCPU")
.CombineWith(
new[] { "OSX", "Unix" },
(_, os) => _.AddProperty("TargetOS", os)));

DotNetPack(c => c
.SetProject(Solution.NetVips)
.SetConfiguration(Configuration)
.SetOutputDirectory(ArtifactsDirectory)
.AddProperty("TargetOS", "Windows")
);
});

Expand Down
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-arm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-arm.targets" target="build/net461" />

<!-- Include libvips Linux ARM64v8 binaries -->
<file src="pack\linux-arm\*.so*" target="runtimes/linux-arm/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-arm\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-arm64.targets" target="build/net461" />

<!-- Include libvips Linux ARM64v8 binaries -->
<file src="pack\linux-arm64\*.so*" target="runtimes/linux-arm64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
3 changes: 1 addition & 2 deletions build/native/NetVips.Native.linux-musl-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<file src="pack\linux-musl-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<!-- Note: Linux musl ARM64v8 is supported since .NET Core 3.0 (.NET Standard 2.1) -->
<file src="_._" target="lib/netstandard2.1" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-musl-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-musl-x64.targets" target="build/net461" />

<!-- Include libvips Linux musl x64 binaries -->
<file src="pack\linux-musl-x64\*.so*" target="runtimes/linux-musl-x64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-musl-x64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-x64.targets" target="build/net461" />

<!-- Include libvips Linux x64 binaries -->
<file src="pack\linux-x64\*.so*" target="runtimes/linux-x64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-x64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
17 changes: 2 additions & 15 deletions build/native/NetVips.Native.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,20 @@

<!-- dependencies -->
<dependencies>
<!-- In-sync with netstandard2.0 below except for NetVips.Native.win-arm64, NetVips.Native.linux-musl-arm64 and NetVips.Native.osx-arm64 -->
<group targetFramework="netstandard2.1">
<group targetFramework="net6.0">
<dependency id="NetVips.Native.linux-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-musl-x64" version="$version$" include="native" />
<!-- Linux musl ARM64v8 is supported since .NET Core 3.0 (.NET Standard 2.1) -->
<dependency id="NetVips.Native.linux-musl-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.osx-x64" version="$version$" include="native" />
<!-- macOS ARM64 (Apple Silicon) is supported on .NET 6.0, but Mono has back-ported this to .NET Standard 2.1 -->
<dependency id="NetVips.Native.osx-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x86" version="$version$" include="native" />
<!-- Windows ARM64 is supported since .NET 5.0 and back-ported to .NET Core 3.1 (.NET Standard 2.1) -->
<dependency id="NetVips.Native.win-arm64" version="$version$" include="native" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="NetVips.Native.linux-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-musl-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.osx-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x86" version="$version$" include="native" />
</group>
<group targetFramework="net452">
<!-- Only .NET Framework/Mono needs to include the build directory containing the .targets file -->
<!-- Only .NET Framework needs to include the build directory containing the .targets file -->
<dependency id="NetVips.Native.win-x64" version="$version$" include="native, build" />
<dependency id="NetVips.Native.win-x86" version="$version$" include="native, build" />
</group>
Expand Down
3 changes: 1 addition & 2 deletions build/native/NetVips.Native.osx-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<file src="pack\osx-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<!-- Note: macOS ARM64 (Apple Silicon) is supported on .NET 6.0, but Mono has back-ported this to .NET Standard 2.1 -->
<file src="_._" target="lib/netstandard2.1" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.osx-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.osx-x64.targets" target="build/net461" />

<!-- Include libvips macOS x64 binaries -->
<file src="pack\osx-x64\*.dylib" target="runtimes/osx-x64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\osx-x64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
3 changes: 1 addition & 2 deletions build/native/NetVips.Native.win-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<file src="pack\win-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<!-- Note: Windows ARM64 is supported since .NET 5.0 and back-ported to .NET Core 3.1 (.NET Standard 2.1) -->
<file src="_._" target="lib/netstandard2.1" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
4 changes: 2 additions & 2 deletions build/native/NetVips.Native.win-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.5 build bits -->
<file src="targets\NetVips.Native.win-x64.targets" target="build/net45" />
<!-- The .NET Framework >= 4.5.2 build bits -->
<file src="targets\NetVips.Native.win-x64.targets" target="build/net452" />

<!-- Include libvips Windows x64 binaries -->
<file src="pack\win-x64\*.dll" target="runtimes/win-x64/native" />
Expand Down
4 changes: 2 additions & 2 deletions build/native/NetVips.Native.win-x86.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.5 build bits -->
<file src="targets\NetVips.Native.win-x86.targets" target="build/net45" />
<!-- The .NET Framework >= 4.5.2 build bits -->
<file src="targets\NetVips.Native.win-x86.targets" target="build/net452" />

<!-- Include libvips Windows x86 binaries -->
<file src="pack\win-x86\*.dll" target="runtimes/win-x86/native" />
Expand Down
18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-arm.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-arm64.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-musl-x64.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-x64.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.osx-x64.targets

This file was deleted.

Loading

0 comments on commit ad5b606

Please sign in to comment.