From dd647f18b174405c8346a07cce38b3cec280dc19 Mon Sep 17 00:00:00 2001 From: "sung-su.kim" Date: Wed, 20 Dec 2023 13:33:33 +0900 Subject: [PATCH] Update net9.0 support (#268) * Update net9.0 support * Update TizenFX version --------- Co-authored-by: Jay Cho --- .github/workflows/build-workload.yml | 5 +-- .../Podcasts/Podcast.API/Podcast.API.csproj | 2 +- .../Podcast.Ingestion.Worker.csproj | 2 +- workload/Config.mk | 7 ++- workload/build/Versions.props | 8 ++-- workload/scripts/workload-install.ps1 | 43 +++++++++++-------- workload/scripts/workload-install.sh | 3 ++ .../data/RuntimeList.xml | 2 +- .../targets/Samsung.Tizen.Sdk.NuGet.targets | 2 + .../Samsung.Tizen.Sdk.Versions.targets | 2 + .../targets/Samsung.Tizen.Sdk.targets | 8 ++++ .../tizen/.template.config/template.json | 8 +++- 12 files changed, 61 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-workload.yml b/.github/workflows/build-workload.yml index 75fe833a..654cee90 100644 --- a/.github/workflows/build-workload.yml +++ b/.github/workflows/build-workload.yml @@ -4,15 +4,14 @@ on: push: branches: - main - - net7.0 - - net8.0 + - net9.0 paths: - 'workload/**' - '.github/workflows/**' pull_request: branches: - main - - net7.0 + - net9.0 paths: - 'workload/**' - '.github/workflows/**' diff --git a/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.API/Podcast.API.csproj b/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.API/Podcast.API.csproj index e0305a57..f7cc4d1f 100644 --- a/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.API/Podcast.API.csproj +++ b/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.API/Podcast.API.csproj @@ -10,7 +10,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.Ingestion.Worker/Podcast.Ingestion.Worker.csproj b/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.Ingestion.Worker/Podcast.Ingestion.Worker.csproj index 89370ed1..03af6205 100644 --- a/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.Ingestion.Worker/Podcast.Ingestion.Worker.csproj +++ b/samples/dotnet-podcasts/src/Services/Podcasts/Podcast.Ingestion.Worker/Podcast.Ingestion.Worker.csproj @@ -10,7 +10,7 @@ - + diff --git a/workload/Config.mk b/workload/Config.mk index e73f53f7..fab99dd0 100644 --- a/workload/Config.mk +++ b/workload/Config.mk @@ -6,6 +6,7 @@ $(TMPDIR)/dotnet-version.config: $(TOP)/build/Versions.props DOTNET_VERSION_BAND = $(firstword $(subst -, ,$(DOTNET_VERSION))) IS_PRERELEASE=$(findstring -,$(DOTNET_VERSION)) +IS_RTM=$(findstring -rtm,$(DOTNET_VERSION)) VERSIONS=$(shell echo $(DOTNET_VERSION) | tr "." "\n") ifneq ($(IS_PRERELEASE),) VERSIONS := $(shell echo $(VERSIONS) | tr "-" "\n") @@ -32,7 +33,11 @@ ifeq ($(MAJOR),6) DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(BAND) else ifneq ($(IS_PRERELEASE),) - DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE_DOTNET).$(PRERELEASE_DOTNET_VERSION) + ifneq ($(IS_RTM),) + DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE_DOTNET) + else + DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE_DOTNET).$(PRERELEASE_DOTNET_VERSION) + endif else DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO) endif diff --git a/workload/build/Versions.props b/workload/build/Versions.props index 50184c96..dfe3d74c 100644 --- a/workload/build/Versions.props +++ b/workload/build/Versions.props @@ -15,7 +15,7 @@ example: -preview.3.100+sha12345 --> - 7.0.125 + 8.0.131 - 11.0.0.18030 + 11.0.0.18033 - 9.0.100-alpha.1.23422.20 - 8.0.0-beta.23307.1 + 9.0.100-alpha.1.23617.1 + 9.0.0-beta.23614.6 diff --git a/workload/scripts/workload-install.ps1 b/workload/scripts/workload-install.ps1 index 6c070ee6..e88f4297 100644 --- a/workload/scripts/workload-install.ps1 +++ b/workload/scripts/workload-install.ps1 @@ -50,6 +50,9 @@ $LatestVersionMap = @{ "$ManifestBaseName-8.0.100-preview.7" = "7.0.122"; "$ManifestBaseName-8.0.100-rc.1" = "7.0.124"; "$ManifestBaseName-8.0.100-rc.2" = "7.0.125"; + "$ManifestBaseName-8.0.100-rtm" = "7.0.127"; + "$ManifestBaseName-8.0.100" = "8.0.130"; + "$ManifestBaseName-9.0.100-alpha.1" = "8.0.131"; } function New-TemporaryDirectory { @@ -70,29 +73,29 @@ function Ensure-Directory([string]$TestDir) { } function Get-LatestVersion([string]$Id) { + $attempts=3 + $sleepInSeconds=3 + do + { + try + { + $Response = Invoke-WebRequest -Uri https://api.nuget.org/v3-flatcontainer/$Id/index.json -UseBasicParsing | ConvertFrom-Json + return $Response.versions | Select-Object -Last 1 + } + catch { + Write-Host "Id: $Id" + Write-Host "An exception was caught: $($_.Exception.Message)" + } + + $attempts-- + if ($attempts -gt 0) { Start-Sleep $sleepInSeconds } + } while ($attempts -gt 0) + if ($LatestVersionMap.ContainsKey($Id)) { Write-Host "Return cached latest version." return $LatestVersionMap.$Id } else { - $attempts=3 - $sleepInSeconds=3 - do - { - try - { - $Response = Invoke-WebRequest -Uri https://api.nuget.org/v3-flatcontainer/$Id/index.json -UseBasicParsing | ConvertFrom-Json - return $Response.versions | Select-Object -Last 1 - } - catch { - Write-Host "Id: $Id" - Write-Host "An exception was caught: $($_.Exception.Message)" - } - - $attempts-- - if ($attempts -gt 0) { Start-Sleep $sleepInSeconds } - } while ($attempts -gt 0) - Write-Error "Wrong Id: $Id" } } @@ -162,6 +165,10 @@ function Install-TizenWorkload([string]$DotnetVersion) $DotnetTargetVersionBand = $DotnetVersionBand + $SplitVersion[2].SubString(3) + $VersionSplitSymbol + $($SplitVersion[3]) $ManifestName = "$ManifestBaseName-$DotnetTargetVersionBand" } + elseif ($DotnetVersion.Contains("-rtm") -and ($SplitVersion.Count -ge 3)) { + $DotnetTargetVersionBand = $DotnetVersionBand + $SplitVersion[2].SubString(3) + $ManifestName = "$ManifestBaseName-$DotnetTargetVersionBand" + } else { $DotnetTargetVersionBand = $DotnetVersionBand } diff --git a/workload/scripts/workload-install.sh b/workload/scripts/workload-install.sh index 7bbf776c..1c481dc0 100755 --- a/workload/scripts/workload-install.sh +++ b/workload/scripts/workload-install.sh @@ -35,6 +35,9 @@ LatestVersionMap=( "$MANIFEST_BASE_NAME-8.0.100-preview.7=7.0.122" "$MANIFEST_BASE_NAME-8.0.100-rc.1=7.0.124" "$MANIFEST_BASE_NAME-8.0.100-rc.2=7.0.125" + "$MANIFEST_BASE_NAME-8.0.100-rtm=7.0.127" + "$MANIFEST_BASE_NAME-8.0.100=8.0.130" + "$MANIFEST_BASE_NAME-9.0.100-alpha.1=8.0.131" ) while [ $# -ne 0 ]; do diff --git a/workload/src/Samsung.NETCore.App.Runtime/data/RuntimeList.xml b/workload/src/Samsung.NETCore.App.Runtime/data/RuntimeList.xml index d165ed85..24e95b1e 100644 --- a/workload/src/Samsung.NETCore.App.Runtime/data/RuntimeList.xml +++ b/workload/src/Samsung.NETCore.App.Runtime/data/RuntimeList.xml @@ -1,2 +1,2 @@ - + diff --git a/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.NuGet.targets b/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.NuGet.targets index bd9b3c45..4309f5a1 100644 --- a/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.NuGet.targets +++ b/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.NuGet.targets @@ -17,6 +17,8 @@ Copyright (c) Samsung All rights reserved. + net9.0-tizen8.0; + net9.0-tizen7.0; net8.0-tizen8.0; net8.0-tizen7.0; net7.0-tizen8.0; diff --git a/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.Versions.targets b/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.Versions.targets index 390e5e27..27b9f6c5 100644 --- a/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.Versions.targets +++ b/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.Versions.targets @@ -40,12 +40,14 @@ Copyright (c) Samsung All rights reserved. + + diff --git a/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.targets b/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.targets index f8be10f3..0f45fbac 100644 --- a/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.targets +++ b/workload/src/Samsung.Tizen.Sdk/targets/Samsung.Tizen.Sdk.targets @@ -55,6 +55,14 @@ Copyright (c) Samsung All rights reserved. RuntimePackRuntimeIdentifiers="tizen" RuntimePackLabels="Tizen" /> + diff --git a/workload/src/Samsung.Tizen.Templates/tizen/.template.config/template.json b/workload/src/Samsung.Tizen.Templates/tizen/.template.config/template.json index f0b9aef4..f9366118 100644 --- a/workload/src/Samsung.Tizen.Templates/tizen/.template.config/template.json +++ b/workload/src/Samsung.Tizen.Templates/tizen/.template.config/template.json @@ -38,10 +38,14 @@ { "choice": "net8.0", "description": "target framework version is net8.0-tizen" + }, + { + "choice": "net9.0", + "description": "target framework version is net9.0-tizen" } ], - "replaces": "net8.0", - "defaultValue": "net8.0" + "replaces": "net9.0", + "defaultValue": "net9.0" } }, "defaultName": "TizenApp1"