From 517075facda2fdbdaba584ab1fdfdf5508c892c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Thu, 6 Feb 2025 09:48:17 +0100 Subject: [PATCH 1/5] Update GitHub runner to Ubuntu 24.04 --- .github/workflows/dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 44658dd..fd4a7a3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,7 +13,7 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Setup .NET @@ -60,7 +60,7 @@ jobs: tfm: net8.0 - sdk: 9.0.x tfm: net9.0 - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Download all workflow run artifacts @@ -85,7 +85,7 @@ jobs: publish: if: (github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' needs: [build, test] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Download all workflow run artifacts uses: actions/download-artifact@v4 @@ -109,7 +109,7 @@ jobs: update_versions: needs: [build, publish] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Update package versions in the repo From 51e6961c3c400ed0c8af9873d4f77c2ec7237c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Thu, 6 Feb 2025 09:53:10 +0100 Subject: [PATCH 2/5] Switch to release builds in CI --- .github/workflows/dotnet.yml | 6 +++--- src/jab.sln | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index fd4a7a3..5f359ec 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -23,9 +23,9 @@ jobs: 8.0.x 9.0.x - name: Build - run: dotnet build src + run: dotnet build src --configuration Release - name: Test - run: dotnet test src --no-build --verbosity normal + run: dotnet test src --no-build --configuration Release --verbosity normal - name: Pack run: dotnet pack src --output nuget /p:ReleaseVersion=${{ github.event.inputs.ReleaseVersion }} - name: Get package version @@ -81,7 +81,7 @@ jobs: $version = $version.Substring(0, $version.LastIndexOf(".")) Write-Output "FunctionalTestPackageVersion=$version" | Out-File "${env:GITHUB_OUTPUT}" -Append - name: Test - run: dotnet test eng/FunctionaTests.proj /p:FunctionalTestTargetFrameworks=${{ matrix.tfm }} /p:RestoreAdditionalProjectSources=${{ github.workspace }}/nuget /p:FunctionalTestPackageVersion=${{ needs.build.outputs.PackageVersion }} + run: dotnet test eng/FunctionaTests.proj --configuration Release /p:FunctionalTestTargetFrameworks=${{ matrix.tfm }} /p:RestoreAdditionalProjectSources=${{ github.workspace }}/nuget /p:FunctionalTestPackageVersion=${{ needs.build.outputs.PackageVersion }} publish: if: (github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' needs: [build, test] diff --git a/src/jab.sln b/src/jab.sln index ae436bd..8bd63a2 100644 --- a/src/jab.sln +++ b/src/jab.sln @@ -94,24 +94,24 @@ Global {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Debug|x64.Build.0 = Debug|Any CPU {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Debug|x86.ActiveCfg = Debug|Any CPU {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Debug|x86.Build.0 = Debug|Any CPU - {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.Build.0 = Debug|Any CPU - {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.ActiveCfg = Debug|Any CPU - {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.Build.0 = Debug|Any CPU - {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.ActiveCfg = Debug|Any CPU - {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.Build.0 = Debug|Any CPU + {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|Any CPU.Build.0 = Release|Any CPU + {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.ActiveCfg = Release|Any CPU + {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x64.Build.0 = Release|Any CPU + {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.ActiveCfg = Release|Any CPU + {E06AB4BC-0AC8-4063-BA0E-810358AF905B}.Release|x86.Build.0 = Release|Any CPU {B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|Any CPU.Build.0 = Debug|Any CPU {B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x64.ActiveCfg = Debug|Any CPU {B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x64.Build.0 = Debug|Any CPU {B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x86.ActiveCfg = Debug|Any CPU {B623424A-6395-45BB-B766-AEB7CD8414E5}.Debug|x86.Build.0 = Debug|Any CPU - {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.Build.0 = Debug|Any CPU - {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.ActiveCfg = Debug|Any CPU - {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.Build.0 = Debug|Any CPU - {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.ActiveCfg = Debug|Any CPU - {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.Build.0 = Debug|Any CPU + {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|Any CPU.Build.0 = Release|Any CPU + {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.ActiveCfg = Release|Any CPU + {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x64.Build.0 = Release|Any CPU + {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.ActiveCfg = Release|Any CPU + {B623424A-6395-45BB-B766-AEB7CD8414E5}.Release|x86.Build.0 = Release|Any CPU {E05277A5-CC2E-4B55-BCE7-B298803F1875}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E05277A5-CC2E-4B55-BCE7-B298803F1875}.Debug|Any CPU.Build.0 = Debug|Any CPU {E05277A5-CC2E-4B55-BCE7-B298803F1875}.Debug|x64.ActiveCfg = Debug|Any CPU From 41a6bc9b0346d02c7ba228a44216f76e81e65694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Thu, 6 Feb 2025 10:19:29 +0100 Subject: [PATCH 3/5] Fix obsolete warning for XUnitVerifier --- src/Jab.Tests/GeneratorAnalyzerTest.cs | 6 ++---- src/Jab.Tests/GeneratorAnalyzerVerifier.cs | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Jab.Tests/GeneratorAnalyzerTest.cs b/src/Jab.Tests/GeneratorAnalyzerTest.cs index b014db3..80e4ae8 100644 --- a/src/Jab.Tests/GeneratorAnalyzerTest.cs +++ b/src/Jab.Tests/GeneratorAnalyzerTest.cs @@ -1,13 +1,11 @@ using System.IO; using Microsoft.CodeAnalysis.CSharp.Testing; using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.Testing.Verifiers; - -using Jab; +using Microsoft.CodeAnalysis.Testing; namespace JabTests { - public class GeneratorAnalyzerTest : CSharpAnalyzerTest where TAnalyzer : DiagnosticAnalyzer, new() + public class GeneratorAnalyzerTest : CSharpAnalyzerTest where TAnalyzer : DiagnosticAnalyzer, new() { public GeneratorAnalyzerTest() { diff --git a/src/Jab.Tests/GeneratorAnalyzerVerifier.cs b/src/Jab.Tests/GeneratorAnalyzerVerifier.cs index a367ab4..55a4f5e 100644 --- a/src/Jab.Tests/GeneratorAnalyzerVerifier.cs +++ b/src/Jab.Tests/GeneratorAnalyzerVerifier.cs @@ -1,10 +1,8 @@ using System.Threading; using System.Threading.Tasks; -using Microsoft.CodeAnalysis.CSharp.Testing.XUnit; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Testing; - -using Jab; +using Microsoft.CodeAnalysis.CSharp.Testing; namespace JabTests { @@ -26,6 +24,6 @@ public static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] return test.RunAsync(CancellationToken.None); } - public static DiagnosticResult Diagnostic(string expectedDescriptor) => AnalyzerVerifier.Diagnostic(expectedDescriptor); + public static DiagnosticResult Diagnostic(string expectedDescriptor) => CSharpAnalyzerVerifier.Diagnostic(expectedDescriptor); } } \ No newline at end of file From da564ca5850fc80e932256252f93dd1c15b0866b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Thu, 6 Feb 2025 10:26:06 +0100 Subject: [PATCH 4/5] Add README and license expression for the Attributes package --- src/Jab.Attributes/Jab.Attributes.csproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Jab.Attributes/Jab.Attributes.csproj b/src/Jab.Attributes/Jab.Attributes.csproj index ee7bff2..e733897 100644 --- a/src/Jab.Attributes/Jab.Attributes.csproj +++ b/src/Jab.Attributes/Jab.Attributes.csproj @@ -8,10 +8,16 @@ $(DefineConstants);JAB_ATTRIBUTES_PACKAGE;GENERIC_ATTRIBUTES 0.11.0 $(ReleaseVersion) + README.md + MIT + + + + From 55f098cbd2452a3900e197bb2c52ea5a9dc02a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Thu, 6 Feb 2025 10:33:52 +0100 Subject: [PATCH 5/5] Fix typo in project name --- .github/workflows/dotnet.yml | 2 +- eng/{FunctionaTests.proj => FunctionalTests.proj} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename eng/{FunctionaTests.proj => FunctionalTests.proj} (100%) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 5f359ec..bae18ca 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -81,7 +81,7 @@ jobs: $version = $version.Substring(0, $version.LastIndexOf(".")) Write-Output "FunctionalTestPackageVersion=$version" | Out-File "${env:GITHUB_OUTPUT}" -Append - name: Test - run: dotnet test eng/FunctionaTests.proj --configuration Release /p:FunctionalTestTargetFrameworks=${{ matrix.tfm }} /p:RestoreAdditionalProjectSources=${{ github.workspace }}/nuget /p:FunctionalTestPackageVersion=${{ needs.build.outputs.PackageVersion }} + run: dotnet test eng/FunctionalTests.proj --configuration Release /p:FunctionalTestTargetFrameworks=${{ matrix.tfm }} /p:RestoreAdditionalProjectSources=${{ github.workspace }}/nuget /p:FunctionalTestPackageVersion=${{ needs.build.outputs.PackageVersion }} publish: if: (github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' needs: [build, test] diff --git a/eng/FunctionaTests.proj b/eng/FunctionalTests.proj similarity index 100% rename from eng/FunctionaTests.proj rename to eng/FunctionalTests.proj