Skip to content

Commit

Permalink
ci: Remove temporary .NET 9 workarounds (#2925)
Browse files Browse the repository at this point in the history
* Remove installation of .NET 9 preview from workflows

* Remove temp workaround for Visual Studio issue

* Removed a stray .NET 9 preview install step

* Centos 9 updated to .NET 9 finally

* Tried enabling the Centos ARM64 test but it failed with a QEMU issue

* Add back .NET 9 (not preview) install on Ubuntu

---------

Co-authored-by: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com>
  • Loading branch information
nr-ahemsath and tippmar-nr authored Dec 10, 2024
1 parent a75c81a commit df366ea
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 82 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/all_solutions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'

- name: Build FullAgent.sln
run: |
Write-Host "dotnet build --force --configuration Release -p:AllowUnsafeBlocks=true ${{ env.fullagent_solution_path }}"
Expand Down Expand Up @@ -175,12 +169,6 @@ jobs:
with:
vs-prerelease: true

- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'

- name: List SDKS
run: dotnet --list-sdks
shell: powershell
Expand Down Expand Up @@ -223,12 +211,6 @@ jobs:
with:
vs-prerelease: true

- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'

- name: Build UnboundedIntegrationTests.sln
run: |
Write-Host "List NuGet Sources"
Expand Down Expand Up @@ -394,12 +376,6 @@ jobs:
choco install azure-functions-core-tools -y --params "'/x64'"
shell: powershell

- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'

- name: Run Integration Tests
run: |
if ($Env:enhanced_logging -eq $True) {
Expand Down Expand Up @@ -544,12 +520,6 @@ jobs:
# Start-CosmosDbEmulator
# shell: pwsh

- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'

- name: Run Unbounded Integration Tests
run: |
if ($Env:enhanced_logging -eq $True) {
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ jobs:
with:
languages: csharp

- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'

- name: Build .NET Agent Solution
run: |
dotnet build ${{ env.fullagent_solution_path }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/run_linux_container_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ jobs:
INTEGRATION_TEST_SECRETS: ${{ secrets.TEST_SECRETS }}
run: |
echo $INTEGRATION_TEST_SECRETS | dotnet user-secrets set --project ${{ env.integration_tests_shared_project }}
- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
- name: Install .NET 9
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'


- name: Build & Run Linux Container Integration Tests
run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0
6 changes: 0 additions & 6 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET 9 Preview
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
dotnet-quality: 'preview'

- name: Restore NuGet Packages
run: dotnet restore

Expand Down
24 changes: 0 additions & 24 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\build\Versioning.targets" Condition="Exists('$(MSBuildThisFileDirectory)\build\Versioning.targets')" />
<!-- BEGIN workaround for https://github.com/dotnet/sdk/issues/43339; remove after updated to VS 17.12 or a future 17.11 patch -->
<Target Name="WorkaroundDotnetSdk43339" BeforeTargets="ResolvePackageAssets" Condition=" '$(MSBuildRuntimeType)' == 'Full' and $([MSBuild]::VersionLessThan($(MSBuildVersion), 17.12.0))">
<PrimeSystemTextJson804 />
</Target>
<UsingTask
TaskName="PrimeSystemTextJson804"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll" >
<Task>
<Code Type="Fragment" Language="cs">
<![CDATA[
try
{
System.Reflection.Assembly.LoadFrom(@"$(MicrosoftNETBuildTasksDirectoryRoot)\..\..\..\DotnetTools\dotnet-format\BuildHost-net472\System.Text.Json.dll");
}
catch
{
// Best effort: if something moves in the SDK don't break the build.
}
]]>
</Code>
</Task>
</UsingTask>
<!-- END workaround for https://github.com/dotnet/sdk/issues/43339 -->
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,21 @@ public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOu
}
}

// Temporarily disabled until Centos updates their package repos to include .NET 9 GA
//public class CentosX64ContainerTest : LinuxContainerTest<CentosX64ContainerTestFixture>
public class CentosX64ContainerTest : LinuxContainerTest<CentosX64ContainerTestFixture>
{
public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

// temporarily disabled until QEMU issue is resolved
//public class CentosArm64ContainerTest : LinuxContainerTest<CentosArm64ContainerTestFixture>
//{
// public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
// public CentosArm64ContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
// {
// }
//}

// temporarily disabled until the checksum issue is resolved
// public class CentosArm64ContainerTest : LinuxContainerTest<CentosArm64ContainerTestFixture>
// {
// public CentosArm64ContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
// {
// }
// }

public class AmazonX64ContainerTest : LinuxContainerTest<AmazonX64ContainerTestFixture>
{
public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
Expand Down

0 comments on commit df366ea

Please sign in to comment.