diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index dabf8e3987..f0e8590bbd 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -646,54 +646,6 @@ stages: publishOnError: true includeForks: true - - template: jobs/default-build.yml - parameters: - condition: notin(variables['Build.Reason'], 'PullRequest') - jobName: Helix_x64_daily - jobDisplayName: 'Tests: Helix x64 Daily' - agentOs: Windows - timeoutInMinutes: 180 - steps: - # Build the shared framework - - script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log - displayName: Build shared fx - - script: .\restore.cmd -ci -nobl /p:BuildInteropProjects=true - displayName: Restore interop projects - - script: .\build.cmd -ci -nobl -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log - displayName: Run build.cmd helix target - env: - HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues - SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops - artifacts: - - name: Helix_logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - # Helix ARM64 - - template: jobs/default-build.yml - parameters: - condition: and(eq(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) - jobName: Helix_arm64_daily - jobDisplayName: "Tests: Helix ARM64 Daily" - agentOs: Linux - timeoutInMinutes: 180 - steps: - # Build the shared framework - - script: ./restore.sh -ci -nobl - displayName: Restore - - script: ./build.sh -ci --nobl --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log - displayName: Run build.sh helix arm64 target - env: - HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues - SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops - installNodeJs: false - artifacts: - - name: Helix_arm64_logs - path: artifacts/log/ - publishOnError: true - includeForks: true - # Source build - job: Source_Build displayName: 'Test: Linux Source Build' diff --git a/.azure/pipelines/helix-matrix.yml b/.azure/pipelines/helix-matrix.yml new file mode 100644 index 0000000000..d0f2ff6c9e --- /dev/null +++ b/.azure/pipelines/helix-matrix.yml @@ -0,0 +1,63 @@ +# We only want to run full helix matrix on master +pr: none +trigger: none +schedules: +- cron: "0 */12 * * *" + branches: + include: + - master + always: true + +variables: +- ${{ if ne(variables['System.TeamProject'], 'internal') }}: + - name: _UseHelixOpenQueues + value: 'true' +- ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - group: DotNet-HelixApi-Access + - name: _UseHelixOpenQueues + value: 'false' + +jobs: +- template: jobs/default-build.yml + parameters: + jobName: Helix_matrix_x64 + jobDisplayName: 'Tests: Helix full matrix x64' + agentOs: Windows + timeoutInMinutes: 240 + steps: + # Build the shared framework + - script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log + displayName: Build shared fx + - script: .\restore.cmd -ci /p:BuildInteropProjects=true + displayName: Restore interop projects + - script: .\build.cmd -ci -nobl -NoRestore -test -noBuildJava -all -projects eng\helix\helix.proj /p:IsHelixDaily=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log + displayName: Run build.cmd helix target + env: + HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues + SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops + artifacts: + - name: Helix_logs + path: artifacts/log/ + publishOnError: true + +# Helix ARM64 +- template: jobs/default-build.yml + parameters: + jobName: Helix_matrix_arm64 + jobDisplayName: "Tests: Helix ARM64 matrix" + agentOs: Linux + timeoutInMinutes: 180 + steps: + - script: ./restore.sh -ci -nobl + displayName: Restore + - script: ./build.sh -ci --nobl --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log + displayName: Run build.sh helix arm64 target + env: + HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues + SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops + installNodeJs: false + artifacts: + - name: Helix_arm64_logs + path: artifacts/log/ + publishOnError: true + includeForks: true diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index a5e64c947f..3643df3aac 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -309,6 +309,11 @@ namespace RunTests } var HELIX_WORKITEM_UPLOAD_ROOT = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"); + if (string.IsNullOrEmpty(HELIX_WORKITEM_UPLOAD_ROOT)) + { + Console.WriteLine("No HELIX_WORKITEM_UPLOAD_ROOT specified, skipping log copy"); + return; + } Console.WriteLine($"Copying artifacts/log/ to {HELIX_WORKITEM_UPLOAD_ROOT}/"); if (Directory.Exists("artifacts/log")) { diff --git a/eng/helix/content/runtests.cmd b/eng/helix/content/runtests.cmd index c759aae669..0b6e89c3cd 100644 --- a/eng/helix/content/runtests.cmd +++ b/eng/helix/content/runtests.cmd @@ -30,8 +30,8 @@ echo "Installing Runtime" powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Runtime dotnet -Version %$runtimeVersion% -InstallDir %DOTNET_ROOT%" set exit_code=0 -echo "Restore: dotnet restore RunTests\RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources..." -dotnet restore RunTests\RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources +echo "Restore: dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --ignore-failed-sources..." +dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --ignore-failed-sources echo "Running tests: dotnet run --project RunTests\RunTests.csproj -- --target %$target% --sdk %$sdkVersion% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout%..." dotnet run --project RunTests\RunTests.csproj -- --target %$target% --sdk %$sdkVersion% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout% diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props index 3e76df9544..f346b702f0 100644 --- a/eng/targets/Helix.Common.props +++ b/eng/targets/Helix.Common.props @@ -18,14 +18,14 @@ - + - + @@ -37,13 +37,9 @@ + - + - - diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets index d661a72403..ea437b3d14 100644 --- a/eng/targets/Helix.targets +++ b/eng/targets/Helix.targets @@ -4,7 +4,7 @@ - + @@ -80,6 +80,7 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj false false + false diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj b/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj index d8c8f75989..d784bb29f6 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj @@ -15,6 +15,8 @@ + + diff --git a/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj b/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj index 2d1a5aab26..f8e0099b04 100644 --- a/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj +++ b/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj @@ -8,6 +8,7 @@ + diff --git a/src/Middleware/NodeServices/test/NodeServicesTest.cs b/src/Middleware/NodeServices/test/NodeServicesTest.cs index 2bae8f11b6..0ad53c117b 100644 --- a/src/Middleware/NodeServices/test/NodeServicesTest.cs +++ b/src/Middleware/NodeServices/test/NodeServicesTest.cs @@ -4,12 +4,14 @@ using System; using System.IO; using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing; using Microsoft.AspNetCore.NodeServices.HostingModels; using Microsoft.Extensions.DependencyInjection; using Xunit; namespace Microsoft.AspNetCore.NodeServices { + [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/22084", Queues = "Windows.10.Arm64;Windows.10.Arm64.Open")] [Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")] public class NodeServicesTest : IDisposable { @@ -26,7 +28,7 @@ namespace Microsoft.AspNetCore.NodeServices _nodeServices = NodeServicesFactory.CreateNodeServices(options); } - [Fact] + [ConditionalFact] public async Task CanGetSuccessResult() { // Act @@ -38,7 +40,7 @@ namespace Microsoft.AspNetCore.NodeServices Assert.Equal("test result", result); } - [Fact] + [ConditionalFact] public async Task CanGetErrorResult() { // Act/Assert @@ -49,7 +51,7 @@ namespace Microsoft.AspNetCore.NodeServices Assert.StartsWith("This is an error from Node", ex.Message); } - [Fact] + [ConditionalFact] public async Task CanGetResultAsynchronously() { // Act @@ -63,7 +65,7 @@ namespace Microsoft.AspNetCore.NodeServices Assert.Equal("delayed test result", result); } - [Fact] + [ConditionalFact] public async Task CanPassParameters() { // Act @@ -77,7 +79,7 @@ namespace Microsoft.AspNetCore.NodeServices Assert.Equal("Param0: Hey; Param1: 123", result); } - [Fact] + [ConditionalFact] public async Task CanPassParametersWithCamelCaseNameConversion() { // Act @@ -90,7 +92,7 @@ namespace Microsoft.AspNetCore.NodeServices Assert.Equal("Received: [{\"stringProp\":\"Abc\",\"intProp\":123,\"boolProp\":true}]", result); } - [Fact] + [ConditionalFact] public async Task CanReceiveComplexResultWithPascalCaseNameConversion() { // Act @@ -104,7 +106,7 @@ namespace Microsoft.AspNetCore.NodeServices Assert.True(result.BoolProp); } - [Fact] + [ConditionalFact] public async Task CanInvokeDefaultModuleExport() { // Act diff --git a/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj b/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj index d84804c6a2..db765b14d5 100644 --- a/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj +++ b/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj @@ -4,6 +4,8 @@ $(DefaultNetCoreTargetFramework) true true + + Windows.10.Arm64;Windows.10.Arm64.Open diff --git a/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj b/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj index 39871045f6..79752c12b2 100644 --- a/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj +++ b/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj @@ -4,6 +4,8 @@ $(DefaultNetCoreTargetFramework) true Libuv.BindTests + + Windows.10.Arm64;Windows.10.Arm64.Open diff --git a/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj b/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj index d9ee70e3fc..65f62bd641 100644 --- a/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj @@ -7,6 +7,8 @@ true Libuv.FunctionalTests + + Windows.10.Arm64;Windows.10.Arm64.Open