Skip to content

Commit

Permalink
Add crossBuild parameter to yaml (dotnet#43319)
Browse files Browse the repository at this point in the history
* Add crossBuild parameter to yaml
  • Loading branch information
sdmaclea committed Oct 19, 2020
1 parent ebe2a70 commit bdd25a2
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 17 deletions.
3 changes: 3 additions & 0 deletions eng/pipelines/common/build-coreclr-and-libraries-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
targetRid: ''
container: ''
testGroup: ''
crossBuild: false
crossrootfsDir: ''
timeoutInMinutes: ''
signBinaries: false
Expand All @@ -25,6 +26,7 @@ jobs:
targetRid: ${{ parameters.targetRid }}
container: ${{ parameters.container }}
testGroup: ${{ parameters.testGroup }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
timeoutInminutes: ${{ parameters.timeoutInMinutes }}
signBinaries: ${{ parameters.signBinaries }}
Expand All @@ -43,6 +45,7 @@ jobs:
osSubgroup: ${{ parameters.osSubgroup }}
container: ${{ parameters.container }}
testGroup: ${{ parameters.testGroup }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
timeoutInminutes: ${{ parameters.timeoutInMinutes }}
variables: ${{ parameters.variables }}
Expand Down
3 changes: 2 additions & 1 deletion eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
osGroup: ''
osSubgroup: ''
container: ''
crossBuild: false
crossrootfsDir: ''
variables: []
targetRid: ''
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:

# Do not rename as it clashes with MSBuild property in libraries/build-native.proj
- name: _crossBuildPropertyArg
value: /p:CrossBuild=${{ or(ne(parameters.crossrootfsDir, ''), and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64'))) }}
value: /p:CrossBuild=${{ parameters.crossBuild }}

- name: _cxx11Parameter
${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.archType, 'arm64')) }}:
Expand Down
6 changes: 6 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
crossrootfsDir: '/crossrootfs/arm'
${{ insert }}: ${{ parameters.jobParameters }}

Expand All @@ -72,6 +73,7 @@ jobs:
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
crossrootfsDir: '/crossrootfs/arm64'
${{ insert }}: ${{ parameters.jobParameters }}

Expand Down Expand Up @@ -123,6 +125,7 @@ jobs:
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
crossrootfsDir: '/crossrootfs/arm'
${{ insert }}: ${{ parameters.jobParameters }}

Expand All @@ -149,6 +152,7 @@ jobs:
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
crossrootfsDir: '/crossrootfs/arm64'
${{ insert }}: ${{ parameters.jobParameters }}

Expand Down Expand Up @@ -217,6 +221,7 @@ jobs:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
crossrootfsDir: '/crossrootfs/x64'
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
Expand Down Expand Up @@ -464,6 +469,7 @@ jobs:
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
${{ insert }}: ${{ parameters.jobParameters }}

# macOS x64
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/common/templates/runtimes/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
osSubgroup: ''
container: ''
testGroup: ''
crossBuild: false
crossrootfsDir: ''
readyToRun: false
liveLibrariesBuildConfig: ''
Expand Down Expand Up @@ -36,6 +37,7 @@ jobs:
osSubgroup: ${{ parameters.osSubgroup }}
container: ${{ parameters.container }}
testGroup: ${{ parameters.testGroup }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
stagedBuild: ${{ parameters.stagedBuild }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
osSubgroup: ''
container: ''
testGroup: ''
crossBuild: false
crossrootfsDir: ''
readyToRun: false
liveLibrariesBuildConfig: ''
Expand Down Expand Up @@ -80,4 +81,4 @@ steps:

helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj'

scenarios: normal
scenarios: normal
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/templates/build-jit-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ parameters:
archType: ''
buildConfig: ''
container: ''
crossBuild: false
crossrootfsDir: ''
osGroup: ''
osSubgroup: ''
Expand Down Expand Up @@ -33,6 +34,7 @@ jobs:

timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}

gatherAssetManifests: true
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
compilerName: ''
condition: true
container: ''
crossBuild: false
crossrootfsDir: ''
isOfficialBuild: false
osGroup: ''
Expand Down Expand Up @@ -52,6 +53,7 @@ jobs:

timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}

gatherAssetManifests: true
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/templates/crossgen-comparison-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
container: ''
helixQueues: ''
runtimeVariant: ''
crossBuild: false
crossrootfsDir: ''
stagedBuild: false
variables: {}
Expand Down Expand Up @@ -40,6 +41,7 @@ jobs:
name: ${{ format('test_crossgen_comparison_{0}{1}_{1}_{2}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('Test crossgen-comparison {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}

crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}

variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
container: ''
helixQueues: ''
runtimeVariant: ''
crossBuild: false
crossrootfsDir: ''
stagedBuild: false
variables: {}
Expand Down Expand Up @@ -40,6 +41,7 @@ jobs:
name: ${{ format('test_crossgen2_comparison_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('Test crossgen2-comparison build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}

crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}

variables:
Expand Down Expand Up @@ -166,4 +168,4 @@ jobs:
targetPath: $(workItemDirectory)
artifactName: $(crossgencompare_build_artifact)
continueOnError: true
condition: always()
condition: always()
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/templates/crossgen2-comparison-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
container: ''
helixQueues: ''
runtimeVariant: ''
crossBuild: false
crossrootfsDir: ''
stagedBuild: false
variables: {}
Expand Down Expand Up @@ -44,6 +45,7 @@ jobs:
name: ${{ format('test_crossgen2_comparison_{0}{1}_{2}_{3}_{4}_{5}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.targetarch, parameters.targetos) }}
displayName: ${{ format('Test crossgen2-comparison {0}{1} {2} {3} to {4} {5}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.targetarch, parameters.targetos) }}

crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}

variables:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/templates/format-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
osGroup: ''
osSubgroup: ''
container: ''
crossBuild: false
crossrootfsDir: ''
timeoutInMinutes: ''
stagedBuild: false
Expand All @@ -20,6 +21,7 @@ jobs:
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
container: ${{ parameters.container }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
stagedBuild: ${{ parameters.stagedBuild }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
Expand Down
6 changes: 2 additions & 4 deletions eng/pipelines/coreclr/templates/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
name: ''
helixType: '(unspecified)'
container: ''
crossBuild: false
crossrootfsDir: ''
stagedBuild: false
strategy: ''
Expand Down Expand Up @@ -93,10 +94,7 @@ jobs:

- name: crossArg
value: ''
- ${{ if ne(parameters.crossrootfsDir, '') }}:
- name: crossArg
value: '-cross'
- ${{ if and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64')) }}:
- ${{ if eq(parameters.crossBuild, true) }}:
- name: crossArg
value: '-cross'

Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/templates/xplat-pipeline-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parameters:
helixType: '(unspecified)'
container: ''
testGroup: ''
crossBuild: false
crossrootfsDir: ''
liveLibrariesBuildConfig: ''
stagedBuild: false
Expand Down Expand Up @@ -34,6 +35,7 @@ jobs:
name: ${{ parameters.name }}
helixType: ${{ parameters.helixType }}
container: ${{ parameters.container }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
stagedBuild: ${{ parameters.stagedBuild }}
strategy: ${{ parameters.strategy }}
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/installer/jobs/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
archType: ''
osSubgroup: ''
platform: ''
crossBuild: false
crossrootfsDir: ''
timeoutInMinutes: 120
condition: true
Expand Down Expand Up @@ -67,8 +68,7 @@ jobs:
not(in(parameters.archType, 'x64', 'x86')),
eq(parameters.runtimeFlavor, 'mono'),
eq(parameters.isOfficialBuild, true),
ne(parameters.crossrootfsDir, ''),
and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64'))) }}
eq(parameters.crossBuild, true)) }}

- name: BuildAction
value: -test
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
/p:SkipTests=$(SkipTests)
/p:RuntimeFlavor=${{ parameters.runtimeFlavor }}
/p:TargetArchitecture=${{ parameters.archType }}
/p:CrossBuild=${{ eq(parameters.archType, 'arm64') }}
/p:CrossBuild=${{ parameters.crossBuild }}
$(llvmParameter)
- name: BaseJobBuildCommand
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
value: >-
-subset installer -ci
$(BuildAction)
/p:CrossBuild=${{ ne(parameters.crossrootfsDir, '') }}
/p:CrossBuild=${{ parameters.crossBuild }}
/p:PortableBuild=$(_PortableBuild)
/p:SkipTests=$(SkipTests)
$(LiveOverridePathArgs)
Expand Down
9 changes: 3 additions & 6 deletions eng/pipelines/libraries/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ parameters:
osGroup: ''
archType: ''
osSubgroup: ''
crossBuild: false
crossrootfsDir: ''
framework: 'net6.0'
isOfficialAllConfigurations: false
Expand Down Expand Up @@ -56,12 +57,8 @@ jobs:
- ${{ if ne(parameters.testScope, '') }}:
- _testScopeArg: -testscope ${{ parameters.testScope }}

- ${{ if in(parameters.osGroup, 'Linux', 'FreeBSD') }}:
- _crossBuildPropertyArg: /p:CrossBuild=${{ or(ne(parameters.crossrootfsDir, ''), and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64'))) }}

- ${{ if eq(parameters.osGroup, 'OSX') }}:
# OSX is currently building on x64, anything else is a cross build
- _crossBuildPropertyArg: /p:CrossBuild=${{ ne(parameters.archType, 'x64') }}
- ${{ if eq(parameters.crossBuild, true) }}:
- _crossBuildPropertyArg: /p:CrossBuild=true

- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- _runtimeOSArg: /p:RuntimeOS=linux-musl
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/libraries/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
osSubgroup: ''
archType: ''
targetRid: ''
crossBuild: false
crossrootfsDir: ''
framework: 'net6.0'
isOfficialBuild: false
Expand Down Expand Up @@ -36,6 +37,7 @@ jobs:
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
archType: ${{ parameters.archType }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossrootfsDir }}
framework: ${{ parameters.framework }}
isOfficialBuild: ${{ parameters.isOfficialBuild }}
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/mono/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parameters:
condition: true
runtimeVariant: ''
isOfficialBuild: false
crossBuild: false
crossrootfsDir: ''

### Product build
Expand All @@ -25,6 +26,7 @@ jobs:
enableMicrobuild: true
pool: ${{ parameters.pool }}
runtimeVariant: ${{ parameters.runtimeVariant }}
crossBuild: ${{ parameters.crossBuild }}
crossrootfsDir: ${{ parameters.crossroofsDir }}
condition: ${{ parameters.condition }}

Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/mono/templates/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
name: ''
helixType: '(unspecified)'
container: ''
crossBuild: false
crossrootfsDir: ''
strategy: ''
pool: ''
Expand Down

0 comments on commit bdd25a2

Please sign in to comment.