diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs index 296c348ac2cf..4e1ab21b3b05 100644 --- a/tests/common/TestRuntime.cs +++ b/tests/common/TestRuntime.cs @@ -299,12 +299,10 @@ public static void AssertSimulatorOrDesktop (string message = "This test only wo public static void AssertNotVirtualMachine () { -#if MONOMAC || __MACCATALYST__ // enviroment variable set by the CI when running on a VM var vmVendor = Environment.GetEnvironmentVariable ("VM_VENDOR"); if (!string.IsNullOrEmpty (vmVendor)) NUnit.Framework.Assert.Ignore ($"This test only runs on device. Found vm vendor: {vmVendor}"); -#endif } public static bool IsVSTS => diff --git a/tests/linker/link sdk/LinkSdkRegressionTest.cs b/tests/linker/link sdk/LinkSdkRegressionTest.cs index b75d223ed24a..0f147186f702 100644 --- a/tests/linker/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/link sdk/LinkSdkRegressionTest.cs @@ -789,11 +789,11 @@ void SpecialFolderImpl () #else var myExists = false; #endif - path = TestFolder (Environment.SpecialFolder.MyMusic, exists: myExists); + path = TestFolderIfAvailableInCI (Environment.SpecialFolder.MyMusic, myExists); - path = TestFolder (Environment.SpecialFolder.MyVideos, exists: myExists); + path = TestFolderIfAvailableInCI (Environment.SpecialFolder.MyVideos, myExists); - path = TestFolder (Environment.SpecialFolder.DesktopDirectory, exists: myExists); + path = TestFolderIfAvailableInCI (Environment.SpecialFolder.DesktopDirectory, myExists); #if __TVOS__ path = TestFolder (Environment.SpecialFolder.Fonts, exists: null, supported: true); @@ -811,7 +811,7 @@ void SpecialFolderImpl () path = TestFolder (Environment.SpecialFolder.Templates, exists: false); #endif - path = TestFolder (Environment.SpecialFolder.MyPictures, exists: myExists); + path = TestFolderIfAvailableInCI (Environment.SpecialFolder.MyPictures, myExists); #if __MACOS__ path = TestFolder (Environment.SpecialFolder.CommonTemplates, supported: false); @@ -897,6 +897,17 @@ void SpecialFolderImpl () path = TestFolder (Environment.SpecialFolder.Resources, readOnly: tvos && device); Assert.That (path.EndsWith ("/Library", StringComparison.Ordinal), Is.True, "Resources"); #endif + // Some CI VM images don't initialize all standard user directories, so keep this + // tolerance limited to CI VMs and preserve the stricter check for other runs. + string TestFolderIfAvailableInCI (Environment.SpecialFolder folder, bool exists) + { +#if __MACOS__ + var path = Environment.GetFolderPath (folder); + if (string.IsNullOrEmpty (path) && TestRuntime.IsInCI && TestRuntime.IsVM) + return path; +#endif + return TestFolder (folder, exists: exists); + } } #if !__MACOS__ diff --git a/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs b/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs index a5249b42ea58..abe7b02f3266 100644 --- a/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs +++ b/tests/monotouch-test/AudioToolbox/AudioQueueTest.cs @@ -30,6 +30,8 @@ public void Properties () [Test] public void ChannelAssignments () { + TestRuntime.AssertNotVirtualMachine (); + var aq = new OutputAudioQueue (AudioStreamBasicDescription.CreateLinearPCM ()); var route = global::AVFoundation.AVAudioSession.SharedInstance ().CurrentRoute; diff --git a/tests/monotouch-test/Metal/MTLDeviceTests.cs b/tests/monotouch-test/Metal/MTLDeviceTests.cs index 2a6a38b51134..948737e2749b 100644 --- a/tests/monotouch-test/Metal/MTLDeviceTests.cs +++ b/tests/monotouch-test/Metal/MTLDeviceTests.cs @@ -86,6 +86,8 @@ public void ReturnReleaseTest () if (device is null) Assert.Inconclusive ("Metal is not supported"); + TestRuntime.AssertNotVirtualMachine (); + // Apple claims that "Indirect command buffers" are available with MTLGPUFamilyCommon2, but it crashes on at least one machine. // Log what the current device supports, just to have it in the log. foreach (MTLFeatureSet fs in Enum.GetValues ()) { diff --git a/tests/monotouch-test/System.Net.Http/NetworkResources.cs b/tests/monotouch-test/System.Net.Http/NetworkResources.cs index 6fa21fe58507..2a887a52a3d6 100644 --- a/tests/monotouch-test/System.Net.Http/NetworkResources.cs +++ b/tests/monotouch-test/System.Net.Http/NetworkResources.cs @@ -10,6 +10,7 @@ public static class NetworkResources { public static string MicrosoftUrl => AssertNetworkConnection ("https://www.microsoft.com"); public static Uri MicrosoftUri => new Uri (MicrosoftUrl); public static string MicrosoftHttpUrl => AssertNetworkConnection ("http://www.microsoft.com"); + public static Uri MicrosoftHttpUri => new Uri (MicrosoftHttpUrl); public static string XamarinUrl => AssertNetworkConnection ("https://dotnet.microsoft.com/apps/xamarin"); public static string XamarinHttpUrl => AssertNetworkConnection ("http://dotnet.microsoft.com/apps/xamarin"); public static Uri XamarinUri => new Uri (XamarinUrl); diff --git a/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs b/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs index d72f372a878a..0c5a4f57af5f 100644 --- a/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs +++ b/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs @@ -236,6 +236,9 @@ public void TestCallbackBackground (bool stronglyTyped) public void TestMultiImage (bool stronglyTyped, bool customCallback) { TestRuntime.AssertXcodeVersion (26, 0); +#if __MACOS__ || __MACCATALYST__ + TestRuntime.AssertNotVirtualMachine (); +#endif if (!VTCompressionSession.IsStereoMvHevcEncodeSupported ()) Assert.Ignore ("Stereo MV-HEVC encoding is not supported on the current system."); diff --git a/tests/monotouch-test/VideoToolbox/VTMotionEstimationSessionTest.cs b/tests/monotouch-test/VideoToolbox/VTMotionEstimationSessionTest.cs index a8f49139e6ff..9e338d9d6ef9 100644 --- a/tests/monotouch-test/VideoToolbox/VTMotionEstimationSessionTest.cs +++ b/tests/monotouch-test/VideoToolbox/VTMotionEstimationSessionTest.cs @@ -24,6 +24,9 @@ public class VTMotionEstimationSessionTest { public void CreateTest () { TestRuntime.AssertXcodeVersion (26, 0); +#if __MACOS__ || __MACCATALYST__ + TestRuntime.AssertNotVirtualMachine (); +#endif // VTMotionEstimationSessionCreate just returns in the simulator (a single 'ret' instruction), // which means it returns with status=VTStatus.Ok, but no session actually created. So ignore // this test in the simulator. @@ -49,6 +52,9 @@ public void CreateTest () public void CreateStronglyTypedTest () { TestRuntime.AssertXcodeVersion (26, 0); +#if __MACOS__ || __MACCATALYST__ + TestRuntime.AssertNotVirtualMachine (); +#endif // VTMotionEstimationSessionCreate just returns in the simulator (a single 'ret' instruction), // which means it returns with status=VTStatus.Ok, but no session actually created. So ignore // this test in the simulator. diff --git a/tests/xharness/AppRunner.cs b/tests/xharness/AppRunner.cs index 4cc1a11b2690..8f79f259d1ae 100644 --- a/tests/xharness/AppRunner.cs +++ b/tests/xharness/AppRunner.cs @@ -225,6 +225,13 @@ public async Task RunAsync () if (harness.InCI) { // We use the 'BUILD_REVISION' variable to detect whether we're running CI or not. args.Add (new SetEnvVariableArgument ("BUILD_REVISION", Environment.GetEnvironmentVariable ("BUILD_REVISION"))); + + // Forward VM_VENDOR (set by the pipeline when running on a VM-backed + // pool such as ACES) so TestRuntime.AssertNotVirtualMachine works + // inside the iOS/tvOS simulator process. + var vmVendor = Environment.GetEnvironmentVariable ("VM_VENDOR"); + if (!string.IsNullOrEmpty (vmVendor)) + args.Add (new SetEnvVariableArgument ("VM_VENDOR", vmVendor)); } if (!harness.GetIncludeSystemPermissionTests (TestPlatform.iOS, !isSimulator)) diff --git a/tools/devops/automation/build-pipeline.yml b/tools/devops/automation/build-pipeline.yml index d3e3f8b93895..ba07f97f56ea 100644 --- a/tools/devops/automation/build-pipeline.yml +++ b/tools/devops/automation/build-pipeline.yml @@ -132,6 +132,7 @@ extends: forceInsertion: ${{ parameters.forceInsertion }} pushNugets: ${{ parameters.pushNugets }} pushNugetsToMaestro: ${{ parameters.pushNugetsToMaestro }} + useACES: true # flip to false to opt CI out of ACES; see templates/variables/common.yml - template: localization/v1.yml@yaml-templates parameters: diff --git a/tools/devops/automation/build-pull-request.yml b/tools/devops/automation/build-pull-request.yml index b6e7f76620cf..812d2d33944d 100644 --- a/tools/devops/automation/build-pull-request.yml +++ b/tools/devops/automation/build-pull-request.yml @@ -113,3 +113,4 @@ extends: forceInsertion: ${{ parameters.forceInsertion }} pushNugets: false pushNugetsToMaestro: false + useACES: false # flip to true to opt PR into ACES; see templates/variables/common.yml diff --git a/tools/devops/automation/run-ci-api-diff.yml b/tools/devops/automation/run-ci-api-diff.yml index 8ccd511ab0c3..caf428a30870 100644 --- a/tools/devops/automation/run-ci-api-diff.yml +++ b/tools/devops/automation/run-ci-api-diff.yml @@ -17,3 +17,4 @@ extends: parameters: isPR: false pool: $(CIBuildPool) + useACES: true # flip to false to opt CI api-diff out of ACES; see templates/variables/common.yml diff --git a/tools/devops/automation/run-post-ci-build-tests.yml b/tools/devops/automation/run-post-ci-build-tests.yml index af8677d8b4e6..f09d70d3e7ba 100644 --- a/tools/devops/automation/run-post-ci-build-tests.yml +++ b/tools/devops/automation/run-post-ci-build-tests.yml @@ -17,3 +17,4 @@ extends: template: templates/pipelines/run-tests-pipeline.yml parameters: isPR: false + useACES: true # flip to false to opt CI simulator tests out of ACES; see templates/variables/common.yml diff --git a/tools/devops/automation/run-post-pr-build-tests.yml b/tools/devops/automation/run-post-pr-build-tests.yml index b83f2d8e95c3..81be17692d32 100644 --- a/tools/devops/automation/run-post-pr-build-tests.yml +++ b/tools/devops/automation/run-post-pr-build-tests.yml @@ -27,3 +27,4 @@ extends: parameters: isPR: true buildPackages: true + useACES: false # flip to true to opt PR simulator tests into ACES; see templates/variables/common.yml diff --git a/tools/devops/automation/run-pr-api-diff.yml b/tools/devops/automation/run-pr-api-diff.yml index 07401bdf077c..03f693b4b5ea 100644 --- a/tools/devops/automation/run-pr-api-diff.yml +++ b/tools/devops/automation/run-pr-api-diff.yml @@ -26,3 +26,4 @@ extends: parameters: isPR: true pool: $(PRBuildPool) + useACES: false # flip to true to opt PR api-diff into ACES; see templates/variables/common.yml diff --git a/tools/devops/automation/templates/api-diff-stage.yml b/tools/devops/automation/templates/api-diff-stage.yml index a81ac79c8bda..e13e9957a7c5 100644 --- a/tools/devops/automation/templates/api-diff-stage.yml +++ b/tools/devops/automation/templates/api-diff-stage.yml @@ -24,6 +24,9 @@ parameters: - name: macOSName type: string +- name: useACES + type: boolean + default: false stages: @@ -69,3 +72,4 @@ stages: gitHubToken: $(Github.Token) xqaCertPass: $(xqa--certificates--password) pool: ${{ parameters.pool }} + useACES: ${{ parameters.useACES }} diff --git a/tools/devops/automation/templates/build/api-diff-stage.yml b/tools/devops/automation/templates/build/api-diff-stage.yml index 03cc9d7f34d9..edac9d79ca91 100644 --- a/tools/devops/automation/templates/build/api-diff-stage.yml +++ b/tools/devops/automation/templates/build/api-diff-stage.yml @@ -34,6 +34,10 @@ parameters: - name: macOSName type: string +- name: useACES + type: boolean + default: false + jobs: # Detect changes - job: api_diff @@ -44,13 +48,19 @@ jobs: # set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ] - pool: - name: ${{ parameters.pool }} - demands: - - Agent.OS -equals Darwin - - Agent.OSVersion -gtVersion $(minimumMacOSVersion) - - macOS.Name -equals ${{ parameters.macOSName }} - - XcodeChannel -equals ${{ parameters.xcodeChannel }} + ${{ if parameters.useACES }}: + pool: + name: $(CIBuildPoolACES) + demands: + - ImageOverride -equals $(CIBuildPoolACESImage) + ${{ else }}: + pool: + name: ${{ parameters.pool }} + demands: + - Agent.OS -equals Darwin + - Agent.OSVersion -gtVersion $(minimumMacOSVersion) + - macOS.Name -equals ${{ parameters.macOSName }} + - XcodeChannel -equals ${{ parameters.xcodeChannel }} workspace: clean: all diff --git a/tools/devops/automation/templates/build/build-mac-tests-stage.yml b/tools/devops/automation/templates/build/build-mac-tests-stage.yml index 0622c8741b5d..be7ea2efb3b1 100644 --- a/tools/devops/automation/templates/build/build-mac-tests-stage.yml +++ b/tools/devops/automation/templates/build/build-mac-tests-stage.yml @@ -34,6 +34,10 @@ parameters: - name: macOSName type: string +- name: useACES + type: boolean + default: false + jobs: # This job builds the macOS tests. @@ -49,14 +53,21 @@ jobs: BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] RUN_MAC_TESTS: $[ stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'] ] condition: ne(stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'],'') - pool: - os: macOS - name: ${{ parameters.pool }} - demands: - - Agent.OS -equals Darwin - - Agent.OSVersion -gtVersion $(minimumMacOSVersion) - - macOS.Name -equals ${{ parameters.macOSName }} - - XcodeChannel -equals ${{ parameters.xcodeChannel }} + ${{ if parameters.useACES }}: + pool: + os: macOS + name: $(CIBuildPoolACES) + demands: + - ImageOverride -equals $(CIBuildPoolACESImage) + ${{ else }}: + pool: + os: macOS + name: ${{ parameters.pool }} + demands: + - Agent.OS -equals Darwin + - Agent.OSVersion -gtVersion $(minimumMacOSVersion) + - macOS.Name -equals ${{ parameters.macOSName }} + - XcodeChannel -equals ${{ parameters.xcodeChannel }} steps: - template: build-mac-tests.yml diff --git a/tools/devops/automation/templates/build/build-stage.yml b/tools/devops/automation/templates/build/build-stage.yml index c03d3abe9a37..3bd8bc1f799b 100644 --- a/tools/devops/automation/templates/build/build-stage.yml +++ b/tools/devops/automation/templates/build/build-stage.yml @@ -38,6 +38,10 @@ parameters: - name: use1ES type: boolean + - name: useACES + type: boolean + default: false + jobs: # This job performs the build of the nuget pkgs and the framework pkgs. There are two interesting dependencies in this job: - job: build @@ -66,14 +70,21 @@ jobs: BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ] RUN_MAC_TESTS: $[ stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'] ] - pool: - os: macOS - name: ${{ parameters.pool }} - demands: - - Agent.OS -equals Darwin - - Agent.OSVersion -gtVersion $(minimumMacOSVersion) - - macOS.Name -equals ${{ parameters.macOSName }} - - XcodeChannel -equals ${{ parameters.xcodeChannel }} + ${{ if parameters.useACES }}: + pool: + os: macOS + name: $(CIBuildPoolACES) + demands: + - ImageOverride -equals $(CIBuildPoolACESImage) + ${{ else }}: + pool: + os: macOS + name: ${{ parameters.pool }} + demands: + - Agent.OS -equals Darwin + - Agent.OSVersion -gtVersion $(minimumMacOSVersion) + - macOS.Name -equals ${{ parameters.macOSName }} + - XcodeChannel -equals ${{ parameters.xcodeChannel }} steps: - template: build-pkgs.yml diff --git a/tools/devops/automation/templates/main-stage.yml b/tools/devops/automation/templates/main-stage.yml index c06cfb6e6828..671be873a5d1 100644 --- a/tools/devops/automation/templates/main-stage.yml +++ b/tools/devops/automation/templates/main-stage.yml @@ -56,6 +56,10 @@ parameters: type: string default: '' + - name: useACES + type: boolean + default: false + stages: - stage: configure_build @@ -103,6 +107,7 @@ stages: xqaCertPass: $(xqa--certificates--password) pool: ${{ parameters.pool }} use1ES: true + useACES: ${{ parameters.useACES }} # .NET Release Prep and VS Insertion Stages, only execute them when the build comes from an official branch and is not a schedule build from OneLoc # setting the stage at this level makes the graph of the UI look better, else the lines overlap and is not clear. diff --git a/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml b/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml index 5b81d42282de..76d8275b16c9 100644 --- a/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml +++ b/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml @@ -22,6 +22,10 @@ parameters: type: boolean default: false +- name: useACES + type: boolean + default: false + resources: repositories: - repository: self @@ -49,3 +53,4 @@ stages: isPR: ${{ parameters.isPR }} provisionatorChannel: ${{ parameters.provisionatorChannel }} pool: ${{ parameters.pool }} + useACES: ${{ parameters.useACES }} diff --git a/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml b/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml index a3ef20748f63..02efa1c1a51e 100644 --- a/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml +++ b/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml @@ -36,6 +36,11 @@ parameters: type: boolean default: false + - name: useACES + displayName: Use ACES shared pool for simulator tests + type: boolean + default: false + resources: repositories: - repository: self @@ -62,3 +67,4 @@ stages: runTests: ${{ parameters.runTests }} runWindowsIntegration: ${{ parameters.runWindowsIntegration }} buildPackages: ${{ parameters.buildPackages }} + useACES: ${{ parameters.useACES }} diff --git a/tools/devops/automation/templates/tests-stage.yml b/tools/devops/automation/templates/tests-stage.yml index 41f6fec21ddd..25bf39e80654 100644 --- a/tools/devops/automation/templates/tests-stage.yml +++ b/tools/devops/automation/templates/tests-stage.yml @@ -125,6 +125,10 @@ parameters: type: boolean default: false +- name: useACES + type: boolean + default: false + stages: - template: ./build/linux-build-verification.yml @@ -234,6 +238,7 @@ stages: xqaCertPass: $(xqa--certificates--password) condition: ${{ parameters.runTests }} postPipeline: ${{ not(parameters.buildPackages) }} + useACES: ${{ parameters.useACES }} - template: ./tests/publish-results.yml parameters: @@ -282,6 +287,7 @@ stages: gitHubToken: $(Github.Token) xqaCertPass: $(xqa--certificates--password) pool: $(PRBuildPool) + useACES: ${{ parameters.useACES }} - ${{ each config in parameters.macTestsConfigurations }}: - template: ./mac/stage.yml diff --git a/tools/devops/automation/templates/tests/build.yml b/tools/devops/automation/templates/tests/build.yml index 1eacbac94c70..a844ccfaec87 100644 --- a/tools/devops/automation/templates/tests/build.yml +++ b/tools/devops/automation/templates/tests/build.yml @@ -208,6 +208,7 @@ steps: provisioning_script: $(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/build-provisioning.csx displayName: 'Provisionator dependencies' provisionatorChannel: $(PROVISIONATOR_CHANNEL) + retryCount: 3 - bash: | set -x diff --git a/tools/devops/automation/templates/tests/run-tests.yml b/tools/devops/automation/templates/tests/run-tests.yml index 483f3afbb30c..0272f5e2c4f7 100644 --- a/tools/devops/automation/templates/tests/run-tests.yml +++ b/tools/devops/automation/templates/tests/run-tests.yml @@ -32,7 +32,7 @@ parameters: - name: retryCount type: number - default: 3 + default: 0 steps: - bash: | diff --git a/tools/devops/automation/templates/tests/stage.yml b/tools/devops/automation/templates/tests/stage.yml index 7301307f3f1f..cbe4c4c73881 100644 --- a/tools/devops/automation/templates/tests/stage.yml +++ b/tools/devops/automation/templates/tests/stage.yml @@ -66,6 +66,10 @@ parameters: type: boolean default: false +- name: useACES + type: boolean + default: false + stages: - stage: ${{ parameters.stageName }} displayName: ${{ parameters.displayName }} @@ -89,17 +93,29 @@ stages: BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ] DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ] - pool: - name: ${{ parameters.testPool }} - demands: - - Agent.OS -equals Darwin - - macOS.Name -equals ${{ parameters.macOSName }} - - macOS.Architecture -equals arm64 - - XcodeChannel -equals ${{ parameters.XcodeChannel }} - - ${{ each demand in parameters.extraBotDemands }}: - - demand - workspace: - clean: all + # The ACES pool is a virtual-machine pool; expose VM_VENDOR so tests + # gated by TestRuntime.AssertNotVirtualMachine get ignored there. + ${{ if parameters.useACES }}: + VM_VENDOR: ACES + ${{ if parameters.useACES }}: + pool: + name: $(CIBuildPoolACES) + demands: + - ImageOverride -equals $(CIBuildPoolACESImage) + workspace: + clean: all + ${{ else }}: + pool: + name: ${{ parameters.testPool }} + demands: + - Agent.OS -equals Darwin + - macOS.Name -equals ${{ parameters.macOSName }} + - macOS.Architecture -equals arm64 + - XcodeChannel -equals ${{ parameters.XcodeChannel }} + - ${{ each demand in parameters.extraBotDemands }}: + - demand + workspace: + clean: all strategy: matrix: $[ stageDependencies.configure_build.configure.outputs['test_matrix.SIMULATOR_TEST_MATRIX'] ] condition: ne(stageDependencies.configure_build.configure.outputs['labels.skip_all_tests'], 'True') diff --git a/tools/devops/automation/templates/variables/common.yml b/tools/devops/automation/templates/variables/common.yml index c596f2b28938..db4b945f053a 100644 --- a/tools/devops/automation/templates/variables/common.yml +++ b/tools/devops/automation/templates/variables/common.yml @@ -45,6 +45,46 @@ variables: - name: CIBuildPoolUrl value: 'https://devdiv.visualstudio.com/_settings/agentpools?poolId=367&view=agents' +# ACES shared pool wiring. +# +# The infrastructure for routing build / api-diff / simulator-test jobs onto +# the ACES shared pool ($(CIBuildPoolACES), image $(CIBuildPoolACESImage)) +# instead of the traditional Redmond Mac build pools ($(CIBuildPool) / +# $(PRBuildPool)) is plumbed through the `useACES` template parameter, which +# flows from each entry pipeline down through main-stage.yml / +# build-stage.yml, api-diff-stage.yml and tests/stage.yml. When `useACES` is +# true, those job-level templates emit: +# pool: +# name: $(CIBuildPoolACES) +# demands: ImageOverride -equals $(CIBuildPoolACESImage) +# Otherwise they emit the original pool + Darwin / macOS.Name / XcodeChannel +# demands. +# +# The switch MUST be a literal in the entry pipeline. Azure Pipelines only +# resolves `${{ }}` expressions at template-expansion time, and variables +# brought in via `- template:` (like this file) are not visible at that +# point — they are runtime-only. So there is no working "single global +# variable" we can read here; the literal lives in each entry pipeline: +# +# CI (uses CIBuildPool / ACES): +# - build-pipeline.yml -> useACES: true +# - run-ci-api-diff.yml -> useACES: true +# - run-post-ci-build-tests.yml -> useACES: true +# PR (uses PRBuildPool): +# - build-pull-request.yml -> useACES: false +# - run-pr-api-diff.yml -> useACES: false +# - run-post-pr-build-tests.yml -> useACES: false +# +# Flip the literal in the three files on the side you want to move (e.g. when +# the ACES pool is unavailable, or when you need an Xcode/macOS beta that is +# only present on the traditional pools) and queue a new run. +- name: CIBuildPoolACES + value: 'AcesShared' +- name: CIBuildPoolACESUrl + value: 'https://dev.azure.com/devdiv/DevDiv/_settings/agentqueues?queueId=8259&view=jobs' +- name: CIBuildPoolACESImage + value: 'ACES_VM_SharedPool_Tahoe' + # override the default build revision - name: BUILD_REVISION value: azure-devops-$(Build.SourceVersion)