Skip to content

[CI] Allow to pass the xa checkout dir to nested templates. #7961

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

Merged
merged 3 commits into from
Apr 17, 2023
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
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
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 }}