Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump runtime to dotnet 6 #1471

Merged
merged 6 commits into from
Dec 1, 2021
Merged

Bump runtime to dotnet 6 #1471

merged 6 commits into from
Dec 1, 2021

Conversation

TingluoHuang
Copy link
Member

Dotnet 6 has been released and the runner is on dotnet 3.1 which is a 2 years old runtime.

In order to unblock macOS M1 support, I am trying to bump the dotnet runtime in the runner first.

https://github.com/github/c2c-actions-runtime/issues/1523

@TingluoHuang TingluoHuang requested a review from a team as a code owner November 9, 2021 04:39
@TingluoHuang TingluoHuang force-pushed the users/tihuang/dotnet6 branch from 0cc21a2 to 072f9c8 Compare November 9, 2021 15:54
<OutputType>Library</OutputType>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<NoWarn>NU1701;NU1603</NoWarn>
<Version>$(Version)</Version>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is enabled by default since dotnet 5

<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<NoWarn>NU1701;NU1603</NoWarn>
<Version>$(Version)</Version>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PublishReadyToRunComposite is a replacing for PublishReadyToRun for self-contained app.

@@ -1154,12 +1154,14 @@ private void SetServicePointOptions()
{
if (BaseAddress != null)
{
#pragma warning disable SYSLIB0014
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ServicePointManager is deprecated, but I didn't find an equivalent in dotnet 6, so I disable the warning and keep using the old API.

@@ -138,7 +138,7 @@ public static class VssHttpUriUtility

if (routeReplacementOptions.HasFlag(RouteReplacementOptions.EscapeUri))
{
sbResult = new StringBuilder(Uri.EscapeUriString(sbResult.ToString()));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EscapeUriString is deprecated...

@@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v15 had some bug that will cause all tests to hang in dotnet 6

@@ -1,4 +1,5 @@
#if OS_WINDOWS
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet 6 introduced api platform check at compile time.
We already did our platform check using #if OS_WINDOWS, so we can just disable the working everywhere we have #if OS_WINDOWS

@@ -1,4 +1,5 @@
#if OS_WINDOWS
#pragma warning disable CA1416
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this pragma is needed. I didn't experience any problems on my branch with these warnings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking it back. This is within If Windows block and I didn't test building on Windows

paveliak
paveliak previously approved these changes Nov 12, 2021
Copy link
Contributor

@paveliak paveliak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1,4 +1,5 @@
#if OS_WINDOWS
#pragma warning disable CA1416
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking it back. This is within If Windows block and I didn't test building on Windows

src/Sdk/Common/Common/VssHttpRequestSettings.cs Outdated Show resolved Hide resolved
src/Sdk/Sdk.csproj Outdated Show resolved Hide resolved
Copy link
Collaborator

@thboop thboop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dev4dev
Copy link

dev4dev commented Nov 29, 2021

is this blocked? sorry for annoying, but I'm waiting for that as I want to migrate from Jenkins to GHA, and can't move because of the absence of arm support =(

@TingluoHuang TingluoHuang merged commit 801a02e into main Dec 1, 2021
@TingluoHuang TingluoHuang deleted the users/tihuang/dotnet6 branch December 1, 2021 03:00
@Temtaime
Copy link
Contributor

And then there will be another regression and it will be reverted to netcore, has been

ChristopherHX added a commit to ChristopherHX/runner.server that referenced this pull request Jan 4, 2022
AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 12, 2022
* bump runtime to dotnet 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants