Skip to content

Commit 86fcc19

Browse files
committed
Integrate Tizen Workload
1 parent b06bae9 commit 86fcc19

File tree

16 files changed

+348
-92
lines changed

16 files changed

+348
-92
lines changed

.github/workflows/release-workload.yml

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@ name: Release Workload
33
on:
44
workflow_dispatch:
55
inputs:
6-
prerelease:
7-
description: 'Pre-release tag name'
6+
net_sdk_version:
7+
description: 'Target .NET SDK Version to Release'
88
required: true
9-
isStableRelease:
10-
description: 'Stable release?'
9+
release_manifest:
10+
description: 'Release Manifest, Runtime, Sdk packs?'
11+
type: boolean
12+
required: false
13+
default: false
14+
release_reference:
15+
description: 'Release Samsung.Tizen.Ref pack?'
16+
type: boolean
1117
required: false
18+
default: false
19+
release_template:
20+
description: 'Release Samsung.Tizen.Templates pack?'
1221
type: boolean
22+
required: false
1323
default: false
1424

1525
jobs:
@@ -25,15 +35,46 @@ jobs:
2535

2636
- name: Build
2737
env:
28-
PRERELEASE_TAG: ${{ github.event.inputs.prerelease }}
29-
IS_STABLE_RELEASE_TAG: ${{ fromJson(github.event.inputs.isStableRelease) }}
30-
run: make install -d
38+
PRERELEASE_TAG: "stable"
39+
run: make install -d DOTNET_VERSION=${{ github.event.inputs.net_sdk_version }}
3140
working-directory: ./workload
3241
continue-on-error: true
3342

34-
- name: Push packages to NuGet.org
43+
- name: Push Manifest/SDK/Runtime packs
44+
if: ${{ github.event.inputs.release_manifest == true }}
45+
run: |
46+
echo "Pushing Manifest packs for version ${{ github.event.inputs.net_sdk_version }}"...
47+
dotnet nuget push ./workload/out/nuget-unsigned/Samsung.NET.Sdk.Tizen.Manifest.*.nupkg \
48+
-k ${{ secrets.NUGET_APIKEY }} \
49+
-s https://api.nuget.org/v3/index.json \
50+
-t 3000
51+
--skip-duplicate
52+
dotnet nuget push ./workload/out/nuget-unsigned/Samsung.Tizen.Sdk.*.nupkg \
53+
-k ${{ secrets.NUGET_APIKEY }} \
54+
-s https://api.nuget.org/v3/index.json \
55+
-t 3000
56+
--skip-duplicate
57+
dotnet nuget push ./workload/out/nuget-unsigned/Samsung.NETCore.App.Runtime.*.nupkg \
58+
-k ${{ secrets.NUGET_APIKEY }} \
59+
-s https://api.nuget.org/v3/index.json \
60+
-t 3000
61+
--skip-duplicate
62+
63+
- name: Push Ref pack
64+
if: ${{ github.event.inputs.release_reference == true }}
65+
run: |
66+
echo "Pushing Manifest packs for version ${{ github.event.inputs.net_sdk_version }}"...
67+
dotnet nuget push ./workload/out/nuget-unsigned/Samsung.Tizen.Ref.*.nupkg \
68+
-k ${{ secrets.NUGET_APIKEY }} \
69+
-s https://api.nuget.org/v3/index.json \
70+
-t 3000
71+
--skip-duplicate
72+
73+
- name: Push Templates pack
74+
if: ${{ github.event.inputs.release_template == true }}
3575
run: |
36-
dotnet nuget push ./workload/out/nuget-unsigned/Samsung.*.nupkg \
76+
dotnet nuget push ./workload/out/nuget-unsigned/Samsung.Tizen.Templates.*.nupkg \
3777
-k ${{ secrets.NUGET_APIKEY }} \
3878
-s https://api.nuget.org/v3/index.json \
3979
-t 3000
80+
--skip-duplicate

workload/Config.mk

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
# DOTNET_VERSION
22
-include $(TMPDIR)/dotnet-version.config
33
$(TMPDIR)/dotnet-version.config: $(TOP)/build/Versions.props
4+
ifeq ($(DOTNET_VERSION), )
45
@mkdir -p $(TMPDIR)
56
@grep "<MicrosoftDotnetSdkInternalPackageVersion>" build/Versions.props | sed -e 's/<\/*MicrosoftDotnetSdkInternalPackageVersion>//g' -e 's/[ \t]*/DOTNET_VERSION=/' > $@
7+
else
8+
@mkdir -p $(TMPDIR)
9+
@echo "DOTNET_VERSION=$(DOTNET_VERSION)" > $@
10+
$(info TizenFXAPI11Version is.. $(TizenFXAPI11Version))
11+
endif
12+
13+
# Temporal Workaround to set versions manually.
14+
TizenFXAPI11Version=11.0.0.18033
15+
TizenFXAPI12Version=12.0.0.18510
16+
TizenFXAPI13Version=13.0.0.19229
17+
TIZEN_WORKLOAD_TEMPLATES_VERSION=10.0.123
18+
19+
$(info DOTNET_VERSION is.. $(DOTNET_VERSION))
20+
621
DOTNET_VERSION_BAND = $(firstword $(subst -, ,$(DOTNET_VERSION)))
722

823
IS_PRERELEASE=$(findstring -,$(DOTNET_VERSION))
@@ -74,8 +89,4 @@ else
7489
endif
7590
endif
7691

77-
ifeq ($(IS_STABLE_RELEASE_TAG), true)
78-
TIZEN_WORKLOAD_VERSION_FULL := $(TIZEN_WORKLOAD_VERSION)
79-
else
80-
TIZEN_WORKLOAD_VERSION_FULL := $(TIZEN_WORKLOAD_VERSION)-$(PRERELEASE_VERSION).$(TIZEN_COMMIT_DISTANCE)
81-
endif
92+
TIZEN_WORKLOAD_VERSION_FULL := $(TIZEN_WORKLOAD_VERSION)

workload/Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ NUGET_ORG := https://api.nuget.org/v3/index.json
88

99
.DEFAULT_GOAL := packs
1010

11+
export DOTNET_VERSION
12+
1113
include $(TOP)/Config.mk
1214

1315
DIRECTORIES += \
@@ -37,15 +39,18 @@ $(WORKLOAD_PACKS_OUTDIR)/$(1)$(3).$(2).nupkg: $(DOTNET)
3739
-p:IncludeSymbols=False \
3840
-p:TizenPackVersion=$(2) \
3941
-p:TizenVersionHash=$(CURRENT_HASH) \
40-
-p:DotNetPreviewVersionBand=$(4)
42+
-p:DotNetPreviewVersionBand=$(4) \
43+
-p:MicrosoftDotnetSdkInternalPackageVersion=$(DOTNET_VERSION)
4144

4245
NUPKG_TARGETS += $(WORKLOAD_PACKS_OUTDIR)/$(1)$(3).$(2).nupkg
4346
endef
4447

4548
$(eval $(call CreateNuGetPkgs,Samsung.NET.Sdk.Tizen,$(TIZEN_WORKLOAD_VERSION_FULL),.Manifest-$(DOTNET_VERSION_BAND),$(DOTNET_VERSION_BAND)))
4649
$(eval $(call CreateNuGetPkgs,Samsung.Tizen.Sdk,$(TIZEN_WORKLOAD_VERSION_FULL)))
47-
$(eval $(call CreateNuGetPkgs,Samsung.Tizen.Ref,$(TIZEN_WORKLOAD_VERSION_FULL)))
48-
$(eval $(call CreateNuGetPkgs,Samsung.Tizen.Templates,$(TIZEN_WORKLOAD_VERSION_FULL)))
50+
$(eval $(call CreateNuGetPkgs,Samsung.Tizen.Ref.API11,$(TizenFXAPI11Version)))
51+
$(eval $(call CreateNuGetPkgs,Samsung.Tizen.Ref.API12,$(TizenFXAPI12Version)))
52+
$(eval $(call CreateNuGetPkgs,Samsung.Tizen.Ref.API13,$(TizenFXAPI13Version)))
53+
$(eval $(call CreateNuGetPkgs,Samsung.Tizen.Templates,$(TIZEN_WORKLOAD_TEMPLATES_VERSION)))
4954
$(eval $(call CreateNuGetPkgs,Samsung.NETCore.App.Runtime,$(TIZEN_WORKLOAD_VERSION_FULL),.tizen))
5055

5156
.PHONY: packs
@@ -92,7 +97,9 @@ $(TMPDIR)/msi: install
9297
@cp -fr $(DOTNET_MANIFESTS_DESTDIR) $@/sdk-manifests/$(DOTNET_VERSION_BAND)
9398
@mkdir -p $@/packs
9499
@cp -fr $(DOTNET_DESTDIR)/packs/Samsung.Tizen.Sdk $@/packs
95-
@cp -fr $(DOTNET_DESTDIR)/packs/Samsung.Tizen.Ref $@/packs
100+
@cp -fr $(DOTNET_DESTDIR)/packs/Samsung.Tizen.Ref.API11 $@/packs
101+
@cp -fr $(DOTNET_DESTDIR)/packs/Samsung.Tizen.Ref.API12 $@/packs
102+
@cp -fr $(DOTNET_DESTDIR)/packs/Samsung.Tizen.Ref.API13 $@/packs
96103
@cp -fr $(DOTNET_DESTDIR)/packs/Samsung.NETCore.App.Runtime.* $@/packs
97104
@mkdir -p $@/template-packs
98105
@cp -f $(DOTNET_DESTDIR)/template-packs/samsung.tizen.templates.*.nupkg $@/template-packs

workload/build/Samsung.NET.Sdk.Tizen.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ workload manifest pack containing information about the Tizen .NET workload.
4444
<ReplaceFileContents
4545
SourceFile="$(_ProjectSourceDirectory)Samsung.NET.Sdk.Tizen\WorkloadManifest.in.json"
4646
DestinationFile="$(WorkloadManifestJsonPath)"
47-
Replacements="@TIZEN_WORKLOAD_VERSION@=$(TizenPackVersion);">
47+
Replacements="@TIZEN_WORKLOAD_VERSION@=$(TizenPackVersion);@TizenFXAPI11Version@=$(TizenFXAPI11Version);@TizenFXAPI12Version@=$(TizenFXAPI12Version);@TizenFXAPI13Version@=$(TizenFXAPI13Version);@TIZEN_WORKLOAD_TEMPLATES_VERSION@=$(TIZEN_WORKLOAD_TEMPLATES_VERSION);">
4848
</ReplaceFileContents>
4949

5050
<ItemGroup>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<!--
2+
***********************************************************************************************
3+
Samsung.Tizen.Ref.API11.proj
4+
5+
This project file is used to create the Samsung.Tizen.Ref.API11 NuGet, which is the
6+
targeting pack containing reference assemblies and other compile time assets required
7+
by projects that use the Tizen .NET framework in .NET 5.
8+
***********************************************************************************************
9+
-->
10+
<Project Sdk="Microsoft.Build.NoTargets">
11+
12+
<PropertyGroup>
13+
<TizenFXAPILevel>$(TizenFXAPI11Version.Split(".")[0])</TizenFXAPILevel>
14+
</PropertyGroup>
15+
16+
<PropertyGroup>
17+
<PackageId>Samsung.Tizen.Ref.API11</PackageId>
18+
<Description>
19+
Tizen .NET reference assemblies. Please do not reference directly.
20+
- TizenFX API Level : $(TizenFXAPILevel)
21+
- TizenFX Version : $(TizenFXAPI11Version)
22+
</Description>
23+
</PropertyGroup>
24+
25+
<PropertyGroup>
26+
<TizenFXPackageName>Tizen.NET.API$(TizenFXAPILevel)</TizenFXPackageName>
27+
<TizenFXNuGetPathVariable>PkgTizen_NET_API$(TizenFXAPILevel)</TizenFXNuGetPathVariable>
28+
</PropertyGroup>
29+
30+
<ItemGroup>
31+
<PackageReference Include="$(TizenFXPackageName)" Version="$(TizenFXAPI11Version)" GeneratePathProperty="true" />
32+
</ItemGroup>
33+
34+
<PropertyGroup>
35+
<BeforePack>
36+
_GetPackageVersion;
37+
_GetTargetingPackItems;
38+
_GenerateFrameworkListFile;
39+
$(BeforePack);
40+
</BeforePack>
41+
</PropertyGroup>
42+
43+
<Target Name="_GetTargetingPackItems"
44+
DependsOnTargets="_GetLicense">
45+
<PropertyGroup>
46+
<FrameworkListFile>$(IntermediateOutputPath)FrameworkList.xml</FrameworkListFile>
47+
</PropertyGroup>
48+
49+
<ItemGroup>
50+
<_TizenFXNugetPathItem Include="$(TizenFXNuGetPathVariable)" />
51+
<_TizenRefPackAssemblies Include="$(%(_TizenFXNugetPathItem.Identity))\ref\net6.0\*.dll" />
52+
<FrameworkListFileClass Include="@(_TizenRefPackAssemblies->'%(Filename)%(Extension)')" Profile="Tizen" />
53+
</ItemGroup>
54+
55+
<ItemGroup>
56+
<_PackageFiles Include="@(_TizenRefPackAssemblies)" PackagePath="ref\net6.0" TargetPath="ref\net6.0" />
57+
<_PackageFiles Include="$(_ProjectSourceDirectory)Samsung.Tizen.Ref/data/*.txt" PackagePath="data" />
58+
<_PackageFiles Include="$(_ProjectSourceDirectory)Samsung.Tizen.Ref/runtime.json" PackagePath=".\" />
59+
</ItemGroup>
60+
61+
</Target>
62+
63+
<UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetSharedFrameworkTaskFile)"/>
64+
65+
<!-- https://github.com/dotnet/runtime/blob/0647ec314948904319da5eb15e9931f7c85ed1e2/src/installer/pkg/projects/Directory.Build.targets#L281 -->
66+
<Target Name="_GenerateFrameworkListFile" >
67+
<!-- Hardcode framework attributes -->
68+
<ItemGroup>
69+
<FrameworkListRootAttributes Include="Name" Value=".NET 10.0 - Tizen" />
70+
<FrameworkListRootAttributes Include="TargetFrameworkIdentifier" Value=".NETCoreApp" />
71+
<FrameworkListRootAttributes Include="TargetFrameworkVersion" Value="8.0" />
72+
<FrameworkListRootAttributes Include="FrameworkName" Value="Samsung.Tizen" />
73+
</ItemGroup>
74+
75+
<!-- https://github.com/dotnet/arcade/blob/5824baf1c9a900ee00c167f96201c750bba6a574/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs -->
76+
<CreateFrameworkListFile
77+
Files="@(_PackageFiles)"
78+
FileClassifications="@(FrameworkListFileClass)"
79+
TargetFile="$(FrameworkListFile)"
80+
TargetFilePrefixes="ref;runtimes"
81+
RootAttributes="@(FrameworkListRootAttributes)"
82+
/>
83+
<ItemGroup>
84+
<_PackageFiles Include="$(FrameworkListFile)" PackagePath="data" />
85+
</ItemGroup>
86+
</Target>
87+
88+
</Project>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<!--
2+
***********************************************************************************************
3+
Samsung.Tizen.Ref.API12.proj
4+
5+
This project file is used to create the Samsung.Tizen.Ref.API12 NuGet, which is the
6+
targeting pack containing reference assemblies and other compile time assets required
7+
by projects that use the Tizen .NET framework in .NET 5.
8+
***********************************************************************************************
9+
-->
10+
<Project Sdk="Microsoft.Build.NoTargets">
11+
12+
<PropertyGroup>
13+
<TizenFXAPILevel>$(TizenFXAPI12Version.Split(".")[0])</TizenFXAPILevel>
14+
</PropertyGroup>
15+
16+
<PropertyGroup>
17+
<PackageId>Samsung.Tizen.Ref.API12</PackageId>
18+
<Description>
19+
Tizen .NET reference assemblies. Please do not reference directly.
20+
- TizenFX API Level : $(TizenFXAPILevel)
21+
- TizenFX Version : $(TizenFXAPI12Version)
22+
</Description>
23+
</PropertyGroup>
24+
25+
<PropertyGroup>
26+
<TizenFXPackageName>Tizen.NET.API$(TizenFXAPILevel)</TizenFXPackageName>
27+
<TizenFXNuGetPathVariable>PkgTizen_NET_API$(TizenFXAPILevel)</TizenFXNuGetPathVariable>
28+
</PropertyGroup>
29+
30+
<ItemGroup>
31+
<PackageReference Include="$(TizenFXPackageName)" Version="$(TizenFXAPI12Version)" GeneratePathProperty="true" />
32+
</ItemGroup>
33+
34+
<PropertyGroup>
35+
<BeforePack>
36+
_GetPackageVersion;
37+
_GetTargetingPackItems;
38+
_GenerateFrameworkListFile;
39+
$(BeforePack);
40+
</BeforePack>
41+
</PropertyGroup>
42+
43+
<Target Name="_GetTargetingPackItems"
44+
DependsOnTargets="_GetLicense">
45+
<PropertyGroup>
46+
<FrameworkListFile>$(IntermediateOutputPath)FrameworkList.xml</FrameworkListFile>
47+
</PropertyGroup>
48+
49+
<ItemGroup>
50+
<_TizenFXNugetPathItem Include="$(TizenFXNuGetPathVariable)" />
51+
<_TizenRefPackAssemblies Include="$(%(_TizenFXNugetPathItem.Identity))\ref\net6.0\*.dll" />
52+
<FrameworkListFileClass Include="@(_TizenRefPackAssemblies->'%(Filename)%(Extension)')" Profile="Tizen" />
53+
</ItemGroup>
54+
55+
<ItemGroup>
56+
<_PackageFiles Include="@(_TizenRefPackAssemblies)" PackagePath="ref\net6.0" TargetPath="ref\net6.0" />
57+
<_PackageFiles Include="$(_ProjectSourceDirectory)Samsung.Tizen.Ref/data/*.txt" PackagePath="data" />
58+
<_PackageFiles Include="$(_ProjectSourceDirectory)Samsung.Tizen.Ref/runtime.json" PackagePath=".\" />
59+
</ItemGroup>
60+
61+
</Target>
62+
63+
<UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetSharedFrameworkTaskFile)"/>
64+
65+
<!-- https://github.com/dotnet/runtime/blob/0647ec314948904319da5eb15e9931f7c85ed1e2/src/installer/pkg/projects/Directory.Build.targets#L281 -->
66+
<Target Name="_GenerateFrameworkListFile" >
67+
<!-- Hardcode framework attributes -->
68+
<ItemGroup>
69+
<FrameworkListRootAttributes Include="Name" Value=".NET 10.0 - Tizen" />
70+
<FrameworkListRootAttributes Include="TargetFrameworkIdentifier" Value=".NETCoreApp" />
71+
<FrameworkListRootAttributes Include="TargetFrameworkVersion" Value="9.0" />
72+
<FrameworkListRootAttributes Include="FrameworkName" Value="Samsung.Tizen" />
73+
</ItemGroup>
74+
75+
<!-- https://github.com/dotnet/arcade/blob/5824baf1c9a900ee00c167f96201c750bba6a574/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs -->
76+
<CreateFrameworkListFile
77+
Files="@(_PackageFiles)"
78+
FileClassifications="@(FrameworkListFileClass)"
79+
TargetFile="$(FrameworkListFile)"
80+
TargetFilePrefixes="ref;runtimes"
81+
RootAttributes="@(FrameworkListRootAttributes)"
82+
/>
83+
<ItemGroup>
84+
<_PackageFiles Include="$(FrameworkListFile)" PackagePath="data" />
85+
</ItemGroup>
86+
</Target>
87+
88+
</Project>

workload/build/Samsung.Tizen.Ref.proj renamed to workload/build/Samsung.Tizen.Ref.API13.proj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<!--
22
***********************************************************************************************
3-
Samsung.Tizen.Ref.proj
3+
Samsung.Tizen.Ref.API13.proj
44
5-
This project file is used to create the Samsung.Tizen.Ref NuGet, which is the
5+
This project file is used to create the Samsung.Tizen.Ref.API13 NuGet, which is the
66
targeting pack containing reference assemblies and other compile time assets required
77
by projects that use the Tizen .NET framework in .NET 5.
88
***********************************************************************************************
99
-->
1010
<Project Sdk="Microsoft.Build.NoTargets">
1111

1212
<PropertyGroup>
13-
<TizenFXAPILevel>$(TizenFXVersion.Split(".")[0])</TizenFXAPILevel>
13+
<TizenFXAPILevel>$(TizenFXAPI13Version.Split(".")[0])</TizenFXAPILevel>
1414
</PropertyGroup>
1515

1616
<PropertyGroup>
17-
<PackageId>Samsung.Tizen.Ref</PackageId>
17+
<PackageId>Samsung.Tizen.Ref.API13</PackageId>
1818
<Description>
1919
Tizen .NET reference assemblies. Please do not reference directly.
2020
- TizenFX API Level : $(TizenFXAPILevel)
21-
- TizenFX Version : $(TizenFXVersion)
21+
- TizenFX Version : $(TizenFXAPI13Version)
2222
</Description>
2323
</PropertyGroup>
2424

@@ -28,7 +28,7 @@ by projects that use the Tizen .NET framework in .NET 5.
2828
</PropertyGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="$(TizenFXPackageName)" Version="$(TizenFXVersion)" GeneratePathProperty="true" />
31+
<PackageReference Include="$(TizenFXPackageName)" Version="$(TizenFXAPI13Version)" GeneratePathProperty="true" />
3232
</ItemGroup>
3333

3434
<PropertyGroup>
@@ -53,7 +53,7 @@ by projects that use the Tizen .NET framework in .NET 5.
5353
</ItemGroup>
5454

5555
<ItemGroup>
56-
<_PackageFiles Include="@(_TizenRefPackAssemblies)" PackagePath="ref\net10.0" TargetPath="ref\net10.0" />
56+
<_PackageFiles Include="@(_TizenRefPackAssemblies)" PackagePath="ref\net6.0" TargetPath="ref\net6.0" />
5757
<_PackageFiles Include="$(_ProjectSourceDirectory)Samsung.Tizen.Ref/data/*.txt" PackagePath="data" />
5858
<_PackageFiles Include="$(_ProjectSourceDirectory)Samsung.Tizen.Ref/runtime.json" PackagePath=".\" />
5959
</ItemGroup>

0 commit comments

Comments
 (0)