Skip to content

Commit

Permalink
[CI] Allow passing xamarin-android checkout dir to nested templates. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel-macaque authored Apr 17, 2023
1 parent b1079a0 commit d79e697
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
10 changes: 8 additions & 2 deletions build-tools/automation/yaml-templates/run-msbuild-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ parameters:
jobDisplayName: # Display name of the job
agentCount: # Number of build agents to run in parallel
testFilter: # Filter used to select tests (NUnit test selection language, not dotnet test filter language)

xaSourcePath: $(System.DefaultWorkingDirectory)
repositoryAlias: 'self'
commit: ''

jobs:
- job: ${{ parameters.jobName }}
strategy:
Expand All @@ -31,7 +34,10 @@ jobs:
installLegacyDotNet: false
restoreNUnitConsole: false
updateMono: false

xaSourcePath: ${{ parameters.xaSourcePath }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
Expand Down
16 changes: 11 additions & 5 deletions build-tools/automation/yaml-templates/setup-test-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ parameters:
restoreNUnitConsole: true
updateMono: true
androidSdkPlatforms: $(DefaultTestSdkPlatforms)
repositoryAlias: 'self'
commit: ''

steps:
- checkout: self
clean: true
submodules: recursive
${{ if ne(parameters.xaSourcePath, variables['System.DefaultWorkingDirectory']) }}:
path: s/xamarin-android

- template: sdk-unified/steps/checkout/v1.yml@yaml-templates
parameters:
resource: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
clean: true
submodules: recursive
${{ if ne(parameters.xaSourcePath, variables['System.DefaultWorkingDirectory']) }}:
path: s/xamarin-android

- ${{ if eq(parameters.updateVS, true) }}:
- template: update-vs.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ parameters:
agent_count: 8
stageCondition: succeeded()
stagePrefix: ''
xaSourcePath: $(System.DefaultWorkingDirectory)
repositoryAlias: 'self'
commit: ''

stages:
- stage: ${{ parameters.stageName }}
Expand All @@ -33,6 +36,9 @@ stages:
restoreNUnitConsole: false
updateMono: false
androidSdkPlatforms: $(androidSdkPlatforms)
xaSourcePath: ${{ parameters.xaSourcePath }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}

- template: run-xaprepare.yaml
parameters:
Expand Down Expand Up @@ -87,6 +93,9 @@ stages:
installLegacyDotNet: false
restoreNUnitConsole: false
androidSdkPlatforms: $(androidSdkPlatforms)
xaSourcePath: ${{ parameters.xaSourcePath }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}

- template: run-xaprepare.yaml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ parameters:
stageCondition: succeeded()
dependsOn: mac_build
stagePrefix: ''
xaSourcePath: $(System.DefaultWorkingDirectory)
repositoryAlias: 'self'
commit: ''

stages:
- stage: ${{ parameters.stageName }}
Expand All @@ -19,6 +22,9 @@ stages:
jobDisplayName: macOS > Tests > MSBuild
agentCount: 10
testFilter: cat != Dummy # This is because $(ExcludedNUnitCategories) gets appended which starts with '&'
xaSourcePath: ${{ parameters.xaSourcePath }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}

- template: run-msbuild-tests.yaml
parameters:
Expand All @@ -27,3 +33,6 @@ stages:
jobDisplayName: Windows > Tests > MSBuild
agentCount: 6
testFilter: cat != Dummy # This is because $(ExcludedNUnitCategories) gets appended which starts with '&'
xaSourcePath: ${{ parameters.xaSourcePath }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}

0 comments on commit d79e697

Please sign in to comment.