Skip to content

Commit f9b4669

Browse files
authored
Merge branch 'master' into merge/release/5.0-to-master
2 parents fc93e59 + da3e434 commit f9b4669

File tree

2,018 files changed

+23473
-56745
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,018 files changed

+23473
-56745
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Uses Scheduled Triggers, which aren't supported in YAML yet.
2+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=vsts&tabs=yaml#scheduled
3+
4+
# Daily Tests for Blazor
5+
# These use Sauce Labs resources, hence they run daily rather than per-commit.
6+
7+
# We just need one Windows machine because all it does is trigger SauceLabs.
8+
variables:
9+
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
10+
- group: DotNet-MSRC-Storage
11+
- group: AzureDevOps-Artifact-Feeds-Pats
12+
- name: SAUCE_CONNECT_DOWNLOAD_ON_INSTALL
13+
value: true
14+
- name: E2ETESTS_SauceTest
15+
value: true
16+
- name: E2ETESTS_Sauce__TunnelIdentifier
17+
value: 'blazor-e2e-sc-proxy-tunnel'
18+
- name: E2ETESTS_Sauce__HostName
19+
value: 'sauce.local'
20+
21+
jobs:
22+
- template: jobs/default-build.yml
23+
parameters:
24+
buildDirectory: src/Components
25+
isTestingJob: true
26+
agentOs: Windows
27+
jobName: BlazorDailyTests
28+
jobDisplayName: "Blazor Daily Tests"
29+
afterBuild:
30+
31+
# macOS/Safari
32+
- script: 'dotnet test --no-build --configuration Release --filter "StandaloneAppTest"'
33+
workingDirectory: 'src/Components/test/E2ETest'
34+
displayName: 'Run Blazor tests - macOS/Safari'
35+
condition: succeededOrFailed()
36+
env:
37+
# Secrets need to be explicitly mapped to env variables.
38+
E2ETESTS_Sauce__Username: '$(asplab-sauce-labs-username)'
39+
E2ETESTS_Sauce__AccessKey: '$(asplab-sauce-labs-access-key)'
40+
# Set platform/browser configuration.
41+
E2ETESTS_Sauce__TestName: 'Blazor Daily Tests - macOS/Safari'
42+
E2ETESTS_Sauce__PlatformName: 'macOS 10.14'
43+
E2ETESTS_Sauce__BrowserName: 'Safari'
44+
# Need to explicitly set version here because some older versions don't support timeouts in Safari.
45+
E2ETESTS_Sauce__SeleniumVersion: '3.4.0'
46+
47+
# Android/Chrome
48+
- script: 'dotnet test --no-build --configuration Release --filter "StandaloneAppTest"'
49+
workingDirectory: 'src/Components/test/E2ETest'
50+
displayName: 'Run Blazor tests - Android/Chrome'
51+
condition: succeededOrFailed()
52+
env:
53+
# Secrets need to be explicitly mapped to env variables.
54+
E2ETESTS_Sauce__Username: '$(asplab-sauce-labs-username)'
55+
E2ETESTS_Sauce__AccessKey: '$(asplab-sauce-labs-access-key)'
56+
# Set platform/browser configuration.
57+
E2ETESTS_Sauce__TestName: 'Blazor Daily Tests - Android/Chrome'
58+
E2ETESTS_Sauce__PlatformName: 'Android'
59+
E2ETESTS_Sauce__PlatformVersion: '10.0'
60+
E2ETESTS_Sauce__BrowserName: 'Chrome'
61+
E2ETESTS_Sauce__DeviceName: 'Android GoogleAPI Emulator'
62+
E2ETESTS_Sauce__DeviceOrientation: 'portrait'
63+
E2ETESTS_Sauce__AppiumVersion: '1.9.1'
64+
artifacts:
65+
- name: Windows_Logs
66+
path: artifacts/log/
67+
publishOnError: true

.azure/pipelines/ci.yml

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,39 @@ trigger:
77
batch: true
88
branches:
99
include:
10-
- blazor-wasm
1110
- master
1211
- release/*
1312
- internal/release/*
13+
paths:
14+
exclude:
15+
- .github/*
16+
- .vscode/*
17+
# Exclude only a few specific Markdown files because some of them ship.
18+
- docs/*
19+
- CODE-OF-CONDUCT.md
20+
- CONTRIBUTING.md
21+
- LICENSE.TXT
22+
- README.md
23+
- SECURITY.md
24+
# Do not ignore the THIRD-PARTY-NOTICES.TXT file because it ships.
1425

1526
# Run PR validation on all branches
1627
pr:
1728
autoCancel: true
1829
branches:
1930
include:
2031
- '*'
32+
paths:
33+
exclude:
34+
- .github/*
35+
- .vscode/*
36+
- '**/*.md'
37+
- CODE-OF-CONDUCT.md
38+
- CONTRIBUTING.md
39+
- LICENSE.TXT
40+
- README.md
41+
- SECURITY.md
42+
- THIRD-PARTY-NOTICES.TXT
2143

2244
variables:
2345
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
@@ -33,7 +55,7 @@ variables:
3355
- name: _DotNetValidationArtifactsCategory
3456
value: .NETCORE
3557
- name: PostBuildSign
36-
value: false
58+
value: true
3759
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
3860
- name: _BuildArgs
3961
value: /p:TeamName=$(_TeamName)
@@ -95,13 +117,15 @@ variables:
95117
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
96118
- group: DotNet-MSRC-Storage
97119
- name: _InternalRuntimeDownloadArgs
98-
value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey
99-
$(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
100-
# The code signing doesn't use the aspnet build scripts, so the msbuild parameters have
101-
# to be passed directly. This is awkward, since we pass the same info above, but we have
102-
# to have it in two different forms
120+
value: -RuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet
121+
-RuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64)
122+
/p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
123+
# The code signing doesn't use the aspnet build scripts, so the msbuild parameters have to be passed directly. This
124+
# is awkward but necessary because the eng/common/ build scripts don't add the msbuild properties automatically.
103125
- name: _InternalRuntimeDownloadCodeSignArgs
104-
value: /p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64)
126+
value: $(_InternalRuntimeDownloadArgs)
127+
/p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet
128+
/p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64)
105129
- group: DotNet-HelixApi-Access
106130
- name: _UseHelixOpenQueues
107131
value: 'false'
@@ -326,11 +350,43 @@ stages:
326350
publishFeedCredentials: 'DevDiv - VS package feed'
327351

328352

329-
# Build MacOS
353+
# Build MacOS arm64
354+
- template: jobs/default-build.yml
355+
parameters:
356+
jobName: MacOs_arm64_build
357+
jobDisplayName: "Build: macOS arm64"
358+
agentOs: macOs
359+
buildArgs:
360+
--arch arm64
361+
--pack
362+
--all
363+
--no-build-nodejs
364+
--no-build-java
365+
-p:OnlyPackPlatformSpecificPackages=true
366+
-p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml
367+
$(_BuildArgs)
368+
$(_PublishArgs)
369+
$(_InternalRuntimeDownloadArgs)
370+
installNodeJs: false
371+
installJdk: false
372+
artifacts:
373+
- name: MacOS_arm64_Logs
374+
path: artifacts/log/
375+
publishOnError: true
376+
includeForks: true
377+
- name: MacOS_arm64_Packages
378+
path: artifacts/packages/
379+
380+
- ${{ if ne(variables['PostBuildSign'], 'true') }}:
381+
- template: jobs/codesign-xplat.yml
382+
parameters:
383+
inputName: MacOS_arm64
384+
385+
# Build MacOS x64
330386
- template: jobs/default-build.yml
331387
parameters:
332388
jobName: MacOs_x64_build
333-
jobDisplayName: "Build: macOS"
389+
jobDisplayName: "Build: macOS x64"
334390
agentOs: macOs
335391
buildArgs:
336392
--pack
@@ -555,9 +611,11 @@ stages:
555611
includeForks: true
556612
- name: Linux_musl_arm_Packages
557613
path: artifacts/packages/
558-
- template: jobs/codesign-xplat.yml
559-
parameters:
560-
inputName: Linux_musl_arm
614+
615+
- ${{ if ne(variables['PostBuildSign'], 'true') }}:
616+
- template: jobs/codesign-xplat.yml
617+
parameters:
618+
inputName: Linux_musl_arm
561619

562620
# Build Linux Musl ARM64
563621
- template: jobs/default-build.yml
@@ -633,6 +691,7 @@ stages:
633691
jobDisplayName: "Test: Templates - Windows Server 2016 x64"
634692
agentOs: Windows
635693
isTestingJob: true
694+
testRunTitle: Templates-$(AgentOsName)-$(BuildConfiguration)
636695
steps:
637696
- script: ./build.cmd -ci -nobl -all -pack $(_InternalRuntimeDownloadArgs)
638697
displayName: Build Repo
@@ -787,6 +846,7 @@ stages:
787846
- Windows_arm_build
788847
- Windows_arm64_build
789848
- ${{ if ne(variables['PostBuildSign'], 'true') }}:
849+
- CodeSign_Xplat_MacOS_arm64
790850
- CodeSign_Xplat_MacOS_x64
791851
- CodeSign_Xplat_Linux_x64
792852
- CodeSign_Xplat_Linux_arm

.azure/pipelines/helix-matrix.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
timeoutInMinutes: 480
3333
steps:
3434
# Build the shared framework
35-
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
35+
- script: ./build.cmd -ci -nobl -all -pack -arch x64
3636
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
3737
displayName: Build shared fx
3838
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
@@ -58,11 +58,12 @@ jobs:
5858
agentOs: Linux
5959
timeoutInMinutes: 480
6060
steps:
61-
- script: ./restore.sh --ci --nobl --arch arm64
62-
displayName: Restore
61+
- script: ./build.sh --ci --nobl --pack --arch arm64
62+
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
63+
displayName: Build shared Fx
6364
- script: ./build.sh --ci --nobl --arch arm64 --noBuildRepoTasks --no-build-nodejs --no-restore --test --all
6465
--projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true
65-
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
66+
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
6667
displayName: Run build.sh helix arm64 target
6768
env:
6869
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues

.azure/pipelines/jobs/default-build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ parameters:
6060
installNodeJs: true
6161
installJdk: true
6262
timeoutInMinutes: 180
63+
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
6364
useHostedUbuntu: true
6465
skipComponentGovernanceDetection: false
6566

@@ -83,6 +84,8 @@ jobs:
8384
enablePublishBuildAssets: true
8485
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
8586
enablePublishTestResults: ${{ eq(parameters.isTestingJob, 'true') }} # publish test results to AzDO (populates AzDO Tests tab)
87+
mergeTestResults: true
88+
testRunTitle: ${{ parameters.testRunTitle }}
8689
enableTelemetry: true
8790
helixRepo: dotnet/aspnetcore
8891
helixType: build.product/
@@ -92,7 +95,7 @@ jobs:
9295
# See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
9396
pool:
9497
${{ if eq(parameters.agentOs, 'macOS') }}:
95-
vmImage: macOS-10.14
98+
vmImage: macOS-10.15
9699
${{ if eq(parameters.agentOs, 'Linux') }}:
97100
${{ if eq(parameters.useHostedUbuntu, true) }}:
98101
vmImage: ubuntu-16.04
@@ -143,6 +146,9 @@ jobs:
143146
- ${{ if ne(parameters.agentOs, 'Windows') }}:
144147
- script: df -h
145148
displayName: Disk size
149+
- ${{ if eq(parameters.agentOs, 'macOS') }}:
150+
- script: sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
151+
displayName: Use XCode 12.2
146152
- checkout: self
147153
clean: true
148154
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isTestingJob, true)) }}:
@@ -281,5 +287,7 @@ jobs:
281287
inputs:
282288
testRunner: junit
283289
testResultsFiles: '**/artifacts/log/**/*.junit.xml'
290+
testRunTitle: $(AgentOsName)-$(BuildConfiguration)-js
291+
mergeTestResults: true
284292
buildConfiguration: $(BuildConfiguration)
285293
buildPlatform: $(AgentOsName)

.azure/pipelines/quarantined-pr.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,46 @@
1-
# We want to run quarantined tests on master as well as on PRs
1+
#
2+
# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file.
3+
#
4+
5+
# Configure which branches trigger builds
6+
# We want to run quarantined tests on release/5.0 and master as well as on PRs
27
trigger:
38
batch: true
49
branches:
510
include:
611
- master
712
- release/5.0
13+
paths:
14+
exclude:
15+
- .github/*
16+
- .vscode/*
17+
# Exclude only a few specific Markdown files because some of them ship.
18+
- docs/*
19+
- CODE-OF-CONDUCT.md
20+
- CONTRIBUTING.md
21+
- LICENSE.TXT
22+
- README.md
23+
- SECURITY.md
24+
# Do not ignore the THIRD-PARTY-NOTICES.TXT file because it ships.
825

26+
# Run PR validation on branches that include Helix tests
927
pr:
1028
autoCancel: true
1129
branches:
1230
include:
1331
- master
1432
- release/5.0
33+
paths:
34+
exclude:
35+
- .github/*
36+
- .vscode/*
37+
- '**/*.md'
38+
- CODE-OF-CONDUCT.md
39+
- CONTRIBUTING.md
40+
- LICENSE.TXT
41+
- README.md
42+
- SECURITY.md
43+
- THIRD-PARTY-NOTICES.TXT
1544

1645
schedules:
1746
- cron: "0 */4 * * *"
@@ -81,6 +110,8 @@ jobs:
81110
testResultsFormat: 'xUnit'
82111
testResultsFiles: '*.xml'
83112
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
113+
testRunTitle: Quarantine-$(AgentOsName)-$(BuildConfiguration)-xunit
114+
mergeTestResults: true
84115
condition: always()
85116
artifacts:
86117
- name: Windows_Quarantined_Test_Logs
@@ -114,6 +145,8 @@ jobs:
114145
testResultsFormat: 'xUnit'
115146
testResultsFiles: '*.xml'
116147
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
148+
testRunTitle: Quarantine-$(AgentOsName)-$(BuildConfiguration)-xunit
149+
mergeTestResults: true
117150
condition: always()
118151
artifacts:
119152
- name: MacOS_Quarantined_Test_Logs
@@ -148,6 +181,8 @@ jobs:
148181
testResultsFormat: 'xUnit'
149182
testResultsFiles: '*.xml'
150183
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
184+
testRunTitle: Quarantine-$(AgentOsName)-$(BuildConfiguration)-xunit
185+
mergeTestResults: true
151186
condition: always()
152187
artifacts:
153188
- name: Linux_Quarantined_Test_Logs

.azure/pipelines/quarantined-tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ jobs:
5656
agentOs: Linux
5757
timeoutInMinutes: 480
5858
steps:
59-
- script: ./restore.sh --ci --nobl --arch arm64
60-
displayName: Restore
59+
- script: ./build.sh --ci --nobl --pack --arch arm64
60+
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
61+
displayName: Build shared Fx
6162
- script: ./build.sh --ci --nobl --arch arm64 --noBuildRepoTasks --no-build-nodejs --no-restore --test --all
6263
--projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true
63-
/p:RunQuarantinedTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
64+
/p:RunQuarantinedTests=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
6465
displayName: Run build.sh helix arm64 target
6566
continueOnError: true
6667
env:

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@ end_of_line = lf
4242

4343
[*.{razor,cshtml}]
4444
charset = utf-8-bom
45+
46+
[*.cs]
47+
dotnet_diagnostic.CA1304.severity = error
48+
dotnet_diagnostic.CA1305.severity = error
49+
dotnet_diagnostic.CA1310.severity = error

0 commit comments

Comments
 (0)