Skip to content

Commit f69a6ed

Browse files
authored
Setup testing on dnceng (#32297)
* [ci] remove not used pipelines # Conflicts: # eng/pipelines/azure-pipelines-public.yml Provision xcode Don t install android stuff Fix script Add device-tests Fix provisioning on xamarin public try again [ci] Fix on dcneng the script too Try 26.0.1 Add sourcegen unit tests to helix Don t use private assets arcade unit tests pass the correct script Try test job publish logs try dotnet test Try fix test Run dotnet test again try again Fix more tests try fix provisioning no need for 2 Try again Log symlinks Pass project Dont force MTP remove project write the command Write path try force more variables Try more variables Fix Skip install simulators Why does this not work try again print info print dir bump timeout again Fix double use of path Skim simulator for device tests Skip on old pipeline too [ci] No need to push device tests results * Continue on error * Try xcode 26.0.0 * Fix targetFrameworkVersion.tfm * Use a LineEndingNormalizedEqualityComparer for better assertions * Don t skip simulator on device tests
1 parent 8db19a4 commit f69a6ed

24 files changed

+400
-583
lines changed

eng/helix.proj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
<ItemGroup>
2828
<XUnitProject Include="$(RepoRoot)src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj" />
2929
<XUnitProject Include="$(RepoRoot)src/Controls/tests/BindingSourceGen.UnitTests/Controls.BindingSourceGen.UnitTests.csproj" />
30+
<XUnitProject Include="$(RepoRoot)src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj" />
3031
<XUnitProject Include="$(RepoRoot)src/Core/tests/UnitTests/Core.UnitTests.csproj" />
3132
<XUnitProject Include="$(RepoRoot)src/Essentials/test/UnitTests/Essentials.UnitTests.csproj" />
33+
3234
<!-- <XUnitProject Include="$(RepoRoot)/src/SingleProject/Resizetizer/test/UnitTests/Resizetizer.UnitTests.csproj" /> -->
3335

3436
</ItemGroup>

eng/pipelines/arcade/setup-test-env.yml

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,8 @@ steps:
2121
skipAndroidEmulatorImages: true
2222
skipAndroidCreateAvds: true
2323
skipProvisioning: true
24-
skipXcode: true
25-
26-
- script: |
27-
echo Remove old Xamarin Settings
28-
rm -f ~/Library/Preferences/Xamarin/Settings.plist
29-
rm -f ~/Library/Preferences/maui/Settings.plist
30-
echo Mac OS version:
31-
sw_vers -productVersion
32-
echo
33-
echo Installed Xcode versions:
34-
ls /Applications | grep 'Xcode'
35-
echo
36-
echo currently selected xcode:
37-
xcrun xcode-select --print-path
38-
echo
39-
echo selecting latest xcode...
40-
sudo xcode-select -s /Applications/Xcode_$(XCODE).app
41-
xcrun xcode-select --print-path
42-
xcodebuild -version
43-
sudo xcodebuild -license accept
44-
if [[ ${XCODE/\.*/} -ge 26 ]]; then
45-
sudo xcodebuild -downloadPlatform iOS -architectureVariant universal
46-
else
47-
sudo xcodebuild -downloadPlatform iOS
48-
fi
49-
sudo xcodebuild -runFirstLaunch
50-
displayName: Select Xcode Version
51-
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
52-
timeoutInMinutes: 30
24+
skipXcode: false
25+
skipSimulatorSetup: false
5326

5427
- task: UseDotNet@2
5528
displayName: 'Use .NET SDK $(DOTNET_VERSION)'
@@ -97,11 +70,11 @@ steps:
9770
projects: ${{ parameters.mauiSourcePath }}/src/DotNet/DotNet.csproj
9871
arguments: '-c ${{ parameters.buildConfig }} -bl:${{ parameters.repoLogPath }}/install-dotnet.binlog'
9972

100-
- template: /eng/pipelines/common/setup-android-dependencies.yml
101-
parameters:
102-
mauiSourcePath: ${{ parameters.mauiSourcePath }}
103-
repoLogPath: ${{ parameters.repoLogPath }}
104-
androidSdkRoot: ${{ parameters.androidSdkRoot }}
73+
# - template: /eng/pipelines/common/setup-android-dependencies.yml
74+
# parameters:
75+
# mauiSourcePath: ${{ parameters.mauiSourcePath }}
76+
# repoLogPath: ${{ parameters.repoLogPath }}
77+
# androidSdkRoot: ${{ parameters.androidSdkRoot }}
10578

10679
- ${{ if eq(parameters.buildMSBuildTasks, true) }}:
10780
- template: /eng/pipelines/common/run-dotnet-preview.yml

eng/pipelines/arcade/stage-device-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ parameters:
3737
default: 'Release'
3838
- name: TargetFrameworkVersion
3939
type: string
40-
default: 'net9.0'
40+
default: 'net10.0'
4141
- name: appArtifactName
4242
type: string
4343
default: 'device_tests_app'
@@ -63,7 +63,7 @@ stages:
6363
sourceIndexParams: ${{ parameters.sourceIndexParams }}
6464
publishAssetsImmediately: true
6565
enablePublishBuildArtifacts: true
66-
enablePublishTestResults: true
66+
enablePublishTestResults: false
6767
workspace:
6868
clean: all
6969
jobs:

eng/pipelines/arcade/stage-unit-tests.yml

Lines changed: 28 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ parameters:
44
buildConfig: Debug
55
repoLogPath: $(Build.Arcade.LogsPath)
66
publishTaskPrefix: '1ES.'
7+
buildTaskProjects: '$(Build.SourcesDirectory)/Microsoft.Maui.BuildTasks.slnf'
78

89
stages:
910
- stage: UnitTests
@@ -16,36 +17,42 @@ stages:
1617
pool: ${{ job.pool }}
1718
timeoutInMinutes: ${{ job.timeout }}
1819
steps:
19-
- template: /eng/pipelines/arcade/setup-test-env.yml
20-
parameters:
21-
mauiSourcePath: ${{ parameters.mauiSourcePath }}
22-
buildConfig: ${{ parameters.buildConfig }}
23-
repoLogPath: ${{ parameters.repoLogPath }}
24-
installPackageArtifacts: false
25-
buildMSBuildTasks: true
20+
- checkout: self
21+
clean: true
2622

27-
# - template: /eng/pipelines/common/run-dotnet-preview.yml
23+
- template: /eng/pipelines/common/provision.yml@self
24+
parameters:
25+
checkoutDirectory: '$(System.DefaultWorkingDirectory)'
26+
skipJdk: false
27+
skipAndroidCommonSdks: false
28+
skipAndroidPlatformApis: false
29+
onlyAndroidPlatformDefaultApis: true
30+
skipAndroidEmulatorImages: true
31+
skipAndroidCreateAvds: true
32+
skipProvisioning: true
33+
skipXcode: false
34+
skipSimulatorSetup: true
35+
base64Encode: true
36+
outputVariableName: dotnetbuilds-internal-container-read-token-base64
37+
38+
- script: ${{ job.buildScript }} -restore -build -configuration ${{ parameters.buildConfig }} -projects "${{ parameters.buildTaskProjects }}" /p:ArchiveTests=false /p:TreatWarningsAsErrors=$(TreatWarningsAsErrors) /bl:$(Build.Arcade.LogsPath)${{ parameters.buildConfig }}/buildtasks.binlog $(_OfficialBuildIdArgs)
39+
displayName: 🛠️ Build BuildTasks
40+
41+
# - template: /eng/pipelines/arcade/setup-test-env.yml
2842
# parameters:
29-
# displayName: Run Controls.Core.UnitTests - ${{ job.testOS }}
3043
# mauiSourcePath: ${{ parameters.mauiSourcePath }}
31-
# command: test
32-
# project: ${{ parameters.mauiSourcePath }}/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj
33-
# arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/Controls.Core.UnitTests /p:_SkipUpdateBuildNumber=true'
34-
# useExitCodeForErrors: true
35-
36-
# - task: PublishTestResults@2
37-
# inputs:
38-
# testResultsFormat: VSTest
39-
# testResultsFiles: $(Agent.TempDirectory)/Controls.Core.UnitTests/*.trx
40-
# testRunTitle: Controls.Core.UnitTests - ${{ job.testOS }}
44+
# buildConfig: ${{ parameters.buildConfig }}
45+
# repoLogPath: ${{ parameters.repoLogPath }}
46+
# installPackageArtifacts: false
47+
# buildMSBuildTasks: true
4148

4249
- template: /eng/pipelines/common/run-dotnet-preview.yml
4350
parameters:
4451
displayName: Run Controls.Xaml.UnitTests - ${{ job.testOS }}
4552
mauiSourcePath: ${{ parameters.mauiSourcePath }}
4653
command: test
4754
project: ${{ parameters.mauiSourcePath }}/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj
48-
arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/Controls.Xaml.UnitTests /p:_SkipUpdateBuildNumber=true'
55+
arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/Controls.Xaml.UnitTests /bl:$(Build.Arcade.LogsPath)${{ parameters.buildConfig }}/Controls.Xaml.UnitTests.binlog /p:_SkipUpdateBuildNumber=true'
4956
useExitCodeForErrors: true
5057

5158
- task: PublishTestResults@2
@@ -54,66 +61,6 @@ stages:
5461
testResultsFiles: $(Agent.TempDirectory)/Controls.Xaml.UnitTests/*.trx
5562
testRunTitle: Controls.Xaml.UnitTests - ${{ job.testOS }}
5663

57-
- template: /eng/pipelines/common/run-dotnet-preview.yml
58-
parameters:
59-
displayName: Run SourceGen.UnitTests - ${{ job.testOS }}
60-
mauiSourcePath: ${{ parameters.mauiSourcePath }}
61-
command: test
62-
project: ${{ parameters.mauiSourcePath }}/src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj
63-
arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/SourceGen.UnitTests /p:_SkipUpdateBuildNumber=true'
64-
useExitCodeForErrors: true
65-
66-
- task: PublishTestResults@2
67-
inputs:
68-
testResultsFormat: VSTest
69-
testResultsFiles: $(Agent.TempDirectory)/SourceGen.UnitTests/*.trx
70-
testRunTitle: SourceGen.UnitTests - ${{ job.testOS }}
71-
72-
# - template: /eng/pipelines/common/run-dotnet-preview.yml
73-
# parameters:
74-
# displayName: Run Controls.BindingSourceGen.UnitTests - ${{ job.testOS }}
75-
# mauiSourcePath: ${{ parameters.mauiSourcePath }}
76-
# command: test
77-
# project: ${{ parameters.mauiSourcePath }}/src/Controls/tests/BindingSourceGen.UnitTests/Controls.BindingSourceGen.UnitTests.csproj
78-
# arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/Controls.BindingSourceGen.UnitTests /p:_SkipUpdateBuildNumber=true'
79-
# useExitCodeForErrors: true
80-
81-
# - task: PublishTestResults@2
82-
# inputs:
83-
# testResultsFormat: VSTest
84-
# testResultsFiles: $(Agent.TempDirectory)/Controls.BindingSourceGen.UnitTests/*.trx
85-
# testRunTitle: Controls.BindingSourceGen.UnitTests - ${{ job.testOS }}
86-
87-
# - template: /eng/pipelines/common/run-dotnet-preview.yml
88-
# parameters:
89-
# displayName: Run Core.UnitTests - ${{ job.testOS }}
90-
# mauiSourcePath: ${{ parameters.mauiSourcePath }}
91-
# command: test
92-
# project: ${{ parameters.mauiSourcePath }}/src/Core/tests/UnitTests/Core.UnitTests.csproj
93-
# arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/Core.UnitTests /p:_SkipUpdateBuildNumber=true'
94-
# useExitCodeForErrors: true
95-
96-
# - task: PublishTestResults@2
97-
# inputs:
98-
# testResultsFormat: VSTest
99-
# testResultsFiles: $(Agent.TempDirectory)/Core.UnitTests/*.trx
100-
# testRunTitle: Core.UnitTests - ${{ job.testOS }}
101-
102-
# - template: /eng/pipelines/common/run-dotnet-preview.yml
103-
# parameters:
104-
# displayName: Run Essentials.UnitTests - ${{ job.testOS }}
105-
# mauiSourcePath: ${{ parameters.mauiSourcePath }}
106-
# command: test
107-
# project: ${{ parameters.mauiSourcePath }}/src/Essentials/test/UnitTests/Essentials.UnitTests.csproj
108-
# arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/Essentials.UnitTests /p:_SkipUpdateBuildNumber=true'
109-
# useExitCodeForErrors: true
110-
111-
# - task: PublishTestResults@2
112-
# inputs:
113-
# testResultsFormat: VSTest
114-
# testResultsFiles: $(Agent.TempDirectory)/Essentials.UnitTests/*.trx
115-
# testRunTitle: Essentials.UnitTests - ${{ job.testOS }}
116-
11764
- template: /eng/pipelines/common/run-dotnet-preview.yml
11865
parameters:
11966
displayName: Run Resizetizer.UnitTests - ${{ job.testOS }}
@@ -144,28 +91,11 @@ stages:
14491
testResultsFiles: $(Agent.TempDirectory)/Graphics.Tests/*.trx
14592
testRunTitle: Graphics.Tests - ${{ job.testOS }}
14693

147-
# - template: /eng/pipelines/common/run-dotnet-preview.yml
148-
# parameters:
149-
# displayName: Run Compatibility.Core.UnitTests - ${{ job.testOS }}
150-
# mauiSourcePath: ${{ parameters.mauiSourcePath }}
151-
# command: test
152-
# project: ${{ parameters.mauiSourcePath }}/src/Compatibility/Core/tests/Compatibility.UnitTests/Compatibility.Core.UnitTests.csproj
153-
# arguments: '-c ${{ parameters.buildConfig }} --logger trx --results-directory $(Agent.TempDirectory)/Compatibility.Core.UnitTests /p:_SkipUpdateBuildNumber=true'
154-
# useExitCodeForErrors: true
155-
156-
# - task: PublishTestResults@2
157-
# inputs:
158-
# testResultsFormat: VSTest
159-
# testResultsFiles: $(Agent.TempDirectory)/Compatibility.Core.UnitTests/*.trx
160-
# testRunTitle: Compatibility.Core.UnitTests - ${{ job.testOS }}
161-
162-
# TODO: Controls.Core.Design.UnitTests.csproj
163-
16494
- task: ${{ parameters.publishTaskPrefix }}PublishPipelineArtifact@1
16595
displayName: Publish Logs
16696
inputs:
16797
targetPath: ${{ parameters.repoLogPath }}
16898
artifact: Logs - Unit Tests ${{ job.testOS }} $(System.JobAttempt)
16999
condition: always()
170100

171-
- template: /eng/pipelines/common/fail-on-issue.yml
101+
# - template: /eng/pipelines/common/fail-on-issue.yml

eng/pipelines/azure-pipelines-internal.yml

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)