From 7c845fc47c8e62d7652bc3d3d7e525b12a043535 Mon Sep 17 00:00:00 2001 From: Oleh Formaniuk Date: Sat, 18 Dec 2021 16:46:14 -0800 Subject: [PATCH 1/2] Add `net5` and `net6` as TargetFrameworks --- .github/auto-merge.yml | 17 -------- .github/workflows/ci.yml | 43 +++++++++++-------- .github/workflows/pull_request.yml | 38 +++++++++------- .github/workflows/release.yml | 6 ++- .../Handlebars.Benchmark.csproj | 4 +- source/Handlebars.Test/Handlebars.Test.csproj | 12 +++++- source/Handlebars/Handlebars.csproj | 17 +++++++- 7 files changed, 82 insertions(+), 55 deletions(-) delete mode 100644 .github/auto-merge.yml diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml deleted file mode 100644 index decfebec..00000000 --- a/.github/auto-merge.yml +++ /dev/null @@ -1,17 +0,0 @@ -updateBranch: true -deleteBranchAfterMerge: true -reportStatus: true - -minApprovals: - MEMBER: 1 -maxRequestedChanges: - NONE: 0 -blockingLabels: - - blocked - -# Will merge whenever the above conditions are met, but also when merge label was added. -rules: - - minApprovals: - MEMBER: 0 - - requiredLabels: - - merge \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3b4db42..632e4b00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,13 @@ jobs: steps: - uses: actions/checkout@master - name: Setup dotnet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.x + uses: actions/setup-dotnet@v1 + with: + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 working-directory: ./source run: dotnet clean -c Release && dotnet nuget locals all --clear @@ -30,14 +34,14 @@ jobs: os: [ macos-latest, ubuntu-latest, windows-latest ] steps: - uses: actions/checkout@master - - name: Setup dotnet 2.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 2.1.x - - name: Setup dotnet 3.1 + - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 working-directory: ./source run: dotnet clean -c Release && dotnet nuget locals all --clear @@ -52,14 +56,14 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Setup dotnet 2.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 2.1.x - - name: Setup dotnet 3.1 + - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - uses: actions/setup-java@v1 with: java-version: '13' # The JDK version to make available on the path. @@ -102,9 +106,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v1 + - name: Setup dotnet + uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 working-directory: ./source run: dotnet clean -c Release && dotnet nuget locals all --clear diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ea3ff8b5..99b9b235 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -13,7 +13,10 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 3.1.x + 5.0.x + 6.0.x - name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 working-directory: ./source run: dotnet clean -c Release && dotnet nuget locals all --clear @@ -30,14 +33,14 @@ jobs: os: [ macos-latest, ubuntu-latest, windows-latest ] steps: - uses: actions/checkout@master - - name: Setup dotnet 2.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 2.1.x - - name: Setup dotnet 3.1 + - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 working-directory: ./source run: dotnet clean -c Release && dotnet nuget locals all --clear @@ -52,14 +55,14 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Setup dotnet 2.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 2.1.x - - name: Setup dotnet 3.1 + - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - uses: actions/setup-java@v1 with: java-version: '13' # The JDK version to make available on the path. @@ -102,9 +105,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v1 + - name: Setup dotnet + uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 working-directory: ./source run: dotnet clean -c Release && dotnet nuget locals all --clear diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70341576..7d6c53e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,11 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.x + dotnet-version: | + 2.1.x + 3.1.x + 5.0.x + 6.0.x - name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 working-directory: ./source diff --git a/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj b/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj index d145c7bb..8e9b0d65 100644 --- a/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj +++ b/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj @@ -2,14 +2,14 @@ Exe - netcoreapp3.1 + netcoreapp3.1;net5;net6 false false HandlebarsNet.Benchmark - + diff --git a/source/Handlebars.Test/Handlebars.Test.csproj b/source/Handlebars.Test/Handlebars.Test.csproj index 0ff1fb0d..51914fe5 100644 --- a/source/Handlebars.Test/Handlebars.Test.csproj +++ b/source/Handlebars.Test/Handlebars.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp2.1;netcoreapp3.1 + netcoreapp2.1;netcoreapp3.1;net5;net6 $(TargetFrameworks);net452;net46;net461;net472 6BA232A6-8C4D-4C7D-BD75-1844FE9774AF HandlebarsDotNet.Test @@ -36,6 +36,14 @@ $(DefineConstants);netcoreapp;netstandard + + $(DefineConstants);netcoreapp;netstandard;net + + + + $(DefineConstants);netcoreapp;netstandard;net + + @@ -62,7 +70,7 @@ - + diff --git a/source/Handlebars/Handlebars.csproj b/source/Handlebars/Handlebars.csproj index 41d33494..9b44b01d 100644 --- a/source/Handlebars/Handlebars.csproj +++ b/source/Handlebars/Handlebars.csproj @@ -3,7 +3,7 @@ Handlebars 9822C7B8-7E51-42BC-9A49-72A10491B202 - netstandard1.3;netstandard2.0;netstandard2.1 + netstandard1.3;netstandard2.0;netstandard2.1;net5;net6 $(TargetFrameworks);net451;net452;net46 2.0.0 HandlebarsDotNet @@ -66,9 +66,24 @@ + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + From e15a7f7593a07b3d1c26f2ff85e0ab6c93334faa Mon Sep 17 00:00:00 2001 From: Oleh Formaniuk Date: Sat, 18 Dec 2021 16:51:01 -0800 Subject: [PATCH 2/2] Specify framework directly for Benchmark --- .github/workflows/ci.yml | 2 +- .github/workflows/pull_request.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 632e4b00..f41bf666 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,7 +119,7 @@ jobs: run: dotnet clean -c Release && dotnet nuget locals all --clear - name: Run benchmark working-directory: ./source/Handlebars.Benchmark - run: dotnet run -c Release --exporters json --filter '*' -m --join + run: dotnet run -c Release -f net6 --exporters json --filter '*' -m --join - name: Get benchmark file name id: benchmarkfilename working-directory: ./source/Handlebars.Benchmark/BenchmarkDotNet.Artifacts/results diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 99b9b235..41ad537b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -118,7 +118,7 @@ jobs: run: dotnet clean -c Release && dotnet nuget locals all --clear - name: Run benchmark working-directory: ./source/Handlebars.Benchmark - run: dotnet run -c Release --exporters json --filter '*' -m --join + run: dotnet run -c Release -f net6 --exporters json --filter '*' -m --join - name: Get benchmark file name working-directory: ./source/Handlebars.Benchmark/BenchmarkDotNet.Artifacts/results id: benchmarkfilename