Skip to content

Commit

Permalink
Create global.json for net9.0 (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros authored Nov 23, 2024
1 parent 616ae36 commit 21dbdaf
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[*]
[*]
indent_style = space
indent_size = 2
charset = utf-8
Expand All @@ -8,6 +8,9 @@ insert_final_newline = true
[*.cs]
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.cs]

# IDE0022: Use block body for method
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

steps:
- name: Checkout source code
uses: actions/checkout@v4

- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
global-json-file: global.json

- name: Test
run: dotnet test --configuration Release
6 changes: 2 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

steps:
- name: Checkout source code
uses: actions/checkout@v4

- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
global-json-file: global.json

- name: Test
run: dotnet test --configuration Release
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"rollForward": "latestMajor"
}
}
2 changes: 1 addition & 1 deletion test/Parlot.Benchmarks/Parlot.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net9.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<AnalysisLevel>latest-Default</AnalysisLevel>
<SignAssembly>False</SignAssembly>
Expand Down
2 changes: 1 addition & 1 deletion test/Parlot.Tests/BenchmarksTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET8_0_OR_GREATER
#if NET9_0_OR_GREATER
using Parlot.Benchmarks;
using Xunit;

Expand Down
2 changes: 1 addition & 1 deletion test/Parlot.Tests/Parlot.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ProjectReference Include="..\..\src\Samples\Samples.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
<ProjectReference Include="../../test/Parlot.Benchmarks/Parlot.Benchmarks.csproj" />
</ItemGroup>

Expand Down

0 comments on commit 21dbdaf

Please sign in to comment.