Skip to content

Commit

Permalink
Removed obsolete netcoreapp2.1 + netcoreapp3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot committed Jan 29, 2025
1 parent 9c74c8e commit bf66485
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 49 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# Several .NET Core versions will be used during the test run.
# The lowest version gets installed first in order to prevent
# "a newer version is already installed" install errors.

- name: Install .NET Core 2.1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 2.1.x

- name: Install .NET Core 3.1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.x

- name: Install .NET 6.0
uses: actions/setup-dotnet@v4
with:
Expand All @@ -68,12 +54,6 @@ jobs:
# Test
# ----

- name: Test on .NET Core 2.1
run: dotnet test -c Release -f netcoreapp2.1 --no-build --no-restore -l "console;verbosity=detailed"

- name: Test on .NET Core 3.1
run: dotnet test -c Release -f netcoreapp3.1 --no-build --no-restore -l "console;verbosity=detailed"

- name: Test on .NET 6.0
run: dotnet test -c Release -f net6.0 --no-build --no-restore -l "console;verbosity=detailed"

Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ for:
after_build:
- ps: |
$wc = New-Object System.Net.WebClient
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "NetCoreClrTestResults.xml"))
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "NetCoreClrWeakNamedTestResults.xml"))
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "Net60TestResults.xml"))
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "Net60WeakNamedTestResults.xml"))
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path "DesktopClrTestResults.xml"))
Expand All @@ -70,6 +68,7 @@ for:
nuget push ".\build\Castle.Core-log4net.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
nuget push ".\build\Castle.Core-NLog.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
nuget push ".\build\Castle.Core-Serilog.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
nuget push ".\build\Castle.Core-DiagnosticsLogger.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
}
# upload packages to AppVeyor
Expand Down
17 changes: 1 addition & 16 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ echo --------------------
mono ./src/Castle.Core.Tests/bin/Release/net462/Castle.Core.Tests.exe --result=DesktopClrTestResults.xml;format=nunit3
mono ./src/Castle.Core.Tests.WeakNamed/bin/Release/net462/Castle.Core.Tests.WeakNamed.exe --result=DesktopClrWeakNamedTestResults.xml;format=nunit3

echo ---------------------------
echo Running NETCOREAPP3.1 Tests
echo ---------------------------

dotnet ./src/Castle.Core.Tests/bin/Release/netcoreapp3.1/Castle.Core.Tests.dll --result=NetCoreClrTestResults.xml;format=nunit3
dotnet ./src/Castle.Core.Tests.WeakNamed/bin/Release/netcoreapp3.1/Castle.Core.Tests.WeakNamed.dll --result=NetCoreClrWeakNamedTestResults.xml;format=nunit3

echo ---------------------------
echo Running NET6.0 Tests
echo ---------------------------
Expand All @@ -62,9 +55,7 @@ dotnet ./src/Castle.Core.Tests/bin/Release/net6.0/Castle.Core.Tests.dll --result
dotnet ./src/Castle.Core.Tests.WeakNamed/bin/Release/net6.0/Castle.Core.Tests.WeakNamed.dll --result=Net60WeakNamedTestResults.xml;format=nunit3

# Ensure that all test runs produced a protocol file:
if [[ !( -f NetCoreClrTestResults.xml &&
-f NetCoreClrWeakNamedTestResults.xml &&
-f Net60TestResults.xml &&
if [[ !( -f Net60TestResults.xml &&
-f Net60WeakNamedTestResults.xml &&
-f DesktopClrTestResults.xml &&
-f DesktopClrWeakNamedTestResults.xml ) ]]; then
Expand All @@ -73,12 +64,6 @@ if [[ !( -f NetCoreClrTestResults.xml &&
fi

# Unit test failure
NETCORE_FAILCOUNT=$(grep -F "One or more child tests had errors" NetCoreClrTestResults.xml NetCoreClrWeakNamedTestResults.xml | wc -l)
if [ $NETCORE_FAILCOUNT -ne 0 ]
then
echo "NetCore Tests have failed, failing the build"
exit 1
fi

NET60_FAILCOUNT=$(grep -F "One or more child tests had errors" Net60TestResults.xml Net60WeakNamedTestResults.xml | wc -l)
if [ $NET60_FAILCOUNT -ne 0 ]
Expand Down
8 changes: 0 additions & 8 deletions buildscripts/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ echo --------------------
%UserProfile%\.nuget\packages\nunit.consolerunner\3.11.1\tools\nunit3-console.exe src/Castle.Core.Tests/bin/%Configuration%/net462/Castle.Core.Tests.exe --result=DesktopClrTestResults.xml;format=nunit3 || exit /b 1
%UserProfile%\.nuget\packages\nunit.consolerunner\3.11.1\tools\nunit3-console.exe src/Castle.Core.Tests.WeakNamed/bin/%Configuration%/net462/Castle.Core.Tests.WeakNamed.exe --result=DesktopClrWeakNamedTestResults.xml;format=nunit3 || exit /b 1

echo ---------------------------
echo Running NETCOREAPP3.1 Tests
echo ---------------------------

dotnet .\src\Castle.Core.Tests\bin\%Configuration%\netcoreapp3.1\Castle.Core.Tests.dll --result=NetCoreClrTestResults.xml;format=nunit3 || exit /b 1
dotnet .\src\Castle.Core.Tests.WeakNamed\bin\%Configuration%\netcoreapp3.1/Castle.Core.Tests.WeakNamed.dll --result=NetCoreClrWeakNamedTestResults.xml;format=nunit3 || exit /b 1


echo ---------------------------
echo Running NET6.0 Tests
echo ---------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\buildscripts\common.props"></Import>

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -16,6 +16,7 @@
<SignAssembly>False</SignAssembly>
<PublicSign Condition="'$(OS)'=='Unix'">false</PublicSign>
<StartupObject>Program</StartupObject>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions src/Castle.Core.Tests/Castle.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\buildscripts\common.props"></Import>

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -17,6 +17,7 @@
<AssemblyOriginatorKeyFile>..\..\buildscripts\CastleKey.snk</AssemblyOriginatorKeyFile>
<PublicSign Condition="'$(OS)'=='Unix'">true</PublicSign>
<StartupObject>Program</StartupObject>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

<ItemGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier(&quot;$(TargetFramework)&quot;))' == '.NETFramework'">
Expand Down Expand Up @@ -47,7 +48,7 @@
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<PackageReference Include="NUnitLite" Version="3.13.3" />
<PackageReference Include="log4net" Version="2.0.13" />
<PackageReference Include="NLog" Version="4.5.0" />
<PackageReference Include="NLog" Version="4.7.15" />
<PackageReference Include="Serilog" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.TextWriter" Version="2.0.0" />
<ProjectReference Include="..\Castle.Core\Castle.Core.csproj" />
Expand Down

0 comments on commit bf66485

Please sign in to comment.