mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-09 09:34:49 +09:00

* Build all managed coreclr tests on OSX in CI (#36253) Remove concept of targetGeneric and targetSpecific Add OSX corelcr managed tests builds to all pipes Remove all other platform coreclr managed test build Remove property `TestUnsupportedOutsideWindows` Rename conditional `DisableProjectBuild` to `CLRTestTargetUnsupported` Refactor tests to allow all managed tests to be built on OSX. Split managed tests which based on target properties conditionally: + `<Compile Include/>` + `<DefineConstant/>` This creates a separate test for each target configuration permutation. Add `<CLRTestTargetUnsupported/>` conditions to select these at build and/or run time Append split tests with `_Target*` to identify intended test target For tests which depend on target specific internal details od System.Private.Corlib, expose a dummy implementation for unsupported targets. Clean up Remove <TraitTags/> Remove <CLRTestNeedTarget/> Remove managedOSXBuild Remove managedTestBuildOsGroup Remove managedTestBuildOsSubGroup Use issues.target to disable expected failures Some tests are configured to run on a targets with specific charecteristics. Use issues.targets to conditionally disable tests not intended to run on all targets. * Setup pr and batch runs for dev/infrsatructure (#36218) (#36299) Co-authored-by: Jarret Shook <jashoo@microsoft.com> * Add alias CoreClrTestBuildHost (#36256) * Add alias CoreClrTestBuildHost Intended to allow easy switching of test build host between OSX_x64 & Linux_x64 depending on availablility and reliability. * Add missing issues.targets from #36253 (#36351) * Add missing issues.targets from #36253 PR #36253 enabled building all tests on OSX. It was intended to include this list of tests to disable on unsupported platforms. This was dropped as part of rebasing for dev/infra branch. Lack of CI on dev/infra allowed this to be missed. * Revise issues.targets * Add src/coreclr/tests/src/baseservices/typeequivalence/simple * Remove #if Windows from DllImportPathTest * Build scripts while copying native binaries (#36482) * Build scripts while copying native binaries Stop building test scripts during the managed build phase Build after copying the native targets Fixes issues relative to building scripts on OSX * Fix superpmi script generation * Cleanup issues.targets * Keep 6 failing IJW tests * Fix IJW when managed tests are built on OSX (#36711) * Fix IJW when managed tests are built on OSX - Refactor Interop.setting.targets to Directory.Build.{targets,props} - Remove include Interop.setting.targets from interop projects rely on SDK including Directory.Build.* automatically - Add new CopyInteropNativeRuntimeDependencies target for copying IJW dependencies * Add <Copy/> task - Delete obsolete instruction in Interop/ReadMe.md * Cleanup Readme.md * Optional stress dependencies & don't populate CORE_ROOT twice (#36851) Bruce noticed that we're downloading and installing stress runtime dependencies several times during build. I have added a new option to suppress this behavior in build-test and I fixed the invocations of build-test based on Bruce's analysis. I have also patched the build scripts to avoid populating CORE_ROOT in "copynativeonly" mode. Thanks Tomas Fixes: #36797 * Build test scripts whenever CopyNativeProjectBinaries builds (#37028) * Fix pri0 test build. * Clean pri1 test build (#37266) * Clean pri1 test build * Undo testing comment * Make sure weakreferencetest does not run on unix * Fixup WinRT proj * Fix path Co-authored-by: Steve MacLean <Steve.MacLean@microsoft.com> Co-authored-by: Tomáš Rylek <trylek@microsoft.com> Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com> Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Andy Ayers <andya@microsoft.com> Co-authored-by: Adeel Mujahid <adeelbm@outlook.com> Co-authored-by: Ganbarukamo41 <ganbarukamo@gmail.com> Co-authored-by: monojenkins <jo.shields+jenkins@xamarin.com> Co-authored-by: thaystg <thaystg@users.noreply.github.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> Co-authored-by: Aaron Robinson <arobins@microsoft.com> Co-authored-by: Kevin Jones <kevin@vcsjones.com> Co-authored-by: Jeremy Barton <jbarton@microsoft.com> Co-authored-by: Egor Bogatov <egorbo@gmail.com> Co-authored-by: Simon Nattress <nattress@gmail.com> Co-authored-by: Aleksey Kliger (λgeek) <alklig@microsoft.com> Co-authored-by: Krzysztof Wicher <kwicher@microsoft.com> Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com> Co-authored-by: Carol Eidt <carol.eidt@microsoft.com> Co-authored-by: Shimmy <2716316+weitzhandler@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Layomi Akinrinade <laakinri@microsoft.com> Co-authored-by: Dan Moseley <danmose@microsoft.com> Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com> Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com> Co-authored-by: Alexander Chermyanin <flamencist@mail.ru> Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> Co-authored-by: Sergey Andreenko <seandree@microsoft.com> Co-authored-by: Nikola Milosavljevic <nikolam@microsoft.com> Co-authored-by: Steve Pfister <steveisok@users.noreply.github.com> Co-authored-by: David Wrighton <davidwr@microsoft.com> Co-authored-by: buyaa-n <bunamnan@microsoft.com> Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com> Co-authored-by: Vladimir Sadov <vsadov@microsoft.com> Co-authored-by: Leandro Pereira <leandro.pereira@microsoft.com> Co-authored-by: Swaroop Sridhar <swaroop.sridhar@microsoft.com> Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com> Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Co-authored-by: Manish Godse <61718172+mangod9@users.noreply.github.com> Co-authored-by: Bruce Forstall <brucefo@microsoft.com> Co-authored-by: Alexis Christoforides <alexis@thenull.net> Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com> Co-authored-by: Alfred Myers <git@alfredmyers.com> Co-authored-by: Nick Craver <nrcraver@gmail.com> Co-authored-by: Nathan Ricci <naricc@microsoft.com> Co-authored-by: Thays Grazia <thaystg@gmail.com> Co-authored-by: Yoh Deadfall <yoh.deadfall@hotmail.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> Co-authored-by: Jo Shields <directhex@apebox.org> Co-authored-by: Jan Vorlicek <janvorli@microsoft.com> Co-authored-by: Anirudh Agnihotry <anirudhagnihotry098@gmail.com> Co-authored-by: Roman Marusyk <Marusyk@users.noreply.github.com> Co-authored-by: Zoltan Varga <vargaz@gmail.com> Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com> Co-authored-by: Ben Adams <thundercat@illyriad.co.uk> Co-authored-by: Marek Safar <marek.safar@gmail.com> Co-authored-by: Anton Lapounov <antonl@microsoft.com> Co-authored-by: AraHaan <15173749+AraHaan@users.noreply.github.com> Co-authored-by: Tom Deseyn <tom.deseyn@gmail.com> Co-authored-by: Tomas Weinfurt <tweinfurt@yahoo.com> Co-authored-by: Tomas Weinfurt <furt@Shining.local> Co-authored-by: David Cantu <dacantu@microsoft.com> Co-authored-by: Sung Yoon Whang <suwhang@microsoft.com> Co-authored-by: Levi Broderick <GrabYourPitchforks@users.noreply.github.com> Co-authored-by: vargaz <vargaz@users.noreply.github.com> Co-authored-by: David Mason <davmason@microsoft.com> Co-authored-by: UnityAlex <UnityAlex@users.noreply.github.com> Co-authored-by: Fan Yang <52458914+fanyang-mono@users.noreply.github.com> Co-authored-by: Tanner Gooding <tagoo@outlook.com> Co-authored-by: Egor Chesakov <Egor.Chesakov@microsoft.com> Co-authored-by: radical <radical@users.noreply.github.com> Co-authored-by: Ivan Diaz Sanchez <ivdiazsa@microsoft.com> Co-authored-by: Gleb Balykov <g.balykov@samsung.com> Co-authored-by: Honza Rameš <ramejan@gmail.com> Co-authored-by: Eric StJohn <ericstj@microsoft.com> Co-authored-by: Ivan <ivanbuha@outlook.com> Co-authored-by: Ryan Lucia <rylucia@microsoft.com> Co-authored-by: SRV <roman.sakno@gmail.com> Co-authored-by: Clinton Ingram <clinton.ingram@outlook.com> Co-authored-by: Mikhail Pilin <ww898@users.noreply.github.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: w-flo <w-flo@users.noreply.github.com> Co-authored-by: Peter Sollich <petersol@microsoft.com> Co-authored-by: grendello <grendello@users.noreply.github.com> Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com> Co-authored-by: Erhan Atesoglu <47518605+eanova@users.noreply.github.com> Co-authored-by: Matt Mitchell <mmitche@microsoft.com> Co-authored-by: Josh Schreuder <joshschreuder@gmail.com> Co-authored-by: Josh Schreuder <josh.schreuder@gmail.com> Co-authored-by: Andrew Au <andrewau@microsoft.com> Co-authored-by: Eugene Rozenfeld <erozen@microsoft.com> Co-authored-by: Vlad Brezae <brezaevlad@gmail.com> Co-authored-by: Kenneth Pouncey <kjpou@pt.lu> Co-authored-by: Kirill Frolov <k.frolov@samsung.com> Co-authored-by: Tomas Weinfurt <furt@DESKTOP-0J9757E.corp.microsoft.com>
213 lines
9.9 KiB
YAML
213 lines
9.9 KiB
YAML
parameters:
|
|
archType: ''
|
|
buildConfig: ''
|
|
compilerName: 'clang'
|
|
condition: true
|
|
container: ''
|
|
crossrootfsDir: ''
|
|
isOfficialBuild: false
|
|
osGroup: ''
|
|
osSubgroup: ''
|
|
platform: ''
|
|
pool: ''
|
|
runtimeVariant: ''
|
|
signBinaries: false
|
|
stagedBuild: false
|
|
testGroup: ''
|
|
timeoutInMinutes: ''
|
|
variables: {}
|
|
|
|
### Product build
|
|
jobs:
|
|
- template: xplat-pipeline-job.yml
|
|
parameters:
|
|
buildConfig: ${{ parameters.buildConfig }}
|
|
_BuildConfig: ${{ parameters.buildConfig }}
|
|
archType: ${{ parameters.archType }}
|
|
osGroup: ${{ parameters.osGroup }}
|
|
osSubgroup: ${{ parameters.osSubgroup }}
|
|
runtimeVariant: ${{ parameters.runtimeVariant }}
|
|
testGroup: ${{ parameters.testGroup }}
|
|
helixType: 'build/product/'
|
|
enableMicrobuild: true
|
|
stagedBuild: ${{ parameters.stagedBuild }}
|
|
pool: ${{ parameters.pool }}
|
|
condition: ${{ parameters.condition }}
|
|
|
|
# Compute job name from template parameters
|
|
${{ if eq(parameters.compilerName, 'gcc') }}:
|
|
name: ${{ format('coreclr_{0}_product_build_{1}{1}_{3}_{4}', parameters.compilerName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
|
|
displayName: ${{ format('CoreCLR GCC Product Build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
|
|
${{ if eq(parameters.compilerName, 'clang') }}:
|
|
name: ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
|
|
displayName: ${{ format('CoreCLR {0} Product Build {1}{2} {3} {4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
|
|
|
|
# Run all steps in the container.
|
|
# Note that the containers are defined in platform-matrix.yml
|
|
container: ${{ parameters.container }}
|
|
|
|
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
|
|
|
crossrootfsDir: ${{ parameters.crossrootfsDir }}
|
|
|
|
gatherAssetManifests: true
|
|
variables:
|
|
- name: osGroup
|
|
value: ${{ parameters.osGroup }}
|
|
- name: osSubgroup
|
|
value: ${{ parameters.osSubgroup }}
|
|
- name: compilerArg
|
|
value: ''
|
|
- name: publishLogsArtifactPrefix
|
|
value: 'BuildLogs_CoreCLR'
|
|
- ${{ if eq(parameters.compilerName, 'gcc') }}:
|
|
- name: compilerArg
|
|
value: '-gcc'
|
|
- name: publishLogsArtifactPrefix
|
|
value: 'BuildLogs_CoreCLR_GCC'
|
|
- ${{ if and(ne(parameters.osGroup, 'Windows_NT'), eq(parameters.compilerName, 'clang')) }}:
|
|
- name: compilerArg
|
|
value: '-clang9'
|
|
# Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
|
|
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
|
|
- name: compilerArg
|
|
value: ''
|
|
# AppleClang has different version scheme, so we let complier introspection pick up the available clang from PATH
|
|
- ${{ if eq(parameters.osGroup, 'OSX') }}:
|
|
- name: compilerArg
|
|
value: ''
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
|
# Variables used to publish packages to blob feed
|
|
- name: dotnetfeedUrl
|
|
value: https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json
|
|
- name: dotnetfeedPAT
|
|
value: $(dotnetfeed-storage-access-key-1)
|
|
# Variables used by arcade to gather asset manifests
|
|
- name: _DotNetPublishToBlobFeed
|
|
value: true
|
|
- name: officialBuildIdArg
|
|
value: ''
|
|
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
|
- name: officialBuildIdArg
|
|
value: '/p:OfficialBuildId=$(Build.BuildNumber)'
|
|
- name: enforcePgoArg
|
|
value: ''
|
|
# The EnforcePGO script is only supported on Windows and is not supported on arm or arm64.
|
|
- ${{ if and(eq(parameters.buildConfig, 'Release'), and(eq(parameters.osGroup, 'Windows_NT'), not(or(eq(parameters.archType, 'arm64'), eq(parameters.archType, 'arm'))))) }}:
|
|
- name: enforcePgoArg
|
|
value: '-enforcepgo'
|
|
|
|
- ${{ parameters.variables }}
|
|
|
|
steps:
|
|
|
|
# Install native dependencies
|
|
# Linux builds use docker images with dependencies preinstalled,
|
|
# and FreeBSD builds use a build agent with dependencies
|
|
# preinstalled, so we only need this step for OSX and Windows.
|
|
- ${{ if eq(parameters.osGroup, 'OSX') }}:
|
|
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
|
|
displayName: Install native dependencies
|
|
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
|
|
# Necessary to install python
|
|
- script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
|
|
displayName: Install native dependencies
|
|
|
|
# Install internal tools on official builds
|
|
# Since our internal tools are behind an authenticated feed,
|
|
# we need to use the DotNetCli AzDO task to restore from the feed using a service connection.
|
|
# We can't do this from within the build, so we need to do this as a separate step.
|
|
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
|
- template: /eng/pipelines/common/restore-internal-tools.yml
|
|
|
|
- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
|
|
- script: |
|
|
du -sh $(Build.SourcesDirectory)/*
|
|
df -h
|
|
displayName: Disk Usage before Build
|
|
|
|
# Build CoreCLR Runtime
|
|
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
|
|
- script: $(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) $(crossArg) $(osArg) -ci $(compilerArg) $(officialBuildIdArg)
|
|
displayName: Build CoreCLR Runtime
|
|
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
|
|
- script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) -ci $(enforcePgoArg) $(officialBuildIdArg)
|
|
displayName: Build CoreCLR Runtime
|
|
|
|
- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
|
|
- script: |
|
|
du -sh $(Build.SourcesDirectory)/*
|
|
df -h
|
|
displayName: Disk Usage after Build
|
|
|
|
- ${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(parameters.archType, 'x86')) }}:
|
|
- script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -linuxdac $(officialBuildIdArg)
|
|
displayName: Build Cross OS Linux DAC for Windows
|
|
|
|
# Build CoreCLR Managed Components
|
|
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.tools+clr.packages $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) -ci
|
|
displayName: Build managed product components and packages
|
|
|
|
# Build native test components
|
|
- script: $(coreClrRepoRootDir)build-test$(scriptExt) skipstressdependencies skipmanaged skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(osArg) $(priorityArg) $(compilerArg)
|
|
displayName: Build native test components
|
|
|
|
# Sign on Windows
|
|
- ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(parameters.signBinaries, 'true')) }}:
|
|
- powershell: eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true /p:OfficialBuild=true /p:TargetOS=$(osGroup) /p:TargetArchitecture=$(archType) /p:Configuration=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj
|
|
displayName: Sign Binaries
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: Publish Signing Logs
|
|
inputs:
|
|
targetPath: '$(Build.SourcesDirectory)/artifacts/log/'
|
|
artifactName: ${{ format('SignLogs_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
|
|
continueOnError: true
|
|
condition: always()
|
|
|
|
# We only test on clang binaries.
|
|
- ${{ if eq(parameters.compilerName, 'clang') }}:
|
|
# Publish product output directory for consumption by tests.
|
|
- template: /eng/pipelines/common/upload-artifact-step.yml
|
|
parameters:
|
|
rootFolder: $(buildProductRootFolderPath)
|
|
includeRootFolder: false
|
|
archiveType: $(archiveType)
|
|
tarCompression: $(tarCompression)
|
|
archiveExtension: $(archiveExtension)
|
|
artifactName: $(buildProductArtifactName)
|
|
displayName: 'product build'
|
|
|
|
# Publish test native components for consumption by test execution.
|
|
- template: /eng/pipelines/common/upload-artifact-step.yml
|
|
parameters:
|
|
rootFolder: $(nativeTestArtifactRootFolderPath)
|
|
includeRootFolder: false
|
|
archiveType: $(archiveType)
|
|
tarCompression: $(tarCompression)
|
|
archiveExtension: $(archiveExtension)
|
|
artifactName: $(nativeTestArtifactName)
|
|
displayName: 'native test components'
|
|
|
|
# Get key vault secrets for publishing
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
|
|
- task: AzureKeyVault@1
|
|
inputs:
|
|
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
|
|
KeyVaultName: EngKeyVault
|
|
SecretsFilter: 'dotnetfeed-storage-access-key-1,microsoft-symbol-server-pat,symweb-symbol-server-pat'
|
|
|
|
# Save packages using the prepare-signed-artifacts format.
|
|
- ${{ if eq(parameters.isOfficialBuild, true) }}:
|
|
- template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml
|
|
parameters:
|
|
name: ${{ parameters.platform }}
|
|
|
|
# Publish Logs
|
|
- task: PublishPipelineArtifact@1
|
|
displayName: Publish Logs
|
|
inputs:
|
|
targetPath: $(Build.SourcesDirectory)/artifacts/log
|
|
artifactName: '$(publishLogsArtifactPrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
|
|
continueOnError: true
|
|
condition: always()
|