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

Actually use TargetOS=AnyOS in the build-test-job (Try 2) #61801

Merged
merged 11 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,20 @@
Text="The 'libs' subset must be built before building this project. Missing artifacts: $(LibrariesNativeArtifactsPath). Configuration: '$(LibrariesConfiguration)'. To use a different configuration, specify the 'LibrariesConfiguration' property." />
</Target>

<Target Name="ResolveLibrariesFromLocalBuild"
<Target Name="ResolveLibrariesRefAssembliesFromLocalBuild"
DependsOnTargets="EnsureLocalArtifactsExist">
<ItemGroup>
<LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' != 'true'" Include="$(LibrariesSharedFrameworkRefArtifactsPath)*.dll;$(LibrariesSharedFrameworkRefArtifactsPath)*.pdb" />
<LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' == 'true'" Include="$(LibrariesAllRefArtifactsPath)*.dll;$(LibrariesAllRefArtifactsPath)*.pdb" />
</ItemGroup>
<Error Condition="'@(LibrariesRefAssemblies)' == ''" Text="The 'libs' subset must be built before building this project." />
</Target>

<Target Name="ResolveLibrariesRuntimeFilesFromLocalBuild"
DependsOnTargets="
EnsureLocalArtifactsExist;
EnsureLocalOSGroupConfigurationArchitectureSpecificArtifactsExist">
<ItemGroup>
<LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' != 'true'" Include="$(LibrariesSharedFrameworkRefArtifactsPath)*.dll;$(LibrariesSharedFrameworkRefArtifactsPath)*.pdb" />
<LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' == 'true'" Include="$(LibrariesAllRefArtifactsPath)*.dll;$(LibrariesAllRefArtifactsPath)*.pdb" />
<LibrariesRuntimeFiles Condition="'$(IncludeOOBLibraries)' != 'true'" Include="
$(LibrariesSharedFrameworkBinArtifactsPath)*.dll;
$(LibrariesSharedFrameworkBinArtifactsPath)*.pdb"
Expand Down Expand Up @@ -188,10 +195,14 @@
IsNative="true" />
</ItemGroup>

<Error Condition="'@(LibrariesRefAssemblies)' == ''" Text="The 'libs' subset must be built before building this project." />
<Error Condition="'@(LibrariesRuntimeFiles)' == ''" Text="The 'libs' subset must be built before building this project." />
</Target>

<Target Name="ResolveLibrariesFromLocalBuild"
DependsOnTargets="
ResolveLibrariesRefAssembliesFromLocalBuild;
ResolveLibrariesRuntimeFilesFromLocalBuild" />

<PropertyGroup>
<BundledRuntimeIdentifierGraphFile>$(RuntimeIdGraphDefinitionFile)</BundledRuntimeIdentifierGraphFile>
</PropertyGroup>
Expand Down
27 changes: 5 additions & 22 deletions eng/pipelines/common/templates/runtimes/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ parameters:
osSubgroup: ''
container: ''
testGroup: ''
liveRuntimeBuildConfig: ''

# Determines librariesbuild configuration to use for the tests. Setting this property implies
# a dependency of this job on the appropriate libraries build and is used
# to construct the name of the Azure artifact representing libraries build
# to use for building the tests.
liveLibrariesBuildConfig: ''

displayNameArgs: ''
condition: true
stagedBuild: false
Expand Down Expand Up @@ -45,13 +37,8 @@ jobs:
runtimeVariant: ${{ parameters.runtimeVariant }}
testGroup: ${{ parameters.testGroup }}
stagedBuild: ${{ parameters.stagedBuild }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
pool: ${{ parameters.pool }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
${{ if eq(parameters.runtimeFlavor, 'coreclr') }}:
liveRuntimeBuildParams: ${{ format('clr.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}
${{ if eq(parameters.runtimeFlavor, 'mono') }}:
liveRuntimeBuildParams: ${{ format('mono.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}

${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64'))), not(eq(parameters.osGroup, 'OSX'))) }}:
compilerArg: '-clang9'
Expand Down Expand Up @@ -86,12 +73,8 @@ jobs:
variables:
- ${{ each variable in parameters.variables }}:
- ${{ variable }}
- ${{ if eq(parameters.runtimeFlavor, 'coreclr') }}:
- name: liveRuntimeBuildParams
value: ${{ format('clr.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}
- ${{ if eq(parameters.runtimeFlavor, 'mono') }}:
- name: liveRuntimeBuildParams
value: ${{ format('mono.corelib+libs.ref+libs.native -rc {0} -c {1} -arch {2} -ci', coalesce(parameters.liveRuntimeBuildConfig, parameters.buildConfig), parameters.liveLibrariesBuildConfig, parameters.archType) }}
- name: liveRuntimeBuildParams
value: 'libs.ref -c Release -ci'
- name: compilerArg
value: ''
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
Expand Down Expand Up @@ -135,7 +118,7 @@ jobs:
displayName: Disk Usage before Build

# Build managed test components
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) ci $(librariesOverrideArg)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) ci /p:TargetOS=AnyOS
displayName: Build managed test components

- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
Expand All @@ -147,7 +130,7 @@ jobs:
# Zip and publish managed test components
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(managedTestArtifactRootFolderPath)
rootFolder: '$(binTestsPath)/AnyOS.$(archType).$(buildConfigUpper)'
includeRootFolder: false
archiveExtension: '.tar.gz'
archiveType: tar
Expand All @@ -174,6 +157,6 @@ jobs:
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_Lib${{ parameters.liveLibrariesBuildConfig }}_${{ parameters.testGroup }}'
artifactName: '${{ parameters.runtimeFlavor }}_Common_Runtime_TestBuildLogs_AnyOS_AnyCPU_$(buildConfig)_${{ parameters.testGroup }}'
continueOnError: true
condition: always()
2 changes: 0 additions & 2 deletions eng/pipelines/coreclr/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ jobs:
platforms:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
testGroup: outerloop
jobParameters:
liveLibrariesBuildConfig: Release

#
# Checked JIT test runs
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/clrinterpreter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: clrinterpreter
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/crossgen2-composite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: innerloop
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/crossgen2-gcstress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gcstress-extra
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
3 changes: 1 addition & 2 deletions eng/pipelines/coreclr/crossgen2-outerloop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- Linux_arm64
- OSX_arm64
- OSX_x64
- windows_x86
- windows_x86
- windows_x64
- windows_arm64
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
Expand Down Expand Up @@ -67,7 +67,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

# Test most platforms in composite mode as the expected mainline shipping mode
- template: /eng/pipelines/common/platform-matrix.yml
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/crossgen2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: innerloop
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/gc-longrunning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gc-longrunning
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/gc-simulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gc-simulator
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/gc-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gc-standalone
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/gcstress-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gcstress-extra
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/gcstress0x3-gcstress0xc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: gcstress0x3-gcstress0xc
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/ilasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: ilasm
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/jit-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: jit-experimental
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/jitstress-isas-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: jitstress-isas-arm
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/jitstress-isas-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: jitstress-isas-x86
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/jitstress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: jitstress
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/jitstress2-jitstressregs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: checked
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/jitstressregs-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: jitstressregs-x86
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/jitstressregs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: jitstressregs
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/pgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: pgo
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/r2r-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: r2r-extra
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/r2r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

#
# Release test runs
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/runincontext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
3 changes: 1 addition & 2 deletions eng/pipelines/coreclr/superpmi-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trigger:
- src/coreclr/inc/jiteeversionguid.h

# This pipeline is supposed to be run only on merged changes
# and should not be triggerable from a PR.
# and should not be triggerable from a PR.
pr: none

schedules:
Expand Down Expand Up @@ -54,7 +54,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/coreclr/tieringtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: outerloop
liveLibrariesBuildConfig: Release

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
3 changes: 0 additions & 3 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: innerloop
liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
Expand Down Expand Up @@ -1011,8 +1010,6 @@ jobs:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: innerloop
liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
liveRuntimeBuildConfig: release
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/runtimelab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ stages:
- CoreClrTestBuildHost # Either OSX_x64 or Linux_x64
jobParameters:
testGroup: innerloop
liveLibrariesBuildConfig: Release
dependsOn:
- build_Linux_x64_Checked_
- build_Linux_x64_Release_
Expand Down
4 changes: 2 additions & 2 deletions src/tests/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
<Output TaskParameter="TargetOutputs" ItemName="Reference" />
</MSBuild>

<ItemGroup >
<ItemGroup>
<Reference Include="$(TargetingPackPath)/*.dll" >
<Private>false</Private>
</Reference>
Expand All @@ -235,7 +235,7 @@
</Target>

<Target Name="GetLiveRefAssemblies" Returns="@(LibrariesRefAssembliesDlls)"
DependsOnTargets="ResolveLibrariesFromLocalBuild">
DependsOnTargets="ResolveLibrariesRefAssembliesFromLocalBuild">
<ItemGroup>
<LibrariesRefAssembliesDlls Include="@(LibrariesRefAssemblies)" Condition="'%(Extension)' == '.dll'" Private="false" />
</ItemGroup>
Expand Down
Loading