diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 8d3dd7f..06fc27e 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -25,29 +25,27 @@ jobs: VSTEST_CONNECTION_TIMEOUT: 900 steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 with: dotnet-version: | - 3.1.x - 5.0.x 6.0.x - 7.0.x + 8.0.x - name: Install dependencies run: dotnet restore src/${{ env.PROJECT_NAME }}.sln - name: Build solution run: dotnet build src/${{ env.PROJECT_NAME }}.sln -c Release --no-restore - name: Test run: dotnet test src/${{ env.PROJECT_NAME }}.sln -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../coverage/ - - uses: codecov/codecov-action@v2 + - uses: codecov/codecov-action@v4 if: github.ref == 'refs/heads/main' with: token: ${{ secrets.CODECOV_TOKEN }} directory: src/coverage flags: unittests - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: nupkg path: src/${{ env.PROJECT_NAME }}/bin/Release/*.nupkg diff --git a/.github/workflows/continous-benchmark.yml b/.github/workflows/continous-benchmark.yml index 11e91f2..9b84a0e 100644 --- a/.github/workflows/continous-benchmark.yml +++ b/.github/workflows/continous-benchmark.yml @@ -13,21 +13,18 @@ jobs: working-directory: ./src steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 with: dotnet-version: | - 3.1.x - 5.0.x - 6.0.x - 7.0.x + 8.0.x # Run benchmark with `go test -bench` and stores the output to a file - name: Run benchmark - run: dotnet run --project ./GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj --framework net6 --runtimes net60 -c Release -- --job medium -f *SerializeAndDeserialize* + run: dotnet run --project ./GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj -c Release -- --job medium -f *SerializeAndDeserialize* # Download previous benchmark result from cache (if exists) - name: Download previous benchmark data - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ./cache key: ${{ runner.os }}-benchmark diff --git a/src/GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj b/src/GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj index 8aefd83..2c8a0ed 100644 --- a/src/GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj +++ b/src/GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj @@ -1,11 +1,11 @@  - net6.0;net7.0;netstandard2.0 + net8.0 + Exe disable enable False - 10 @@ -27,9 +27,9 @@ - - - + + + diff --git a/src/GeoJSON.Text.Test.Benchmark/TestConfig.cs b/src/GeoJSON.Text.Test.Benchmark/TestConfig.cs index 8c0324b..4ba45b5 100644 --- a/src/GeoJSON.Text.Test.Benchmark/TestConfig.cs +++ b/src/GeoJSON.Text.Test.Benchmark/TestConfig.cs @@ -33,7 +33,7 @@ public TestConfig() private class FastestToSlowestOrderer : IOrderer { - public IEnumerable GetExecutionOrder(ImmutableArray benchmarksCase) => + public IEnumerable GetExecutionOrder(ImmutableArray benchmarksCase, IEnumerable? order = null) => from benchmark in benchmarksCase orderby benchmark.Parameters["X"] descending, benchmark.Descriptor.WorkloadMethodDisplayInfo @@ -44,13 +44,13 @@ from benchmark in benchmarksCase public string GetLogicalGroupKey(ImmutableArray allBenchmarksCases, BenchmarkCase benchmarkCase) => benchmarkCase.Job.DisplayInfo + "_" + benchmarkCase.Parameters.DisplayInfo; - public IEnumerable> GetLogicalGroupOrder(IEnumerable> logicalGroups) => + public IEnumerable> GetLogicalGroupOrder(IEnumerable> logicalGroups, IEnumerable? order = null) => logicalGroups.OrderBy(it => it.Key); public IEnumerable GetSummaryOrder(ImmutableArray benchmarksCases, Summary summary) { var benchmarkResult = from benchmark in benchmarksCases - orderby summary[benchmark].ResultStatistics.Mean + orderby summary[benchmark]?.ResultStatistics?.Mean ?? 0 select benchmark; return benchmarkResult; diff --git a/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj b/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj index 4aaddd3..8b52673 100644 --- a/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj +++ b/src/GeoJSON.Text.Test.Unit/GeoJSON.Text.Test.Unit.csproj @@ -4,9 +4,8 @@ {6C93B314-9208-4684-B873-172F7EC81689} GeoJSON.Text.Tests GeoJSON.Text.Tests - net6.0;net7.0;netstandard2.0 + net6.0;net8.0 false - 10 @@ -61,18 +60,18 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + diff --git a/src/GeoJSON.Text/GeoJSON.Text.csproj b/src/GeoJSON.Text/GeoJSON.Text.csproj index 3b580a2..bed1fa6 100644 --- a/src/GeoJSON.Text/GeoJSON.Text.csproj +++ b/src/GeoJSON.Text/GeoJSON.Text.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;netstandard2.0 + net6.0;net8.0;netstandard2.0 10 .Net types for the GeoJSON RFC to be used with System.Text.Json Matt Hunt @@ -29,15 +29,11 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + - - + + \ No newline at end of file