Skip to content

Commit

Permalink
Override the OS in msbuild, apparently it's easier than yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
directhex committed Mar 11, 2021
1 parent 5e4a69e commit 30f6541
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
15 changes: 4 additions & 11 deletions eng/pipelines/libraries/helix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ parameters:
buildConfig: ''
creator: ''
helixQueues: ''
osGroup: '${{ parameters.osGroup }}'
osSubGroup: '${{ parameters.osSubgroup }}'
osGroup: ''
osSubGroup: ''
targetRid: ''
testRunNamePrefixSuffix: ''
testScope: 'innerloop' # innerloop | outerloop | all
Expand All @@ -15,22 +15,15 @@ parameters:
shouldContinueOnError: false
scenarios: ''

osOverride: '/p:TargetOS=${{ parameters.osGroup }}'
${{ if and(eq(parameters.osGroup, 'tvOS'),eq(parameters.osSubGroup, '_sim')) }}:
- name: osOverride
value: '/p:TargetOS=tvOS-sim'
${{ if and(eq(parameters.osGroup, 'iOS'),eq(parameters.osSubGroup, '_sim')) }}:
- name: osOverride
value: '/p:TargetOS=iOS-sim'

steps:
- script: $(_msbuildCommand)
$(Build.SourcesDirectory)/src/libraries/sendtohelix.proj
/p:RuntimeFlavor=${{ parameters.runtimeFlavor }}
/p:TargetArchitecture=${{ parameters.archType }}
/p:TargetRuntimeIdentifier=${{ parameters.targetRid }}
/p:Configuration=${{ parameters.buildConfig }}
${{ osOverride }}
/p:TargetOS=${{ parameters.osGroup }}
/p:osSubGroup=${{ parameters.osSubGroup }}
/p:MonoForceInterpreter=${{ parameters.interpreter }}
/p:TestScope=${{ parameters.testScope }}
/p:TestRunNamePrefixSuffix=${{ parameters.testRunNamePrefixSuffix }}
Expand Down
5 changes: 5 additions & 0 deletions src/libraries/sendtohelix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

<Project DefaultTargets="RunInParallelForEachScenario">

<!-- Override Target OS for iOS/tvOS simulators -->
<PropertyGroup Condition="('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS') and '$(osSubGroup)' == '_sim'">
<TargetOS>$(TargetOS)-sim</TargetOS>
</PropertyGroup>

<!-- Helix auto-magically imports local *.props files. We're not going to import the Helix Sdk,
so we need to import those files manually so we can reference the properties defined there.
-->
Expand Down

0 comments on commit 30f6541

Please sign in to comment.