Skip to content

Commit

Permalink
Split the pipelines (#2143)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Aug 18, 2021
1 parent addc40a commit e84735d
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 21 deletions.
67 changes: 67 additions & 0 deletions eng/pipelines/device-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
trigger:
branches:
include:
- main
- release/*
- loc
tags:
include:
- '*'
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT

pr:
branches:
include:
- main
- release/*
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT

variables:
- template: /eng/pipelines/common/variables.yml

parameters:
- name: BuildEverything
type: boolean
default: false

stages:

- template: common/device-tests.yml
parameters:
${{ if or(parameters.BuildEverything, ne(variables['Build.Reason'], 'PullRequest')) }}:
androidApiLevels: [ 30, 29, 28, 27, 26, 25, 24, 23 ]
# androidApiLevels: [ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21 ] # fix the issue of getting the test results off
iosVersions: [ 'latest', '14.5', '13.7', '12.4', '11.4' ]
projects:
- name: essentials
desc: Essentials
android: $(System.DefaultWorkingDirectory)/src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj
ios: $(System.DefaultWorkingDirectory)/src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj
- name: core
desc: Core
android: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests/Core.DeviceTests.csproj
ios: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests/Core.DeviceTests.csproj
25 changes: 4 additions & 21 deletions eng/pipelines/handlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,11 @@ stages:
displayName: 'Install .NET'
- pwsh: ./build.ps1 --target=dotnet-build --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Build .NET Maui'
${{ if eq(BuildPlatform.name, 'macOS') }}:
${{ if and(eq(BuildPlatform.name, 'macOS'), ne(variables['System.TeamProject'], 'devdiv')) }}:
timeoutInMinutes: 15
continueOnError: true
- pwsh: ./build.ps1 --target=dotnet-test --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Run Unit Tests'
${{ if eq(BuildPlatform.name, 'macOS') }}:
continueOnError: true
- task: PublishTestResults@2
condition: always()
inputs:
Expand Down Expand Up @@ -223,30 +221,15 @@ stages:
displayName: 'Install .NET (Local Workloads)'
- pwsh: ./build.ps1 --target=dotnet-samples --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Build .NET 6 Samples'
timeoutInMinutes: 20
continueOnError: true
${{ if and(eq(BuildPlatform.name, 'macOS'), ne(variables['System.TeamProject'], 'devdiv')) }}:
timeoutInMinutes: 15
continueOnError: true
- task: PublishBuildArtifacts@1
condition: always()
displayName: publish artifacts
inputs:
ArtifactName: ${{ BuildPlatform.artifact }}

- template: common/device-tests.yml
parameters:
${{ if or(parameters.BuildEverything, ne(variables['Build.Reason'], 'PullRequest')) }}:
androidApiLevels: [ 30, 29, 28, 27, 26, 25, 24, 23 ]
# androidApiLevels: [ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21 ] # fix the issue of getting the test results off
iosVersions: [ 'latest', '14.5', '13.7', '12.4', '11.4' ]
projects:
- name: essentials
desc: Essentials
android: $(System.DefaultWorkingDirectory)/src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj
ios: $(System.DefaultWorkingDirectory)/src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj
- name: core
desc: Core
android: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests/Core.DeviceTests.csproj
ios: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests/Core.DeviceTests.csproj

- template: common/security_compliance.yml
- template: common/localization-handoff.yml # Process outgoing strings [Localization Handoff]
- template: common/localization-handback.yml # Process incoming translations and Create PR to main [Localization Handback]
Expand Down

0 comments on commit e84735d

Please sign in to comment.