From a7d263a5d6b2f2209a542e00c68a79d07713a147 Mon Sep 17 00:00:00 2001 From: "Zi Chen (from Dev Box)" Date: Wed, 15 May 2024 11:24:47 -0700 Subject: [PATCH 1/4] Remove netcoreapp3.1 and net5, add net9 --- .github/workflows/pr-validation.yml | 9 ++++----- test/Microsoft.Build.Sql.Tests/BuildTests.cs | 7 +++---- .../Microsoft.Build.Sql.Tests.csproj | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index e15d8b4..5153fb3 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -9,23 +9,22 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-latest] - dotnetVersion: [3.1.x, 5.x, 6.x, 7.x, 8.x] + dotnetVersion: [6.x, 7.x, 8.x, 9.x] include: - - dotnetVersion: 3.1.x - targetFramework: netcoreapp3.1 - - dotnetVersion: 5.x - targetFramework: net5.0 - dotnetVersion: 6.x targetFramework: net6.0 - dotnetVersion: 7.x targetFramework: net7.0 - dotnetVersion: 8.x targetFramework: net8.0 + - dotnetVersion: 9.x + targetFramework: net9.0 steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnetVersion }} + dotnet-quality: preview - run: dotnet build DacFx.sln - run: dotnet pack DacFx.sln --no-build - run: dotnet test DacFx.sln --no-build -f ${{ matrix.targetFramework }} \ No newline at end of file diff --git a/test/Microsoft.Build.Sql.Tests/BuildTests.cs b/test/Microsoft.Build.Sql.Tests/BuildTests.cs index eb1abed..b20f123 100644 --- a/test/Microsoft.Build.Sql.Tests/BuildTests.cs +++ b/test/Microsoft.Build.Sql.Tests/BuildTests.cs @@ -258,17 +258,16 @@ public void VerifyBuildWithTransitiveProjectReferences() [TestCase("net481")] [TestCase("netstandard2.1")] [TestCase("netcoreapp3.1")] -#if NET5_0_OR_GREATER [TestCase("net5.0")] -#endif -#if NET6_0_OR_GREATER [TestCase("net6.0")] -#endif #if NET7_0_OR_GREATER [TestCase("net7.0")] #endif #if NET8_0_OR_GREATER [TestCase("net8.0")] +#endif +#if NET9_0_OR_GREATER + [TestCase("net9.0")] #endif // https://github.com/microsoft/DacFx/issues/330 public void VerifyBuildWithDifferentTargetFrameworks(string targetFramework) diff --git a/test/Microsoft.Build.Sql.Tests/Microsoft.Build.Sql.Tests.csproj b/test/Microsoft.Build.Sql.Tests/Microsoft.Build.Sql.Tests.csproj index 8f25369..3c4b355 100644 --- a/test/Microsoft.Build.Sql.Tests/Microsoft.Build.Sql.Tests.csproj +++ b/test/Microsoft.Build.Sql.Tests/Microsoft.Build.Sql.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1;net5.0;net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 enable false From 8f69196afef3ff79d63b6d5efa180ddf7c17f3da Mon Sep 17 00:00:00 2001 From: "Zi Chen (from Dev Box)" Date: Wed, 15 May 2024 11:27:24 -0700 Subject: [PATCH 2/4] Add target framework to dotnet build --- .github/workflows/pr-validation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 5153fb3..29a9dd6 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -25,6 +25,6 @@ jobs: with: dotnet-version: ${{ matrix.dotnetVersion }} dotnet-quality: preview - - run: dotnet build DacFx.sln - - run: dotnet pack DacFx.sln --no-build + - run: dotnet build DacFx.sln -f ${{ matrix.targetFramework }} + - run: dotnet pack DacFx.sln --no-build -f ${{ matrix.targetFramework }} - run: dotnet test DacFx.sln --no-build -f ${{ matrix.targetFramework }} \ No newline at end of file From 75a23099f1635beeeb4688a22e9e971e98a47f19 Mon Sep 17 00:00:00 2001 From: "Zi Chen (from Dev Box)" Date: Wed, 15 May 2024 11:30:10 -0700 Subject: [PATCH 3/4] Add explicit use net9 task --- .github/workflows/pr-validation.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 29a9dd6..e0df6e4 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -21,10 +21,14 @@ jobs: targetFramework: net9.0 steps: - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 # Latest version is always required + with: + dotnet-version: 9.x + dotnet-quality: preview - uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnetVersion }} dotnet-quality: preview - - run: dotnet build DacFx.sln -f ${{ matrix.targetFramework }} - - run: dotnet pack DacFx.sln --no-build -f ${{ matrix.targetFramework }} + - run: dotnet build DacFx.sln + - run: dotnet pack DacFx.sln --no-build - run: dotnet test DacFx.sln --no-build -f ${{ matrix.targetFramework }} \ No newline at end of file From 349c0bb9927c48f9457195cdb82929b9c25b400f Mon Sep 17 00:00:00 2001 From: "Zi Chen (from Dev Box)" Date: Wed, 15 May 2024 11:40:45 -0700 Subject: [PATCH 4/4] Swap targetFramework and dotnetVersion in matrix --- .github/workflows/pr-validation.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index e0df6e4..e4bc680 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -9,16 +9,16 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-latest] - dotnetVersion: [6.x, 7.x, 8.x, 9.x] + targetFramework: [net6.0, net7.0, net8.0, net9.0] include: - - dotnetVersion: 6.x - targetFramework: net6.0 - - dotnetVersion: 7.x - targetFramework: net7.0 - - dotnetVersion: 8.x - targetFramework: net8.0 - - dotnetVersion: 9.x - targetFramework: net9.0 + - targetFramework: net6.0 + dotnetVersion: 6.x + - targetFramework: net7.0 + dotnetVersion: 7.x + - targetFramework: net8.0 + dotnetVersion: 8.x + - targetFramework: net9.0 + dotnetVersion: 9.x steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 # Latest version is always required