Skip to content

Commit

Permalink
Upgrade to .net 8 (#17)
Browse files Browse the repository at this point in the history
* .

* Upgrade to workflows and fix build issues

* update file name
  • Loading branch information
Gitii authored Aug 17, 2024
1 parent c9496f7 commit d79b29d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 49 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Decode the Pfx
run: |
$signing_keys_payload = [System.Convert]::FromBase64String("${{ secrets.SIGNING_KEY }}")
Expand All @@ -33,7 +34,7 @@ jobs:
- name: Generate coverage
run: ./generate-coverage.cmd
- name: Upload code coverage results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: CoverageResults
Expand All @@ -45,14 +46,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Download code coverage resilts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: code-coverage-report
path: CoverageResults
- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.2.0
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: CoverageResults/coverage.cobertura.xml
filename: CoverageResults/coverage.net6.0-windows7.0.cobertura.xml
badge: true
fail_below_min: true
format: markdown
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:
with:
tagRegex: "v(.*)"
tagRegexGroup: 1
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Extract release notes
run: |
git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > ./RELEASE-NOTES.txt; if (-! $?) { exit 1 } else { exit $LastExitCode }
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
include-prerelease: true
- name: Decode the Pfx
run: |
Expand All @@ -42,7 +43,7 @@ jobs:
env:
TAG_NAME: ${{ steps.tagName.outputs.tag }}
- name: Attach nuget packages to Github releases
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: "./nuget/*.nupkg"
prerelease: ${{ contains(steps.tagName.outputs.tag, '-') }}
Expand Down
14 changes: 7 additions & 7 deletions Community.Wsl.Sdk.Tests/Community.Wsl.Sdk.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows7.0</TargetFramework>
<TargetFrameworks>net6.0-windows7.0;net8.0-windows7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>../sgKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FakeItEasy" Version="7.2.0" />
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
<PackageReference Include="FakeItEasy" Version="8.3.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Community.Wsl.Sdk.Tests/DistroInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void Constructor_ShouldEqualKnownInstanceTest()
WslVersion = 2
};

di.DistroId.Should().Equals(Guid.Empty);
di.DistroId.Should().Be(Guid.Empty);
di.BasePath.Should().Be("path");
di.DefaultEnvironmentVariables.Should().BeEmpty();
di.DefaultUid.Should().Be(0);
Expand Down
30 changes: 1 addition & 29 deletions Community.Wsl.Sdk/Community.Wsl.Sdk.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows;net8.0-windows</TargetFrameworks>
<SupportedOSPlatform>windows</SupportedOSPlatform>
<Description>SDK for Windows Subsystem for Linux for .NET 6</Description>
<Copyright>(c) 2021 Gitii</Copyright>
Expand All @@ -26,34 +26,6 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-windows|AnyCPU'">
<WarningLevel>5</WarningLevel>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-windows|AnyCPU'">
<WarningLevel>5</WarningLevel>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.1|AnyCPU'">
<WarningLevel>5</WarningLevel>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.1|AnyCPU'">
<WarningLevel>5</WarningLevel>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net5.0-windows|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net5.0-windows|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Community.Wsx.Shared">
<Version>1.0.3</Version>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="1.0.702">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.163">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.2.32">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ features into existing Windows applications. You can enumerate, query, executing
## Supported frameworks

- .Net 6
- .Net 8

## Supported Operating Systems

Expand Down

0 comments on commit d79b29d

Please sign in to comment.