From 23f2ce19c9163d2d6aaeab23384ffab3b6999479 Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Tue, 20 Jul 2021 15:51:15 +0900 Subject: [PATCH 1/9] Add tizen amrel build CI --- eng/pipelines/common/platform-matrix.yml | 26 +++++++++++++++++++ eng/pipelines/coreclr/templates/build-job.yml | 14 ++++++++-- eng/pipelines/runtime.yml | 1 + 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index efa204878083a..7c09626c9e2b4 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -654,6 +654,32 @@ jobs: helixQueueGroup: ${{ parameters.helixQueueGroup }} ${{ insert }}: ${{ parameters.jobParameters }} +# Tizen armel + +- ${{ if or(containsValue(parameters.platforms, 'Tizen_armel') }}: + - template: xplat-setup.yml + parameters: + jobTemplate: ${{ parameters.jobTemplate }} + helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} + variables: ${{ parameters.variables }} + osGroup: Linux + archType: armel + targetRid: tizen-armel + platform: Tizen_armel + container: + image: ubuntu-18.04-cross-armel-tizen-20210719212651-8b02f56 + registry: mcr + jobParameters: + runtimeFlavor: ${{ parameters.runtimeFlavor }} + stagedBuild: ${{ parameters.stagedBuild }} + buildConfig: ${{ parameters.buildConfig }} + ${{ if eq(parameters.passPlatforms, true) }}: + platforms: ${{ parameters.platforms }} + helixQueueGroup: ${{ parameters.helixQueueGroup }} + crossBuild: true + crossrootfsDir: '/crossrootfs/armel' + ${{ insert }}: ${{ parameters.jobParameters }} + # Windows x64 - ${{ if or(containsValue(parameters.platforms, 'windows_x64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index e94d630ba2e95..bbfb0895886c3 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -141,6 +141,16 @@ jobs: - name: SignType value: $[ coalesce(variables.OfficialSignType, 'real') ] + - name: clrRuntimePortableBuildArg + value: '' + - name: clrManagedPortableBuildArg + value: '' + - ${{ if eq(parameters.archType, 'armel' )}}: + - name: clrRuntimePortableBuildArg + value: '-portablebuild=false' + - name: clrManagedPortableBuildArg + value: '--portablebuild false' + - ${{ parameters.variables }} steps: @@ -188,7 +198,7 @@ jobs: # Build CoreCLR Runtime - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(clrBuildPALTestsBuildArg) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) + - script: $(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(clrBuildPALTestsBuildArg) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) $(clrRuntimePortableBuildArg) displayName: Build CoreCLR Runtime - ${{ if eq(parameters.osGroup, 'windows') }}: - script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(enforcePgoArg) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrInterpreterBuildArg) @@ -201,7 +211,7 @@ jobs: displayName: Disk Usage after Build # Build CoreCLR Managed Components - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.tools+clr.packages+clr.paltestlist $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.tools+clr.packages+clr.paltestlist $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrManagedPortableBuildArg) -ci displayName: Build managed product components and packages # Run CoreCLR Tools unit tests diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index ddeca884f3229..b18a7ae71393b 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -79,6 +79,7 @@ jobs: - Linux_musl_arm64 - Linux_musl_x64 - OSX_arm64 + - Tizen_armel - windows_x86 - windows_x64 - windows_arm From af745eca9788c697e2af13f2d690f4f339863fc8 Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Mon, 9 Aug 2021 11:42:00 +0900 Subject: [PATCH 2/9] Fix some errors --- eng/pipelines/common/platform-matrix.yml | 2 +- eng/pipelines/coreclr/templates/build-job.yml | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 7c09626c9e2b4..3ef368dcfa155 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -656,7 +656,7 @@ jobs: # Tizen armel -- ${{ if or(containsValue(parameters.platforms, 'Tizen_armel') }}: +- ${{ if or(containsValue(parameters.platforms, 'Tizen_armel')) }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index bbfb0895886c3..9f2fe89898d56 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -143,13 +143,9 @@ jobs: - name: clrRuntimePortableBuildArg value: '' - - name: clrManagedPortableBuildArg - value: '' - ${{ if eq(parameters.archType, 'armel' )}}: - name: clrRuntimePortableBuildArg value: '-portablebuild=false' - - name: clrManagedPortableBuildArg - value: '--portablebuild false' - ${{ parameters.variables }} @@ -211,7 +207,7 @@ jobs: displayName: Disk Usage after Build # Build CoreCLR Managed Components - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.tools+clr.packages+clr.paltestlist $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) $(clrManagedPortableBuildArg) -ci + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.tools+clr.packages+clr.paltestlist $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(pgoInstrumentArg) $(officialBuildIdArg) -ci displayName: Build managed product components and packages # Run CoreCLR Tools unit tests @@ -220,7 +216,7 @@ jobs: displayName: Run CoreCLR Tools unit tests # Build native test components - - ${{ if ne(parameters.isOfficialBuild, true) }}: + - ${{ if and(ne(parameters.isOfficialBuild, true), ne(parameters.archType, 'armel')) }}: - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) skipmanaged skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(osArg) $(priorityArg) $(compilerArg) displayName: Build native test components @@ -267,7 +263,7 @@ jobs: condition: always() # Builds using gcc are not tested, and clrTools unitests do not publish the build artifacts - - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools')) }}: + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools'), ne(parameters.archType, 'armel')) }}: # Publish product output directory for consumption by tests. - template: /eng/pipelines/common/upload-artifact-step.yml parameters: From aa51babfb2ac666455212ddc73fb42cbfb219d97 Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Mon, 9 Aug 2021 11:47:21 +0900 Subject: [PATCH 3/9] Fix platform-matrix.yml --- eng/pipelines/common/platform-matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 3ef368dcfa155..422a76534b533 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -656,7 +656,7 @@ jobs: # Tizen armel -- ${{ if or(containsValue(parameters.platforms, 'Tizen_armel')) }}: +- ${{ if containsValue(parameters.platforms, 'Tizen_armel') }}: - template: xplat-setup.yml parameters: jobTemplate: ${{ parameters.jobTemplate }} From 758a165b567b570f673a0403e3306dd8358b1eee Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Mon, 9 Aug 2021 12:40:17 +0900 Subject: [PATCH 4/9] Skip tests for tizen-armel --- eng/pipelines/coreclr/templates/build-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 9f2fe89898d56..24d59e29e9274 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -282,7 +282,7 @@ jobs: osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} - - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools')) }}: + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools'), ne(parameters.archiveType, 'armel')) }}: # Publish test native components for consumption by test execution. - ${{ if and(ne(parameters.isOfficialBuild, true), eq(parameters.pgoType, '')) }}: - template: /eng/pipelines/common/upload-artifact-step.yml From 1d9c749f94803d53700fb83ddf894bba0d6c4245 Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Mon, 9 Aug 2021 13:08:00 +0900 Subject: [PATCH 5/9] Fix typo --- eng/pipelines/coreclr/templates/build-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 24d59e29e9274..557b8e36d9bdc 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -282,7 +282,7 @@ jobs: osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} - - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools'), ne(parameters.archiveType, 'armel')) }}: + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools'), ne(parameters.archType, 'armel')) }}: # Publish test native components for consumption by test execution. - ${{ if and(ne(parameters.isOfficialBuild, true), eq(parameters.pgoType, '')) }}: - template: /eng/pipelines/common/upload-artifact-step.yml From 14c32c721849ba7ba7b3305ea83f6a2e18a98a8b Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Tue, 10 Aug 2021 10:02:07 +0900 Subject: [PATCH 6/9] Introduce a paramter to skip tests --- eng/pipelines/common/platform-matrix.yml | 1 + eng/pipelines/coreclr/templates/build-job.yml | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index 422a76534b533..ba602e5d2e252 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -678,6 +678,7 @@ jobs: helixQueueGroup: ${{ parameters.helixQueueGroup }} crossBuild: true crossrootfsDir: '/crossrootfs/armel' + disableClrTest: true ${{ insert }}: ${{ parameters.jobParameters }} # Windows x64 diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 557b8e36d9bdc..c5efb8c77bdd2 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -9,6 +9,7 @@ parameters: crossBuild: false crossrootfsDir: '' dependOnEvaluatePaths: false + disableClrTest: false isOfficialBuild: false osGroup: '' osSubgroup: '' @@ -38,6 +39,7 @@ jobs: pool: ${{ parameters.pool }} condition: ${{ parameters.condition }} dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} + disableClrTest: ${{ parameters.disableClrTest }} pgoType: ${{ parameters.pgoType }} # Compute job name from template parameters @@ -216,7 +218,7 @@ jobs: displayName: Run CoreCLR Tools unit tests # Build native test components - - ${{ if and(ne(parameters.isOfficialBuild, true), ne(parameters.archType, 'armel')) }}: + - ${{ if and(ne(parameters.isOfficialBuild, true), ne(parameters.disableClrTest, true)) }}: - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) skipmanaged skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(osArg) $(priorityArg) $(compilerArg) displayName: Build native test components @@ -263,7 +265,7 @@ jobs: condition: always() # Builds using gcc are not tested, and clrTools unitests do not publish the build artifacts - - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools'), ne(parameters.archType, 'armel')) }}: + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools'), ne(parameters.disableClrTest, true)) }}: # Publish product output directory for consumption by tests. - template: /eng/pipelines/common/upload-artifact-step.yml parameters: @@ -282,7 +284,7 @@ jobs: osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} - - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools'), ne(parameters.archType, 'armel')) }}: + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools'), ne(parameters.disableClrTest, true)) }}: # Publish test native components for consumption by test execution. - ${{ if and(ne(parameters.isOfficialBuild, true), eq(parameters.pgoType, '')) }}: - template: /eng/pipelines/common/upload-artifact-step.yml From 4f9744541071a04211bcbd4c2de3379822bc2347 Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Thu, 7 Oct 2021 15:26:23 +0900 Subject: [PATCH 7/9] Update osGroup to Tizen --- eng/pipelines/common/platform-matrix.yml | 2 +- eng/pipelines/common/xplat-setup.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index ba602e5d2e252..25a8ac7b913b7 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -662,7 +662,7 @@ jobs: jobTemplate: ${{ parameters.jobTemplate }} helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }} variables: ${{ parameters.variables }} - osGroup: Linux + osGroup: Tizen archType: armel targetRid: tizen-armel platform: Tizen_armel diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 586a474175895..85a96ae5fce85 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -114,12 +114,12 @@ jobs: ${{ if eq(parameters.jobParameters.pool, '') }}: pool: # Public Linux Build Pool - ${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Android'), eq(parameters.hostedOs, 'Linux')), eq(variables['System.TeamProject'], 'public')) }}: + ${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Android', 'Tizen'), eq(parameters.hostedOs, 'Linux')), eq(variables['System.TeamProject'], 'public')) }}: name: NetCore1ESPool-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open # Official Build Linux Pool - ${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Browser', 'Android'), eq(parameters.hostedOs, 'Linux')), ne(variables['System.TeamProject'], 'public')) }}: + ${{ if and(or(in(parameters.osGroup, 'Linux', 'FreeBSD', 'Browser', 'Android', 'Tizen'), eq(parameters.hostedOs, 'Linux')), ne(variables['System.TeamProject'], 'public')) }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 From fa29dd55988703d5087ff7f269e6b787d01d3d73 Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Tue, 12 Oct 2021 15:31:09 +0900 Subject: [PATCH 8/9] Fix an error --- eng/native/init-distro-rid.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh index eea8eca2d26d1..863829deec4df 100644 --- a/eng/native/init-distro-rid.sh +++ b/eng/native/init-distro-rid.sh @@ -41,7 +41,7 @@ initNonPortableDistroRid() # We have forced __PortableBuild=0. This is because -portablebuld # has been passed as false. if (( isPortable == 0 )); then - if [ "${ID}" = "rhel" || "${ID}" = "rocky" ]; then + if [[ "${ID}" = "rhel" || "${ID}" = "rocky" ]]; then # remove the last version digit VERSION_ID="${VERSION_ID%.*}" fi From aef39e1ee02bd4aebfb976857713a0931e9d9b2d Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Wed, 13 Oct 2021 09:03:52 +0900 Subject: [PATCH 9/9] Update fix --- eng/native/init-distro-rid.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh index 863829deec4df..5f6b194600124 100644 --- a/eng/native/init-distro-rid.sh +++ b/eng/native/init-distro-rid.sh @@ -41,7 +41,7 @@ initNonPortableDistroRid() # We have forced __PortableBuild=0. This is because -portablebuld # has been passed as false. if (( isPortable == 0 )); then - if [[ "${ID}" = "rhel" || "${ID}" = "rocky" ]]; then + if [ "${ID}" = "rhel" ] || [ "${ID}" = "rocky" ]; then # remove the last version digit VERSION_ID="${VERSION_ID%.*}" fi