diff --git a/.vscode/mcp.json b/.vscode/mcp.json index 0273b732a393..7a73a41bfdf7 100644 --- a/.vscode/mcp.json +++ b/.vscode/mcp.json @@ -1,26 +1,2 @@ { - "inputs": [ - { - "type": "promptString", - "id": "github-key", - "password": true, // Encrypted at-rest - "description": "GitHub PAT" - } - ], - "servers": { - "github": { - "command": "docker", - "args": [ - "run", - "-i", - "--rm", - "-e", - "GITHUB_PERSONAL_ACCESS_TOKEN", - "ghcr.io/github/github-mcp-server" - ], - "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-key}" - } - } - } } \ No newline at end of file diff --git a/eng/pipelines/common/device-tests-steps.yml b/eng/pipelines/common/device-tests-steps.yml index 618c09e632be..3b06800b00d8 100644 --- a/eng/pipelines/common/device-tests-steps.yml +++ b/eng/pipelines/common/device-tests-steps.yml @@ -21,182 +21,163 @@ parameters: steps: - ################################################## - # Provision Machine # - ################################################## - - # Clean the machine for iOS builds that are running on physical machines - - ${{ if and(eq(parameters.platform, 'ios'), ne(parameters.poolName, 'Azure Pipelines')) }}: - - bash: | - chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh - chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-simulator-runtime.sh - $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh - displayName: 'Clean bot' - continueOnError: true - timeoutInMinutes: 60 - - # Enable KVM for Android builds on Linux - - ${{ if and(ne(parameters.buildType, 'buildOnly'), eq(parameters.platform, 'android')) }}: - - bash: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - displayName: Enable KVM - condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - - # Provision the various SDKs that are needed - - template: provision.yml - parameters: - skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} - skipJdk: ${{ ne(parameters.platform, 'android') }} - skipAndroidCommonSdks: ${{ ne(parameters.platform, 'android') }} - skipAndroidPlatformApis: ${{ or(eq(parameters.buildType, 'testOnly'), ne(parameters.platform, 'android')) }} - onlyAndroidPlatformDefaultApis: true - skipAndroidEmulatorImages: ${{ or(eq(parameters.buildType, 'buildOnly'), ne(parameters.platform, 'android')) }} - skipAndroidCreateAvds: true - androidEmulatorApiLevel: ${{ parameters.apiversion }} - provisionatorChannel: ${{ parameters.provisionatorChannel }} - ${{ if eq(parameters.skipProvisioning, false) }}: - skipProvisionator : false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - skipInternalFeeds: ${{ eq(parameters.buildType, 'testOnly') }} - - - ################################################## - # Provision .NET # - ################################################## - - # Install a local .NET SDK - - script: dotnet cake --target=dotnet --configuration="Release" --verbosity=diagnostic - displayName: 'Install .NET' - condition: and(succeeded(), ne('${{ parameters.skipDotNet }}', 'true')) - retryCountOnTaskFailure: 3 - env: - DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) - PRIVATE_BUILD: $(PrivateBuild) - - # Add the .NET SDK to the PATH - - pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)" - displayName: 'Add .NET to PATH' - condition: and(succeeded(), ne('${{ parameters.skipDotNet }}', 'true')) - - - ################################################## - # Prepare Build # - ################################################## - - # Do not prepare the .NET install if we are not going to build anything - - ${{ if ne(parameters.buildType, 'testOnly') }}: - - # Download the pre-build .NET MAUI workload and install it to the local .NET SDK - - ${{ if eq(parameters.useArtifacts, true) }}: - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Packages' - inputs: - artifactName: ${{ parameters.artifactName }} - itemPattern: ${{ parameters.artifactItemPattern }} - downloadPath: ${{ parameters.checkoutDirectory }}/artifacts - - - pwsh: Move-Item -Path artifacts\${{ parameters.artifactName }}\*.nupkg -Destination artifacts -Force - displayName: Move the downloaded artifacts - - - script: dotnet cake --target=dotnet-local-workloads --verbosity=diagnostic - displayName: 'Install .NET (Local Workloads)' - retryCountOnTaskFailure: 2 - workingDirectory: ${{ parameters.checkoutDirectory }} - env: - DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) - PRIVATE_BUILD: $(PrivateBuild) - - # Run the build for .NET MAUI on this machine - - ${{ else }}: - - - script: dotnet cake --target=dotnet-buildtasks --configuration="Release" - displayName: 'Build the MSBuild Tasks' - - - ################################################## - # Prepare Run # - ################################################## - - # If this job is a test-only job, download the pre-built artifacts from the build job - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build' - condition: and(succeeded(), eq('${{ parameters.buildType }}', 'testOnly')) - inputs: - artifactName: ${{ parameters.appArtifactName }} - targetPath: ${{ parameters.checkoutDirectory }}/artifacts/bin - - - ################################################## - # Build / Run # - ################################################## - - # First run the build if this is a build-only or build-and-test job - - script: dotnet cake eng/devices/${{ parameters.platform }}.cake --target="buildOnly" --project="${{ parameters.path }}" --binlog="$(LogDirectory)" --configuration="${{ parameters.deviceTestConfiguration }}" --targetFrameworkVersion="${{ parameters.targetFrameworkVersion }}" ${{ iif(eq(parameters.device, ''), '', format('--device="{0}"', parameters.device)) }} ${{ iif(eq(parameters.apiversion, ''), '', format('--apiversion="{0}"', parameters.apiversion)) }} --create="${{ ne(parameters.buildType, 'buildOnly') }}" --packageid "${{ parameters.packageid }}" --results="$(TestResultsDirectory)" --workloads="${{ iif(eq(parameters.skipDotNet, 'true'), 'global', 'local') }}" --verbosity=diagnostic ${{ parameters.cakeArgs }} - displayName: Execute Build - workingDirectory: ${{ parameters.checkoutDirectory }} - condition: and(succeeded(), ne('${{ parameters.buildType }}', 'testOnly')) +################################################## +# Provision Machine # +################################################## + +# Clean the machine for iOS builds that are running on physical machines +- ${{ if and(eq(parameters.platform, 'ios'), ne(parameters.poolName, 'Azure Pipelines')) }}: + - bash: | + chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh + chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-simulator-runtime.sh + $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh + displayName: 'Clean bot' + continueOnError: true + timeoutInMinutes: 60 + +# Enable KVM for Android builds on Linux +- ${{ if and(ne(parameters.buildType, 'buildOnly'), eq(parameters.platform, 'android')) }}: + - bash: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + displayName: Enable KVM + condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) + +# Provision the various SDKs that are needed +- template: provision.yml + parameters: + skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} + skipJdk: ${{ ne(parameters.platform, 'android') }} + skipAndroidCommonSdks: ${{ ne(parameters.platform, 'android') }} + skipAndroidPlatformApis: ${{ or(eq(parameters.buildType, 'testOnly'), ne(parameters.platform, 'android')) }} + onlyAndroidPlatformDefaultApis: true + skipAndroidEmulatorImages: ${{ or(eq(parameters.buildType, 'buildOnly'), ne(parameters.platform, 'android')) }} + skipAndroidCreateAvds: true + androidEmulatorApiLevel: ${{ parameters.apiversion }} + provisionatorChannel: ${{ parameters.provisionatorChannel }} + ${{ if eq(parameters.skipProvisioning, false) }}: + skipProvisionator: false + skipInternalFeeds: ${{ eq(parameters.buildType, 'testOnly') }} + +################################################## +# Provision .NET # +################################################## + +# Install a local .NET SDK +- script: dotnet cake --target=dotnet --configuration="Release" --verbosity=diagnostic + displayName: 'Install .NET' + condition: and(succeeded(), ne('${{ parameters.skipDotNet }}', 'true')) + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) + +# Add the .NET SDK to the PATH +- pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)" + displayName: 'Add .NET to PATH' + condition: and(succeeded(), ne('${{ parameters.skipDotNet }}', 'true')) + +################################################## +# Prepare Build # +################################################## + +# Do not prepare the .NET install if we are not going to build anything +- ${{ if ne(parameters.buildType, 'testOnly') }}: + + # Download the pre-build .NET MAUI workload and install it to the local .NET SDK + - ${{ if eq(parameters.useArtifacts, true) }}: + + - task: DownloadBuildArtifacts@0 + displayName: 'Download Packages' + inputs: + artifactName: ${{ parameters.artifactName }} + itemPattern: ${{ parameters.artifactItemPattern }} + downloadPath: ${{ parameters.checkoutDirectory }}/artifacts + + - pwsh: Move-Item -Path artifacts\${{ parameters.artifactName }}\*.nupkg -Destination artifacts -Force + displayName: Move the downloaded artifacts + + - script: dotnet cake --target=dotnet-local-workloads --verbosity=diagnostic + displayName: 'Install .NET (Local Workloads)' + retryCountOnTaskFailure: 2 + workingDirectory: ${{ parameters.checkoutDirectory }} + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) + + # Run the build for .NET MAUI on this machine + - ${{ else }}: + + - script: dotnet cake --target=dotnet-buildtasks --configuration="Release" + displayName: 'Build the MSBuild Tasks' + +################################################## +# Prepare Run # +################################################## + +# If this job is a test-only job, download the pre-built artifacts from the build job +- task: DownloadPipelineArtifact@2 + displayName: 'Download Build' + condition: and(succeeded(), eq('${{ parameters.buildType }}', 'testOnly')) + inputs: + artifactName: ${{ parameters.appArtifactName }} + targetPath: ${{ parameters.checkoutDirectory }}/artifacts/bin + +################################################## +# Build / Run # +################################################## + +# First run the build if this is a build-only or build-and-test job +- script: dotnet cake eng/devices/${{ parameters.platform }}.cake --target="buildOnly" --project="${{ parameters.path }}" --binlog="$(LogDirectory)" --configuration="${{ parameters.deviceTestConfiguration }}" --targetFrameworkVersion="${{ parameters.targetFrameworkVersion }}" ${{ iif(eq(parameters.device, ''), '', format('--device="{0}"', parameters.device)) }} ${{ iif(eq(parameters.apiversion, ''), '', format('--apiversion="{0}"', parameters.apiversion)) }} --create="${{ ne(parameters.buildType, 'buildOnly') }}" --packageid "${{ parameters.packageid }}" --results="$(TestResultsDirectory)" --workloads="${{ iif(eq(parameters.skipDotNet, 'true'), 'global', 'local') }}" --verbosity=diagnostic ${{ parameters.cakeArgs }} + displayName: Execute Build + workingDirectory: ${{ parameters.checkoutDirectory }} + condition: and(succeeded(), ne('${{ parameters.buildType }}', 'testOnly')) + retryCountOnTaskFailure: 1 + +# Then run the tests if this is a test-only or build-and-test job +- script: dotnet cake eng/devices/${{ parameters.platform }}.cake --target="testOnly" --project="${{ parameters.path }}" --binlog="$(LogDirectory)" --configuration="${{ parameters.deviceTestConfiguration }}" --targetFrameworkVersion="${{ parameters.targetFrameworkVersion }}" ${{ iif(eq(parameters.device, ''), '', format('--device="{0}"', parameters.device)) }} ${{ iif(eq(parameters.apiversion, ''), '', format('--apiversion="{0}"', parameters.apiversion)) }} --create="${{ ne(parameters.buildType, 'buildOnly') }}" --packageid "${{ parameters.packageid }}" --results="$(TestResultsDirectory)" --workloads="${{ iif(eq(parameters.skipDotNet, 'true'), 'global', 'local') }}" --verbosity=diagnostic ${{ parameters.cakeArgs }} + displayName: Execute Test Run + workingDirectory: ${{ parameters.checkoutDirectory }} + condition: and(succeeded(), ne('${{ parameters.buildType }}', 'buildOnly')) + ${{ if or(eq(parameters.buildType, 'windows'), eq(parameters.platform, 'android')) }}: retryCountOnTaskFailure: 1 - # Then run the tests if this is a test-only or build-and-test job - - script: dotnet cake eng/devices/${{ parameters.platform }}.cake --target="testOnly" --project="${{ parameters.path }}" --binlog="$(LogDirectory)" --configuration="${{ parameters.deviceTestConfiguration }}" --targetFrameworkVersion="${{ parameters.targetFrameworkVersion }}" ${{ iif(eq(parameters.device, ''), '', format('--device="{0}"', parameters.device)) }} ${{ iif(eq(parameters.apiversion, ''), '', format('--apiversion="{0}"', parameters.apiversion)) }} --create="${{ ne(parameters.buildType, 'buildOnly') }}" --packageid "${{ parameters.packageid }}" --results="$(TestResultsDirectory)" --workloads="${{ iif(eq(parameters.skipDotNet, 'true'), 'global', 'local') }}" --verbosity=diagnostic ${{ parameters.cakeArgs }} - displayName: Execute Test Run - workingDirectory: ${{ parameters.checkoutDirectory }} - condition: and(succeeded(), ne('${{ parameters.buildType }}', 'buildOnly')) - ${{ if or(eq(parameters.buildType, 'windows'), eq(parameters.platform, 'android')) }}: - retryCountOnTaskFailure: 1 - - - ################################################## - # Publish # - ################################################## - - # Cleanup and create simulator logs for iOS builds - - ${{ if eq(parameters.platform, 'ios')}}: - - script: dotnet cake --target=Cleanup -Script eng/devices/${{ parameters.platform }}.cake ---results="$(TestResultsDirectory)" ${{ parameters.cakeArgs }} - displayName: Cleanup and Create Simulator Logs - condition: always() - continueOnError: true - - # Publish the artifacts directory if this is a build-only job - - ${{ if eq(parameters.buildType, 'buildOnly') }}: - - publish: ${{ parameters.checkoutDirectory }}/artifacts/bin - displayName: Publish Succeeded Artifacts Directory - condition: succeeded() - artifact: ${{ parameters.appArtifactName }} - - publish: ${{ parameters.checkoutDirectory }}/artifacts/bin - displayName: Publish Failed Artifacts Directory - condition: not(succeeded()) - artifact: ${{ parameters.appArtifactName }}_failed_$(System.JobAttempt) - - # Publish the test results - - ${{ if ne(parameters.buildType, 'buildOnly') }}: - - task: PublishTestResults@2 - displayName: Publish the $(Agent.JobName) test results - condition: always() - inputs: - testResultsFormat: xUnit - testResultsFiles: '$(TestResultsDirectory)/**/TestResults*(-*).xml' - testRunTitle: '$(Agent.JobName) (attempt $(System.JobAttempt))' +################################################## +# Publish # +################################################## - # Publish the job artifacts - - task: PublishBuildArtifacts@1 - displayName: Publish Logs +# Cleanup and create simulator logs for iOS builds +- ${{ if eq(parameters.platform, 'ios')}}: + - script: dotnet cake --target=Cleanup -Script eng/devices/${{ parameters.platform }}.cake ---results="$(TestResultsDirectory)" ${{ parameters.cakeArgs }} + displayName: Cleanup and Create Simulator Logs + condition: always() + continueOnError: true + +# Publish the artifacts directory if this is a build-only job +- ${{ if eq(parameters.buildType, 'buildOnly') }}: + - publish: ${{ parameters.checkoutDirectory }}/artifacts/bin + displayName: Publish Succeeded Artifacts Directory + condition: succeeded() + artifact: ${{ parameters.appArtifactName }} + - publish: ${{ parameters.checkoutDirectory }}/artifacts/bin + displayName: Publish Failed Artifacts Directory + condition: not(succeeded()) + artifact: ${{ parameters.appArtifactName }}_failed_$(System.JobAttempt) + +# Publish the test results +- ${{ if ne(parameters.buildType, 'buildOnly') }}: + - task: PublishTestResults@2 + displayName: Publish the $(Agent.JobName) test results condition: always() inputs: - artifactName: '$(Agent.JobName) (attempt $(System.JobAttempt))' - - - ################################################## - # Reboot # - ################################################## - - # Reboot the physical macs after running iOS tests - - ${{ if and(ne(parameters.buildType, 'buildOnly'), eq(parameters.platform, 'ios')) }}: - - ${{ if and(ne(parameters.poolName, 'Azure Pipelines'), eq(variables['System.TeamProject'], 'devdiv') ) }}: - # This must always be placed as the last step in the job - - template: agent-rebooter/mac.v1.yml@yaml-templates - parameters: - AgentPoolAccessToken: ${{ parameters.agentPoolAccessToken }} + testResultsFormat: xUnit + testResultsFiles: '$(TestResultsDirectory)/**/TestResults*(-*).xml' + testRunTitle: '$(Agent.JobName) (attempt $(System.JobAttempt))' + +# Publish the job artifacts +- task: PublishBuildArtifacts@1 + displayName: Publish Logs + condition: always() + inputs: + artifactName: '$(Agent.JobName) (attempt $(System.JobAttempt))' diff --git a/eng/pipelines/common/pack.yml b/eng/pipelines/common/pack.yml index 44db61145f1b..fcc933851dbe 100644 --- a/eng/pipelines/common/pack.yml +++ b/eng/pipelines/common/pack.yml @@ -30,7 +30,7 @@ parameters: - name: nugetFolder type: string default: 'artifacts' - + - name: prepareSteps type: stepList default: [] @@ -39,10 +39,6 @@ parameters: type: stepList default: [] -- name: gitHubToken - type: string - default: $(github--pat--vs-mobiletools-engineering-service2) - - name: checkoutDirectory type: string default: $(System.DefaultWorkingDirectory) @@ -57,8 +53,9 @@ parameters: - name: buildConfiguration type: string - default: - + default: + + - name: runAsPublic type: boolean default: false diff --git a/eng/pipelines/common/provision.yml b/eng/pipelines/common/provision.yml index 5f41bec602d9..de753092dab5 100644 --- a/eng/pipelines/common/provision.yml +++ b/eng/pipelines/common/provision.yml @@ -16,12 +16,15 @@ parameters: # Provisionator / Xcode skipProvisionator: true checkoutDirectory: $(System.DefaultWorkingDirectory) - provisionatorPath: $(provisionator.path) provisionatorXCodePath: $(provisionator.xcode) provisionatorChannel: 'latest' provisionatorExtraArguments: $(provisionator.extraArguments) - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - certPass: $(pass--components-mac-ios-certificate-p12) + provisionatorUri: $(provisionator-uri) + gitHubToken: $(provisionator--github--pat) + certPass: $(maui-cert-password) # This lives on MAUI variable group + certName: 'MauiCert.p12' + openSslArgs: '-legacy' + provisioningProfileName: 'MauiProvisioningProfile.mobileprovision' # Enabling internal runtimes / feeds federatedServiceConnection: 'dotnetbuilds-internal-read' outputVariableName: 'dotnetbuilds-internal-container-read-token' @@ -31,173 +34,177 @@ parameters: steps: - ################################################## - # Provisioning macOS # - ################################################## +################################################## +# Provisioning macOS # +################################################## - # Provisioning macOS - Agent cleanser - - ${{ if ne(parameters.skipProvisionator, true) }}: - - template: agent-cleanser/v1.yml@yaml-templates - parameters: - condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) - UninstallMono: false - UninstallXamarinMac: true - CleanseAgentToolsDotNet: true - SelfHealPowerShell: false - - # Provisioning macOS - Xcode - - ${{ if ne(parameters.skipXcode, 'true') }}: - - ${{ if ne(parameters.skipProvisionator, true) }}: - - task: xamops.azdevex.provisionator-task.provisionator@3 - condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) - displayName: 'Provision Xcode' - inputs: - provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorXCodePath }} - provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }} - github_token: ${{ parameters.gitHubToken }} - env: - PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }} - AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }} - - script: | - echo Remove old Xamarin Settings - rm -f ~/Library/Preferences/Xamarin/Settings.plist - echo Mac OS version: - sw_vers -productVersion - echo - echo Installed Xcode versions: - ls /Applications | grep 'Xcode' - echo - echo currently selected xcode: - xcrun xcode-select --print-path - echo - echo selecting latest xcode... - sudo xcode-select -s /Applications/Xcode_$(REQUIRED_XCODE).app - xcrun xcode-select --print-path - xcodebuild -version - sudo xcodebuild -license accept - sudo xcodebuild -downloadPlatform iOS - sudo xcodebuild -runFirstLaunch - displayName: Select Xcode Version +# Provisioning macOS - Agent cleanser +- ${{ if ne(parameters.skipProvisionator, true) }}: + - template: agent-cleanser/v1.yml@yaml-templates + parameters: condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) - timeoutInMinutes: 30 + UninstallMono: false + UninstallXamarinMac: true + CleanseAgentToolsDotNet: true + SelfHealPowerShell: false - # Provision Additional Software +# Provisioning macOS - Xcode +- ${{ if ne(parameters.skipXcode, 'true') }}: - ${{ if ne(parameters.skipProvisionator, true) }}: - # Prepare macOS - task: xamops.azdevex.provisionator-task.provisionator@3 - displayName: 'Provision Additional Software' condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) - continueOnError: true + displayName: 'Provision Xcode' inputs: - provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorPath }} + provisionator_uri: ${{ parameters.provisionatorUri }} + provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorXCodePath }} provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }} github_token: ${{ parameters.gitHubToken }} env: PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }} - AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }} + - script: | + echo Remove old Xamarin Settings + rm -f ~/Library/Preferences/Xamarin/Settings.plist + rm -f ~/Library/Preferences/maui/Settings.plist + echo Mac OS version: + sw_vers -productVersion + echo + echo Installed Xcode versions: + ls /Applications | grep 'Xcode' + echo + echo currently selected xcode: + xcrun xcode-select --print-path + echo + echo selecting latest xcode... + sudo xcode-select -s /Applications/Xcode_$(REQUIRED_XCODE).app + xcrun xcode-select --print-path + xcodebuild -version + sudo xcodebuild -license accept + sudo xcodebuild -downloadPlatform iOS + sudo xcodebuild -runFirstLaunch + displayName: Select Xcode Version + condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) + timeoutInMinutes: 30 + +# Provision Additional Software +- ${{ if or(eq(variables['System.TeamProject'], 'DevDiv'), ne(parameters.skipProvisionator, true)) }}: + # Prepare macOS + - task: InstallAppleCertificate@2 + condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) + displayName: 'Install Apple Certificate ${{ parameters.certName }}' + continueOnError: true + inputs: + certSecureFile: '${{ parameters.certName }}' + certPwd: ${{ parameters.certPass }} + keychain: 'temp' + opensslPkcsArgs: '${{ parameters.openSslArgs }}' + + - task: InstallAppleProvisioningProfile@1 + condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) + displayName: 'Install Apple Provisioning Profile ${{ parameters.provisioningProfileName }}' + continueOnError: true + inputs: + provisioningProfileLocation: 'secureFiles' + provProfileSecureFile: '${{ parameters.provisioningProfileName }}' ################################################## # Provisioning Windows # ################################################## # Provisioning Windows - Set dump file location +- pwsh: | + $errorPath = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" + New-ItemProperty -Path $errorPath -Name DumpFolder -PropertyType String -Value "$(Build.ArtifactStagingDirectory)/crash-dumps" -Force + New-ItemProperty -Path $errorPath -Name DumpType -PropertyType DWORD -Value 2 -Force + displayName: 'Set dump file location' + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + continueOnError: true + timeoutInMinutes: 5 + +################################################## +# Provisioning .NET # +################################################## + +# Provisioning .NET - .NET SDK +- task: UseDotNet@2 + displayName: 'Use .NET SDK $(DOTNET_VERSION)' + inputs: + packageType: sdk + version: $(DOTNET_VERSION) + includePreviewVersions: true + +# Provisioning .NET - Clear all NuGet caches +- ${{ if eq(parameters.clearCaches, 'true') }}: + - pwsh: dotnet nuget locals all --clear + displayName: 'Clear all NuGet caches' + +# Provisioning .NET - .NET tools +- pwsh: | + dotnet tool restore + displayName: 'Restore .NET Tools' + +################################################## +# Provisioning Android # +################################################## + +# Provisioning Android - JDK +- ${{ if ne(parameters.skipJdk, 'true') }}: + - pwsh: dotnet build -t:ProvisionJdk -bl:"$(LogDirectory)/provision-jdk.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed + displayName: 'Provision JDK' + condition: succeeded() + +# Provisioning Android - Android SDK common packages (eg: cmdline-tools, emulator, platform-tools, build-tools) +- ${{ if ne(parameters.skipAndroidCommonSdks, 'true') }}: + - pwsh: dotnet build -t:ProvisionAndroidSdkCommonPackages -bl:"$(LogDirectory)/provision-androidsdk-common.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed + displayName: 'Provision Android SDK - Common Packages' + condition: succeeded() + +# Provisioning Android - Android environment variables +- ${{ if ne(parameters.skipAndroidCommonSdks, 'true') }}: - pwsh: | - $errorPath = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" - New-ItemProperty -Path $errorPath -Name DumpFolder -PropertyType String -Value "$(Build.ArtifactStagingDirectory)/crash-dumps" -Force - New-ItemProperty -Path $errorPath -Name DumpType -PropertyType DWORD -Value 2 -Force - displayName: 'Set dump file location' - condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) - continueOnError: true - timeoutInMinutes: 5 - - - ################################################## - # Provisioning .NET # - ################################################## - - # Provisioning .NET - .NET SDK - - task: UseDotNet@2 - displayName: 'Use .NET SDK $(DOTNET_VERSION)' - inputs: - packageType: sdk - version: $(DOTNET_VERSION) - includePreviewVersions: true - - # Provisioning .NET - Clear all NuGet caches - - ${{ if eq(parameters.clearCaches, 'true') }}: - - pwsh: dotnet nuget locals all --clear - displayName: 'Clear all NuGet caches' - - # Provisioning .NET - .NET tools - - pwsh: | - dotnet tool restore - displayName: 'Restore .NET Tools' - - - ################################################## - # Provisioning Android # - ################################################## - - # Provisioning Android - JDK - - ${{ if ne(parameters.skipJdk, 'true') }}: - - pwsh: dotnet build -t:ProvisionJdk -bl:"$(LogDirectory)/provision-jdk.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed - displayName: 'Provision JDK' - condition: succeeded() - - # Provisioning Android - Android SDK common packages (eg: cmdline-tools, emulator, platform-tools, build-tools) - - ${{ if ne(parameters.skipAndroidCommonSdks, 'true') }}: - - pwsh: dotnet build -t:ProvisionAndroidSdkCommonPackages -bl:"$(LogDirectory)/provision-androidsdk-common.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed - displayName: 'Provision Android SDK - Common Packages' - condition: succeeded() - - # Provisioning Android - Android environment variables - - ${{ if ne(parameters.skipAndroidCommonSdks, 'true') }}: - - pwsh: | - echo "Setting ANDROID_SDK_ROOT and ANDROID_HOME..." - $jsonOutput = & dotnet android sdk info --format=Json | ConvertFrom-Json - $preferredSdk = $jsonOutput.SdkInfo.Path - echo "##vso[task.setvariable variable=ANDROID_SDK_ROOT]$preferredSdk" - echo "ANDROID_SDK_ROOT set to '$preferredSdk'" - echo "##vso[task.setvariable variable=ANDROID_HOME]$preferredSdk" - echo "ANDROID_HOME set to '$preferredSdk'" - displayName: 'Provision Android SDK - Environment variables' - condition: succeeded() - - # Provisioning Android - Android SDK platform APIs (eg: platforms;android-29, platforms;android-30) - - ${{ if ne(parameters.skipAndroidPlatformApis, 'true') }}: - - pwsh: dotnet build -t:ProvisionAndroidSdkPlatformApiPackages -p:AndroidSdkProvisionDefaultApiLevelsOnly="$Env:AndroidSdkProvisionDefaultApiLevelsOnly" -bl:"$(LogDirectory)/provision-androidsdk-platform-apis.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed - displayName: 'Provision Android SDK - Platform APIs' - condition: succeeded() - env: - AndroidSdkProvisionDefaultApiLevelsOnly: ${{ parameters.onlyAndroidPlatformDefaultApis }} - - # Provisioning Android - Emulator images (eg: system-images;android-34;google_apis;aarch64) - - ${{ if ne(parameters.skipAndroidEmulatorImages, 'true') }}: - - pwsh: dotnet build -t:ProvisionAndroidSdkEmulatorImagePackages -p:AndroidSdkProvisionApiLevel="$Env:AndroidSdkProvisionApiLevel" -bl:"$(LogDirectory)/provision-androidsdk-emulator-images.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed - displayName: 'Provision Android SDK - Emulator Images' - condition: succeeded() - env: - AndroidSdkProvisionApiLevel: ${{ parameters.androidEmulatorApiLevel }} - - # Provisioning Android - Android AVDs (actual emulator virtual devices) - - ${{ if ne(parameters.skipAndroidCreateAvds, 'true') }}: - - pwsh: dotnet build -t:ProvisionAndroidSdkAvdCreateAvds -p:AndroidSdkProvisionApiLevel="$Env:AndroidSdkProvisionApiLevel" -bl:"$(LogDirectory)/provision-androidsdk-create-avds.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed - displayName: 'Provision Android SDK - Create AVDs' - condition: succeeded() - env: - AndroidSdkProvisionApiLevel: ${{ parameters.androidEmulatorApiLevel }} - - - ################################################## - # Provisioning Feeds # - ################################################## - - - ${{ if and(eq(variables['System.TeamProject'], 'devdiv'), ne(parameters.skipInternalFeeds, 'true')) }}: - - template: ../../common/templates-official/steps/enable-internal-sources.yml - - - template: ../../common/templates-official/steps/enable-internal-runtimes.yml - parameters: - federatedServiceConnection: ${{ parameters.federatedServiceConnection }} - outputVariableName: ${{ parameters.outputVariableName }} - expiryInHours: ${{ parameters.expiryInHours }} - base64Encode: ${{ parameters.base64Encode }} + echo "Setting ANDROID_SDK_ROOT and ANDROID_HOME..." + $jsonOutput = & dotnet android sdk info --format=Json | ConvertFrom-Json + $preferredSdk = $jsonOutput.SdkInfo.Path + echo "##vso[task.setvariable variable=ANDROID_SDK_ROOT]$preferredSdk" + echo "ANDROID_SDK_ROOT set to '$preferredSdk'" + echo "##vso[task.setvariable variable=ANDROID_HOME]$preferredSdk" + echo "ANDROID_HOME set to '$preferredSdk'" + displayName: 'Provision Android SDK - Environment variables' + condition: succeeded() + +# Provisioning Android - Android SDK platform APIs (eg: platforms;android-29, platforms;android-30) +- ${{ if ne(parameters.skipAndroidPlatformApis, 'true') }}: + - pwsh: dotnet build -t:ProvisionAndroidSdkPlatformApiPackages -p:AndroidSdkProvisionDefaultApiLevelsOnly="$Env:AndroidSdkProvisionDefaultApiLevelsOnly" -bl:"$(LogDirectory)/provision-androidsdk-platform-apis.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed + displayName: 'Provision Android SDK - Platform APIs' + condition: succeeded() + env: + AndroidSdkProvisionDefaultApiLevelsOnly: ${{ parameters.onlyAndroidPlatformDefaultApis }} + +# Provisioning Android - Emulator images (eg: system-images;android-34;google_apis;aarch64) +- ${{ if ne(parameters.skipAndroidEmulatorImages, 'true') }}: + - pwsh: dotnet build -t:ProvisionAndroidSdkEmulatorImagePackages -p:AndroidSdkProvisionApiLevel="$Env:AndroidSdkProvisionApiLevel" -bl:"$(LogDirectory)/provision-androidsdk-emulator-images.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed + displayName: 'Provision Android SDK - Emulator Images' + condition: succeeded() + env: + AndroidSdkProvisionApiLevel: ${{ parameters.androidEmulatorApiLevel }} + +# Provisioning Android - Android AVDs (actual emulator virtual devices) +- ${{ if ne(parameters.skipAndroidCreateAvds, 'true') }}: + - pwsh: dotnet build -t:ProvisionAndroidSdkAvdCreateAvds -p:AndroidSdkProvisionApiLevel="$Env:AndroidSdkProvisionApiLevel" -bl:"$(LogDirectory)/provision-androidsdk-create-avds.binlog" ./src/Provisioning/Provisioning.csproj -v:detailed + displayName: 'Provision Android SDK - Create AVDs' + condition: succeeded() + env: + AndroidSdkProvisionApiLevel: ${{ parameters.androidEmulatorApiLevel }} + +################################################## +# Provisioning Feeds # +################################################## + +- ${{ if and(eq(variables['System.TeamProject'], 'devdiv'), ne(parameters.skipInternalFeeds, 'true')) }}: + - template: ../../common/templates-official/steps/enable-internal-sources.yml + + - template: ../../common/templates-official/steps/enable-internal-runtimes.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} diff --git a/eng/pipelines/common/ui-tests-build-sample.yml b/eng/pipelines/common/ui-tests-build-sample.yml index 33053c23cbbd..b7d8712b6818 100644 --- a/eng/pipelines/common/ui-tests-build-sample.yml +++ b/eng/pipelines/common/ui-tests-build-sample.yml @@ -8,90 +8,89 @@ parameters: provisionatorChannel: 'latest' agentPoolAccessToken: '' skipProvisioning: true - configuration : "Release" + configuration: "Release" testFilter: '' runtimeVariant: 'Mono' steps: - - ${{ if eq(parameters.platform, 'ios')}}: - - bash: | - chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh - $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh - displayName: 'Clean bot' - continueOnError: true - timeoutInMinutes: 60 - - - template: provision.yml - parameters: - # FIXME: 'Build the MSBuild Tasks' step fails for net9.0-android35 without API 35 - skipAndroidSdks: false - skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} - provisionatorChannel: ${{ parameters.provisionatorChannel }} - ${{ if parameters.skipProvisioning }}: - skipProvisionator: true - ${{ else }}: - skipProvisionator: false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - - - task: PowerShell@2 - condition: ne('${{ parameters.platform }}' , 'windows') - inputs: - targetType: 'inline' - script: | - defaults write -g NSAutomaticCapitalizationEnabled -bool false - defaults write -g NSAutomaticTextCompletionEnabled -bool false - defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false - displayName: "Modify defaults" +- ${{ if eq(parameters.platform, 'ios')}}: + - bash: | + chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh + $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh + displayName: 'Clean bot' continueOnError: true + timeoutInMinutes: 60 - - pwsh: ./build.ps1 --target=dotnet --configuration="${{ parameters.configuration }}" --verbosity=diagnostic - displayName: 'Install .NET' - retryCountOnTaskFailure: 2 - env: - DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) - PRIVATE_BUILD: $(PrivateBuild) +- template: provision.yml + parameters: + # FIXME: 'Build the MSBuild Tasks' step fails for net9.0-android35 without API 35 + skipAndroidSdks: false + skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} + provisionatorChannel: ${{ parameters.provisionatorChannel }} + ${{ if parameters.skipProvisioning }}: + skipProvisionator: true + ${{ else }}: + skipProvisionator: false - - pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)" - displayName: 'Add .NET to PATH' +- task: PowerShell@2 + condition: ne('${{ parameters.platform }}' , 'windows') + inputs: + targetType: 'inline' + script: | + defaults write -g NSAutomaticCapitalizationEnabled -bool false + defaults write -g NSAutomaticTextCompletionEnabled -bool false + defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false + displayName: "Modify defaults" + continueOnError: true - - pwsh: | - Get-Content $PSCommandPath - ./build.ps1 --target=uitests-apphost --configuration="${{ parameters.configuration }}" --${{ parameters.platform }} --verbosity=diagnostic --usenuget=false --runtimevariant="${{ parameters.runtimeVariant }}" - displayName: 'Build the samples' +- pwsh: ./build.ps1 --target=dotnet --configuration="${{ parameters.configuration }}" --verbosity=diagnostic + displayName: 'Install .NET' + retryCountOnTaskFailure: 2 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) - - bash: | - if [ -f "$HOME/Library/Logs/CoreSimulator/*" ]; then rm -r $HOME/Library/Logs/CoreSimulator/*; fi - if [ -f "$HOME/Library/Logs/DiagnosticReports/*" ]; then rm -r $HOME/Library/Logs/DiagnosticReports/*; fi - displayName: Delete Old Simulator Logs - condition: ${{ eq(parameters.platform, 'ios') }} - continueOnError: true +- pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)" + displayName: 'Add .NET to PATH' + +- pwsh: | + Get-Content $PSCommandPath + ./build.ps1 --target=uitests-apphost --configuration="${{ parameters.configuration }}" --${{ parameters.platform }} --verbosity=diagnostic --usenuget=false --runtimevariant="${{ parameters.runtimeVariant }}" + displayName: 'Build the samples' + +- bash: | + if [ -f "$HOME/Library/Logs/CoreSimulator/*" ]; then rm -r $HOME/Library/Logs/CoreSimulator/*; fi + if [ -f "$HOME/Library/Logs/DiagnosticReports/*" ]; then rm -r $HOME/Library/Logs/DiagnosticReports/*; fi + displayName: Delete Old Simulator Logs + condition: ${{ eq(parameters.platform, 'ios') }} + continueOnError: true + +- publish: $(System.DefaultWorkingDirectory)/artifacts/bin + condition: and(ne('${{ parameters.platform }}' , 'windows'), ne('${{ parameters.runtimeVariant }}' , 'NativeAOT'), succeeded()) + artifact: ui-tests-samples - - publish: $(System.DefaultWorkingDirectory)/artifacts/bin - condition: and(ne('${{ parameters.platform }}' , 'windows'), ne('${{ parameters.runtimeVariant }}' , 'NativeAOT'), succeeded()) - artifact: ui-tests-samples - - - publish: $(System.DefaultWorkingDirectory)/artifacts/bin - condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'NativeAOT'), succeeded()) - artifact: ui-tests-samples-nativeaot +- publish: $(System.DefaultWorkingDirectory)/artifacts/bin + condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'NativeAOT'), succeeded()) + artifact: ui-tests-samples-nativeaot - - publish: $(System.DefaultWorkingDirectory)/artifacts/bin - condition: and(eq('${{ parameters.platform }}' , 'windows'), succeeded()) - artifact: ui-tests-samples-windows +- publish: $(System.DefaultWorkingDirectory)/artifacts/bin + condition: and(eq('${{ parameters.platform }}' , 'windows'), succeeded()) + artifact: ui-tests-samples-windows - - publish: $(System.DefaultWorkingDirectory)/artifacts/bin - condition: and(ne('${{ parameters.platform }}' , 'windows'), ne('${{ parameters.runtimeVariant }}' , 'NativeAOT'), failed()) - artifact: ui-tests-samples_failed_$(System.JobAttempt) +- publish: $(System.DefaultWorkingDirectory)/artifacts/bin + condition: and(ne('${{ parameters.platform }}' , 'windows'), ne('${{ parameters.runtimeVariant }}' , 'NativeAOT'), failed()) + artifact: ui-tests-samples_failed_$(System.JobAttempt) - - publish: $(System.DefaultWorkingDirectory)/artifacts/bin - condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'NativeAOT'), failed()) - artifact: ui-tests-samples-nativeaot_failed_$(System.JobAttempt) +- publish: $(System.DefaultWorkingDirectory)/artifacts/bin + condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'NativeAOT'), failed()) + artifact: ui-tests-samples-nativeaot_failed_$(System.JobAttempt) - - publish: $(System.DefaultWorkingDirectory)/artifacts/bin - condition: and(eq('${{ parameters.platform }}' , 'windows'), failed()) - artifact: ui-tests-samples-windows_failed_$(System.JobAttempt) +- publish: $(System.DefaultWorkingDirectory)/artifacts/bin + condition: and(eq('${{ parameters.platform }}' , 'windows'), failed()) + artifact: ui-tests-samples-windows_failed_$(System.JobAttempt) - - task: PublishBuildArtifacts@1 - displayName: Publish Artifacts - condition: always() - inputs: - artifactName: '$(Agent.JobName) (attempt $(System.JobAttempt))' +- task: PublishBuildArtifacts@1 + displayName: Publish Artifacts + condition: always() + inputs: + artifactName: '$(Agent.JobName) (attempt $(System.JobAttempt))' diff --git a/eng/pipelines/common/ui-tests-steps.yml b/eng/pipelines/common/ui-tests-steps.yml index 7fca26aeff51..893f03d96a46 100644 --- a/eng/pipelines/common/ui-tests-steps.yml +++ b/eng/pipelines/common/ui-tests-steps.yml @@ -7,179 +7,173 @@ parameters: version: '' #the iOS version' provisionatorChannel: 'latest' agentPoolAccessToken: '' - configuration : "Release" - runtimeVariant : "Mono" + configuration: "Release" + runtimeVariant: "Mono" testFilter: '' testConfigurationArgs: '' skipProvisioning: true steps: - - task: DownloadPipelineArtifact@2 - condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'Mono')) - inputs: - artifact: ui-tests-samples - - - task: DownloadPipelineArtifact@2 - condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'NativeAOT')) - inputs: - artifact: ui-tests-samples-nativeaot - - - task: DownloadPipelineArtifact@2 - condition: eq('${{ parameters.platform }}' , 'windows') - inputs: - artifact: ui-tests-samples-windows - - - ${{ if eq(parameters.platform, 'ios')}}: - - bash: | - chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh - $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh - displayName: 'Clean bot' - continueOnError: true - timeoutInMinutes: 60 - - # Enable KVM for Android builds on Linux - - ${{ if and(ne(parameters.buildType, 'buildOnly'), eq(parameters.platform, 'android')) }}: - - bash: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - displayName: Enable KVM - condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - - - ${{ if eq(parameters.platform, 'catalyst')}}: - - bash: | - chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/disable-notification-center.sh - $(System.DefaultWorkingDirectory)/eng/scripts/disable-notification-center.sh - displayName: 'Disable Notification Center' - continueOnError: true - timeoutInMinutes: 60 - - - template: provision.yml - parameters: - skipProvisioning: true - skipJdk: ${{ ne(parameters.platform, 'android') }} - skipAndroidCommonSdks: ${{ ne(parameters.platform, 'android') }} - skipAndroidPlatformApis: true - onlyAndroidPlatformDefaultApis: true - skipAndroidEmulatorImages: ${{ ne(parameters.platform, 'android') }} - skipAndroidCreateAvds: true - androidEmulatorApiLevel: ${{ parameters.version }} - skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} - provisionatorChannel: ${{ parameters.provisionatorChannel }} - ${{ if parameters.skipProvisioning }}: - skipProvisionator: true - ${{ else }}: - skipProvisionator: false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - - - task: PowerShell@2 - condition: and(ne('${{ parameters.platform }}', 'windows'), ne('${{ parameters.platform }}', 'android')) - inputs: - targetType: 'inline' - script: | - defaults write -g NSAutomaticCapitalizationEnabled -bool false - defaults write -g NSAutomaticTextCompletionEnabled -bool false - defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false - displayName: "Modify defaults" +- task: DownloadPipelineArtifact@2 + condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'Mono')) + inputs: + artifact: ui-tests-samples + +- task: DownloadPipelineArtifact@2 + condition: and(ne('${{ parameters.platform }}' , 'windows'), eq('${{ parameters.runtimeVariant }}' , 'NativeAOT')) + inputs: + artifact: ui-tests-samples-nativeaot + +- task: DownloadPipelineArtifact@2 + condition: eq('${{ parameters.platform }}' , 'windows') + inputs: + artifact: ui-tests-samples-windows + +- ${{ if eq(parameters.platform, 'ios')}}: + - bash: | + chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh + $(System.DefaultWorkingDirectory)/eng/scripts/clean-bot.sh + displayName: 'Clean bot' continueOnError: true - - - pwsh: ./build.ps1 --target=dotnet --configuration="${{ parameters.configuration }}" --verbosity=diagnostic - displayName: 'Install .NET' - retryCountOnTaskFailure: 2 - env: - DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) - PRIVATE_BUILD: $(PrivateBuild) - - - pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)" - displayName: 'Add .NET to PATH' - - # AzDO hosted agents default to 1024x768; set something bigger for Windows UI tests - - task: ScreenResolutionUtility@1 - condition: eq('${{ parameters.platform }}' , 'windows') - inputs: - displaySettings: 'specific' - width: '1920' - height: '1080' - displayName: "Set screen resolution" - - - task: UseNode@1 - inputs: - version: "20.3.1" - displayName: "Install node" - - - pwsh: | - $skipAppiumDoctor = if ($IsMacOS -or $IsLinux) { "true" } else { "false" } - dotnet build ./src/Provisioning/Provisioning.csproj -t:ProvisionAppium -p:SkipAppiumDoctor="$skipAppiumDoctor" -bl:"$(LogDirectory)/provision-appium.binlog" - displayName: "Install Appium" - continueOnError: false - retryCountOnTaskFailure: 2 - timeoutInMinutes: 10 - env: - APPIUM_HOME: $(APPIUM_HOME) - - - pwsh: | - Get-Content $PSCommandPath - $command = "./build.ps1 -Script eng/devices/${{ parameters.platform }}.cake --target=uitest --project=""${{ parameters.path }}""" - $command += " --appproject=""${{ parameters.app }}"" --device=""${{ parameters.device }}"" --apiversion=""${{ parameters.version }}"" --configuration=""${{ parameters.configuration }}""" - $command += " --runtimevariant=""${{ parameters.runtimeVariant }}""" - $command += " --results=""$(TestResultsDirectory)"" --binlog=""$(LogDirectory)"" ${{ parameters.cakeArgs }} --verbosity=diagnostic" - - $testFilter = "" - $testConfigrationArgs = "${{ parameters.testConfigurationArgs }}" - - "${{ parameters.testFilter }}".Split(",") | ForEach { - $testFilter += "TestCategory=" + $_ + "|" - } - - $testFilter = $testFilter.TrimEnd("|") - - # Cake does not allow empty parameters, so check if our filter is empty before adding it - if ($testConfigrationArgs) { - $command += " --TEST_CONFIGURATION_ARGS=""$testConfigrationArgs""" - } - if ($testFilter) { - $command += " --test-filter ""$testFilter""" - } - - Write-Host "Running command: $command" - - Invoke-Expression $command - displayName: $(Agent.JobName) - ${{ if ne(parameters.platform, 'android')}}: - retryCountOnTaskFailure: 1 - env: - APPIUM_HOME: $(APPIUM_HOME) + timeoutInMinutes: 60 +# Enable KVM for Android builds on Linux +- ${{ if and(ne(parameters.buildType, 'buildOnly'), eq(parameters.platform, 'android')) }}: - bash: | - cat ${BASH_SOURCE[0]} - pwsh ./build.ps1 --target=Cleanup -Script eng/devices/${{ parameters.platform }}.cake ---results="$(TestResultsDirectory)" ${{ parameters.cakeArgs }} - displayName: Cleanup and Create Simulator Logs if Test Run Failed To - condition: ${{ eq(parameters.platform, 'ios') }} - continueOnError: true + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + displayName: Enable KVM + condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - - task: PublishTestResults@2 - displayName: Publish the $(System.PhaseName) test results - condition: always() - inputs: - testResultsFormat: VSTest - testResultsFiles: '$(TestResultsDirectory)/*.trx' - testRunTitle: '${{ parameters.testFilter }}_$(System.PhaseName)' - failTaskOnFailedTests: true - - - task: PublishBuildArtifacts@1 - condition: always() - displayName: publish artifacts - - - ${{ if eq(parameters.platform, 'catalyst')}}: - - bash: | - chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/enable-notification-center.sh - $(System.DefaultWorkingDirectory)/eng/scripts/enable-notification-center.sh - displayName: 'Enable Notification Center' - continueOnError: true - timeoutInMinutes: 60 - - - ${{ if and(eq(parameters.platform, 'ios'), ne(parameters.poolName, 'Azure Pipelines'), eq(variables['System.TeamProject'], 'devdiv') ) }}: - # This must always be placed as the last step in the job - - template: agent-rebooter/mac.v1.yml@yaml-templates - parameters: - AgentPoolAccessToken: ${{ parameters.agentPoolAccessToken }} +- ${{ if eq(parameters.platform, 'catalyst')}}: + - bash: | + chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/disable-notification-center.sh + $(System.DefaultWorkingDirectory)/eng/scripts/disable-notification-center.sh + displayName: 'Disable Notification Center' + continueOnError: true + timeoutInMinutes: 60 + +- template: provision.yml + parameters: + skipJdk: ${{ ne(parameters.platform, 'android') }} + skipAndroidCommonSdks: ${{ ne(parameters.platform, 'android') }} + skipAndroidPlatformApis: true + onlyAndroidPlatformDefaultApis: true + skipAndroidEmulatorImages: ${{ ne(parameters.platform, 'android') }} + skipAndroidCreateAvds: true + androidEmulatorApiLevel: ${{ parameters.version }} + skipXcode: ${{ or(eq(parameters.platform, 'android'), eq(parameters.platform, 'windows')) }} + provisionatorChannel: ${{ parameters.provisionatorChannel }} + ${{ if parameters.skipProvisioning }}: + skipProvisionator: true + ${{ else }}: + skipProvisionator: false + ${{ if eq(parameters.platform, 'catalyst') }}: + openSslArgs: '' # Do not use legacy openssl for Catalyst builds + +- task: PowerShell@2 + condition: and(ne('${{ parameters.platform }}', 'windows'), ne('${{ parameters.platform }}', 'android')) + inputs: + targetType: 'inline' + script: | + defaults write -g NSAutomaticCapitalizationEnabled -bool false + defaults write -g NSAutomaticTextCompletionEnabled -bool false + defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false + displayName: "Modify defaults" + continueOnError: true + +- pwsh: ./build.ps1 --target=dotnet --configuration="${{ parameters.configuration }}" --verbosity=diagnostic + displayName: 'Install .NET' + retryCountOnTaskFailure: 2 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) + +- pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)" + displayName: 'Add .NET to PATH' + +# AzDO hosted agents default to 1024x768; set something bigger for Windows UI tests +- task: ScreenResolutionUtility@1 + condition: eq('${{ parameters.platform }}' , 'windows') + inputs: + displaySettings: 'specific' + width: '1920' + height: '1080' + displayName: "Set screen resolution" + +- task: UseNode@1 + inputs: + version: "20.3.1" + displayName: "Install node" + +- pwsh: | + $skipAppiumDoctor = if ($IsMacOS -or $IsLinux) { "true" } else { "false" } + dotnet build ./src/Provisioning/Provisioning.csproj -t:ProvisionAppium -p:SkipAppiumDoctor="$skipAppiumDoctor" -bl:"$(LogDirectory)/provision-appium.binlog" + displayName: "Install Appium" + continueOnError: false + retryCountOnTaskFailure: 2 + timeoutInMinutes: 10 + env: + APPIUM_HOME: $(APPIUM_HOME) + +- pwsh: | + Get-Content $PSCommandPath + $command = "./build.ps1 -Script eng/devices/${{ parameters.platform }}.cake --target=uitest --project=""${{ parameters.path }}""" + $command += " --appproject=""${{ parameters.app }}"" --device=""${{ parameters.device }}"" --apiversion=""${{ parameters.version }}"" --configuration=""${{ parameters.configuration }}""" + $command += " --runtimevariant=""${{ parameters.runtimeVariant }}""" + $command += " --results=""$(TestResultsDirectory)"" --binlog=""$(LogDirectory)"" ${{ parameters.cakeArgs }} --verbosity=diagnostic" + + $testFilter = "" + $testConfigrationArgs = "${{ parameters.testConfigurationArgs }}" + + "${{ parameters.testFilter }}".Split(",") | ForEach { + $testFilter += "TestCategory=" + $_ + "|" + } + + $testFilter = $testFilter.TrimEnd("|") + + # Cake does not allow empty parameters, so check if our filter is empty before adding it + if ($testConfigrationArgs) { + $command += " --TEST_CONFIGURATION_ARGS=""$testConfigrationArgs""" + } + if ($testFilter) { + $command += " --test-filter ""$testFilter""" + } + + Write-Host "Running command: $command" + + Invoke-Expression $command + displayName: $(Agent.JobName) + ${{ if ne(parameters.platform, 'android')}}: + retryCountOnTaskFailure: 1 + env: + APPIUM_HOME: $(APPIUM_HOME) + +- bash: | + cat ${BASH_SOURCE[0]} + pwsh ./build.ps1 --target=Cleanup -Script eng/devices/${{ parameters.platform }}.cake ---results="$(TestResultsDirectory)" ${{ parameters.cakeArgs }} + displayName: Cleanup and Create Simulator Logs if Test Run Failed To + condition: ${{ eq(parameters.platform, 'ios') }} + continueOnError: true + +- task: PublishTestResults@2 + displayName: Publish the $(System.PhaseName) test results + condition: always() + inputs: + testResultsFormat: VSTest + testResultsFiles: '$(TestResultsDirectory)/*.trx' + testRunTitle: '${{ parameters.testFilter }}_$(System.PhaseName)' + failTaskOnFailedTests: true + +- task: PublishBuildArtifacts@1 + condition: always() + displayName: publish artifacts + +- ${{ if eq(parameters.platform, 'catalyst')}}: + - bash: | + chmod +x $(System.DefaultWorkingDirectory)/eng/scripts/enable-notification-center.sh + $(System.DefaultWorkingDirectory)/eng/scripts/enable-notification-center.sh + displayName: 'Enable Notification Center' + continueOnError: true + timeoutInMinutes: 60 diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml index ac94bee35b6f..58f542e5e4be 100644 --- a/eng/pipelines/common/variables.yml +++ b/eng/pipelines/common/variables.yml @@ -19,12 +19,7 @@ variables: - name: isLocHandoffBranch value: $[in(variables['Build.SourceBranch'], 'refs/heads/net9.0', 'refs/heads/net10.0', 'refs/heads/main')] - name: signingCondition - value: $[or( - eq(variables['Sign'], 'true'), - in(variables['Build.SourceBranch'], 'refs/heads/net9.0', 'refs/heads/net10.0', 'refs/heads/main', 'refs/heads/inflight/current' ), - startsWith(variables['Build.SourceBranch'], 'refs/tags/'), - startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') - )] + value: $[or( eq(variables['Sign'], 'true'), in(variables['Build.SourceBranch'], 'refs/heads/net9.0', 'refs/heads/net10.0', 'refs/heads/main', 'refs/heads/inflight/current' ), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') )] # Common Agent Pools in use - name: HostedMacImage value: macOS-15 @@ -36,8 +31,6 @@ variables: value: $(Build.ArtifactStagingDirectory)/test-results - name: provisionator.xcode value: 'eng/provisioning/xcode.csx' -- name: provisionator.path - value: 'eng/provisioning/provisioning.csx' - name: internalProvisioning value: false - name: provisionator.extraArguments @@ -57,9 +50,10 @@ variables: - name: _InternalBuildArgs value: '' -# Variable groups required for private builds but not prs -- ${{ if ne(variables['Build.DefinitionName'], 'maui-pr') }}: - - group: Xamarin-Secrets +# Variable groups required for all builds +- ${{ if and(ne(variables['Build.DefinitionName'], 'maui-pr'), ne(variables['Build.DefinitionName'], 'dotnet-maui')) }}: + - group: maui-provisionator # This is just needed for the provisionator + - group: MAUI # This is the main MAUI variable group that contains secret for the apple certificate - ${{ if or(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.DefinitionName'], 'dotnet-maui')) }}: - name: internalProvisioning @@ -73,16 +67,11 @@ variables: value: true - name: _SignType value: real - # - name: PostBuildSign - # value: true - group: DotNetBuilds storage account read tokens - group: AzureDevOps-Artifact-Feeds-Pats - name: _InternalBuildArgs - value: /p:DotNetSignType=$(_SignType) - /p:TeamName=$(_TeamName) - /p:DotNetPublishUsingPipelines=true - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) /p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - ${{ if eq(variables['Build.DefinitionName'], 'dotnet-maui') }}: - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: @@ -91,3 +80,7 @@ variables: - group: Publish-Build-Assets - group: DotNet-HelixApi-Access - group: SDL_Settings + +- ${{ if eq(variables['Build.DefinitionName'], 'dotnet-maui-release') }}: + # maui-nuget-release provides: pat--nuget--xamarinc--push--wildcard + - group: maui-nuget-release diff --git a/eng/pipelines/device-tests.yml b/eng/pipelines/device-tests.yml index 708c1e9fccb1..25b561a946ee 100644 --- a/eng/pipelines/device-tests.yml +++ b/eng/pipelines/device-tests.yml @@ -44,9 +44,7 @@ pr: - THIRD-PARTY-NOTICES.TXT variables: - - template: /eng/pipelines/common/variables.yml - - name: AgentPoolAccessToken - value: $(botdeploy--azdo--token) +- template: /eng/pipelines/common/variables.yml@self parameters: @@ -114,7 +112,7 @@ stages: iosPool: ${{ parameters.iosPool }} catalystPool: ${{ parameters.catalystPool }} windowsPool: ${{ parameters.windowsPool }} - agentPoolAccessToken: $(AgentPoolAccessToken) + # agentPoolAccessToken: $(AgentPoolAccessToken) targetFrameworkVersion: ${{ targetFrameworkVersion }} ${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}: androidApiLevels: [ 33, 30, 29, 28, 27, 26, 25, 24, 23 ] diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 3c0eddf6ee9d..153717afa0c5 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -42,315 +42,303 @@ pr: - THIRD-PARTY-NOTICES.TXT variables: - - template: /eng/pipelines/common/variables.yml +- template: /eng/pipelines/common/variables.yml parameters: - - name: UseProvisionator - type: boolean - default: false +- name: UseProvisionator + type: boolean + default: false - - name: provisionatorChannel - displayName: 'Provisionator channel' - type: string - default: 'latest' # Support for launching a build against a Provisionator PR (e.g., pr/[github-account-name]/[pr-number]) as a means to test in-progress Provisionator changes +- name: provisionatorChannel + displayName: 'Provisionator channel' + type: string + default: 'latest' # Support for launching a build against a Provisionator PR (e.g., pr/[github-account-name]/[pr-number]) as a means to test in-progress Provisionator changes - - name: BuildEverything - type: boolean - default: false +- name: BuildEverything + type: boolean + default: false - - name: BuildConfigurations - type: object - default: - - Debug - - Release +- name: BuildConfigurations + type: object + default: + - Debug + - Release - - name: BuildPlatforms - type: object - default: - - name: Windows - poolName: $(windowsVmPool) - vmImage: $(windowsVmImage) - demands: - - Agent.OS -equals Windows_NT - artifact: build-windows - - name: macOS - poolName: $(macOSXVmPool) - vmImage: $(macOSXVmImage) - demands: - - macOS.Name -equals Sequoia - - macOS.Architecture -equals x64 - artifact: build-macos - - - name: PackPlatforms - type: object - default: - - name: Windows - poolName: $(windowsVmPool) - vmImage: $(windowsVmImage) - demands: - - Agent.OS -equals Windows_NT - artifact: nuget +- name: BuildPlatforms + type: object + default: + - name: Windows + poolName: $(windowsVmPool) + vmImage: $(windowsVmImage) + demands: + - Agent.OS -equals Windows_NT + artifact: build-windows + - name: macOS + poolName: $(macOSXVmPool) + vmImage: $(macOSXVmImage) + demands: + - macOS.Name -equals Sequoia + - macOS.Architecture -equals x64 + artifact: build-macos - - name: BuildTemplatePlatforms - type: object - default: - - name: Windows - poolName: $(windowsVmPool) - vmImage: $(windowsVmImage) - demands: - - Agent.OS -equals Windows_NT - artifact: build-windows - - name: macOS - poolName: $(macOSXVmPool) - vmImage: $(macOSXVmImage) - demands: - - macOS.Name -equals Sequoia - - macOS.Architecture -equals x64 - artifact: build-macos +- name: PackPlatforms + type: object + default: + - name: Windows + poolName: $(windowsVmPool) + vmImage: $(windowsVmImage) + demands: + - Agent.OS -equals Windows_NT + artifact: nuget - - name: RunTemplatePlatforms - type: object - default: - - name: $(androidTestsVmPool) - vmImage: $(androidTestsVmImage) - demands: - - macOS.Name -equals Sequoia - - macOS.Architecture -equals x64 - testName: RunOnAndroid - artifact: templates-run-android - - name: $(iosTestsVmPool) - vmImage: $(iosTestsVmImage) - demands: - - macOS.Name -equals Sequoia - - macOS.Architecture -equals x64 - testName: RunOniOS - artifact: templates-run-ios +- name: BuildTemplatePlatforms + type: object + default: + - name: Windows + poolName: $(windowsVmPool) + vmImage: $(windowsVmImage) + demands: + - Agent.OS -equals Windows_NT + artifact: build-windows + - name: macOS + poolName: $(macOSXVmPool) + vmImage: $(macOSXVmImage) + demands: + - macOS.Name -equals Sequoia + - macOS.Architecture -equals x64 + artifact: build-macos - - name: MacTemplatePool - type: object - default: - name: $(androidTestsVmPool) - vmImage: $(androidTestsVmImage) - demands: - - macOS.Name -equals Sequoia - - macOS.Architecture -equals arm64 +- name: RunTemplatePlatforms + type: object + default: + - name: $(androidTestsVmPool) + vmImage: $(androidTestsVmImage) + demands: + - macOS.Name -equals Sequoia + - macOS.Architecture -equals x64 + testName: RunOnAndroid + artifact: templates-run-android + - name: $(iosTestsVmPool) + vmImage: $(iosTestsVmImage) + demands: + - macOS.Name -equals Sequoia + - macOS.Architecture -equals x64 + testName: RunOniOS + artifact: templates-run-ios + +- name: MacTemplatePool + type: object + default: + name: $(androidTestsVmPool) + vmImage: $(androidTestsVmImage) + demands: + - macOS.Name -equals Sequoia + - macOS.Architecture -equals arm64 resources: repositories: - - repository: yaml-templates - type: github - name: xamarin/yaml-templates - endpoint: xamarin - ref: refs/heads/main + - repository: yaml-templates + type: github + name: xamarin/yaml-templates + endpoint: xamarin + ref: refs/heads/main stages: - - stage: build_net - displayName: Build .NET MAUI - dependsOn: [] - jobs: - - ${{ each BuildPlatform in parameters.BuildPlatforms }}: - - ${{ each BuildConfiguration in parameters.BuildConfigurations }}: - - job: build_net_${{ BuildPlatform.name }}_${{ BuildConfiguration }} - workspace: - clean: all - displayName: ${{ BuildPlatform.name }} (${{ BuildConfiguration }}) - timeoutInMinutes: 120 - condition: or( - ${{ parameters.BuildEverything }}, - ne(variables['Build.Reason'], 'PullRequest'), - eq('${{ BuildConfiguration }}', 'Release')) - pool: - name: ${{ BuildPlatform.poolName }} - vmImage: ${{ BuildPlatform.vmImage }} - demands: ${{ BuildPlatform.demands }} - steps: - - template: common/provision.yml - parameters: - poolName: ${{ BuildPlatform.poolName }} - skipJdk: false - skipAndroidCommonSdks: false - skipAndroidPlatformApis: false - onlyAndroidPlatformDefaultApis: true - skipAndroidEmulatorImages: true - skipAndroidCreateAvds: true - skipProvisioning: true - skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}: - skipProvisionator: false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - ${{ else }}: - skipProvisionator: true - - - pwsh: ./build.ps1 --target=dotnet --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic - displayName: 'Install .NET' - retryCountOnTaskFailure: 3 - env: - DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) - PRIVATE_BUILD: $(PrivateBuild) - - pwsh: ./build.ps1 --target=dotnet-build --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic - displayName: 'Build .NET Maui' - - pwsh: ./build.ps1 --target=dotnet-test --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic - displayName: 'Run Unit Tests' - - task: PublishTestResults@2 - condition: always() - inputs: - testRunner: VSTest - testResultsFiles: '$(build.artifactstagingdirectory)/**/*.trx' - - task: PublishBuildArtifacts@1 - condition: always() - displayName: Publish Artifacts (${{ BuildPlatform.artifact }}) - inputs: - ArtifactName: ${{ BuildPlatform.artifact }} +- stage: build_net + displayName: Build .NET MAUI + dependsOn: [] + jobs: + - ${{ each BuildPlatform in parameters.BuildPlatforms }}: + - ${{ each BuildConfiguration in parameters.BuildConfigurations }}: + - job: build_net_${{ BuildPlatform.name }}_${{ BuildConfiguration }} + workspace: + clean: all + displayName: ${{ BuildPlatform.name }} (${{ BuildConfiguration }}) + timeoutInMinutes: 120 + condition: or( ${{ parameters.BuildEverything }}, ne(variables['Build.Reason'], 'PullRequest'), eq('${{ BuildConfiguration }}', 'Release')) + pool: + name: ${{ BuildPlatform.poolName }} + vmImage: ${{ BuildPlatform.vmImage }} + demands: ${{ BuildPlatform.demands }} + steps: + - template: common/provision.yml + parameters: + poolName: ${{ BuildPlatform.poolName }} + skipJdk: false + skipAndroidCommonSdks: false + skipAndroidPlatformApis: false + onlyAndroidPlatformDefaultApis: true + skipAndroidEmulatorImages: true + skipAndroidCreateAvds: true + skipProvisioning: true + skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} + ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}: + skipProvisionator: false + ${{ else }}: + skipProvisionator: true - - stage: pack_net - displayName: Pack .NET MAUI - dependsOn: [] - jobs: - - ${{ each PackPlatform in parameters.PackPlatforms }}: - - job: pack_net_${{ PackPlatform.name }} - workspace: - clean: all - displayName: ${{ PackPlatform.name }} - timeoutInMinutes: 240 - pool: - name: ${{ PackPlatform.poolName }} - vmImage: ${{ PackPlatform.vmImage }} - demands: ${{ PackPlatform.demands }} - variables: - - name: _buildScript - value: $(Build.SourcesDirectory)/build.cmd -ci - - name: _BuildConfig - value: Release - - name: _BuildOfficalId - value: $[ format('{0}.{1}', format('{0:yyyyMMdd}', pipeline.startTime), counter(format('{0:yyyyMMdd}', pipeline.startTime), 1) )] + - pwsh: ./build.ps1 --target=dotnet --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic + displayName: 'Install .NET' + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) + - pwsh: ./build.ps1 --target=dotnet-build --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic + displayName: 'Build .NET Maui' + - pwsh: ./build.ps1 --target=dotnet-test --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic + displayName: 'Run Unit Tests' + - task: PublishTestResults@2 + condition: always() + inputs: + testRunner: VSTest + testResultsFiles: '$(build.artifactstagingdirectory)/**/*.trx' + - task: PublishBuildArtifacts@1 + condition: always() + displayName: Publish Artifacts (${{ BuildPlatform.artifact }}) + inputs: + ArtifactName: ${{ BuildPlatform.artifact }} - steps: - - template: common/pack.yml - parameters: - platform: ${{ PackPlatform.name }} - provisionatorChannel: ${{ parameters.provisionatorChannel }} - artifact: ${{ PackPlatform.artifact }} - artifactsPath: $(Build.ArtifactStagingDirectory) - artifactBinaries: 'pack-binaries' - buildConfiguration: $(_BuildConfig) - dotnetScript: $(Build.SourcesDirectory)/dotnet.cmd - buildScript: $(_buildScript) - repoArtifactsPath: $(Build.Arcade.ArtifactsPath) - repoLogPath: $(Build.Arcade.LogsPath) - repoTestResultsPath: $(Build.Arcade.TestResultsPath) - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - officialBuildId: $(_BuildOfficalId) - prepareSteps: - - template: common/provision.yml - parameters: - checkoutDirectory: '$(System.DefaultWorkingDirectory)' - provisionatorChannel: ${{ parameters.provisionatorChannel }} - skipJdk: false - skipAndroidCommonSdks: false - skipAndroidPlatformApis: false - onlyAndroidPlatformDefaultApis: true - skipAndroidEmulatorImages: true - skipAndroidCreateAvds: true - skipProvisioning: true - skipXcode: ${{ ne(PackPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}: - skipProvisionator: false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - ${{ else }}: - skipProvisionator: true - - - stage: samples_net - displayName: Test .NET MAUI Samples - dependsOn: pack_net - jobs: - - ${{ each BuildPlatform in parameters.BuildPlatforms }}: - - job: build_net_${{ BuildPlatform.name }}_samples - workspace: - clean: all - displayName: ${{ BuildPlatform.name }} - timeoutInMinutes: 120 - pool: - name: ${{ BuildPlatform.poolName }} - vmImage: ${{ BuildPlatform.vmImage }} - demands: ${{ BuildPlatform.demands }} - steps: - - template: common/provision.yml - parameters: - poolName: ${{ BuildPlatform.poolName }} - skipJdk: false - skipAndroidCommonSdks: false - skipAndroidPlatformApis: false - onlyAndroidPlatformDefaultApis: true - skipAndroidEmulatorImages: true - skipAndroidCreateAvds: true - skipProvisioning: true - skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} - ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}: - skipProvisionator: false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - ${{ else }}: - skipProvisionator: true - - task: DownloadBuildArtifacts@0 - displayName: 'Download Packages' - inputs: - artifactName: nuget - itemPattern: '**/*.nupkg' - downloadPath: $(System.DefaultWorkingDirectory)/artifacts - - pwsh: Move-Item -Path artifacts\nuget\*.nupkg -Destination artifacts -Force - displayName: Move the downloaded artifacts - - pwsh: ./build.ps1 --target=dotnet-local-workloads --verbosity=diagnostic - displayName: 'Install .NET (Local Workloads)' - retryCountOnTaskFailure: 3 - env: - DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) - PRIVATE_BUILD: $(PrivateBuild) - - pwsh: ./build.ps1 --target=dotnet-integration-build --verbosity=diagnostic - displayName: Build Microsoft.Maui.IntegrationTests - - pwsh: ./build.ps1 --target=dotnet-integration-test --filter="Category=Samples" --resultsfilename="integration-samples" --verbosity=diagnostic - displayName: Run ${{ BuildPlatform.name }} sample build tests - - task: PublishTestResults@2 - displayName: Publish the ${{ BuildPlatform.name }} sample build tests - condition: always() - inputs: - testRunner: VSTest - testResultsFiles: '$(build.artifactstagingdirectory)/**/*.trx' - testRunTitle: ${{ BuildPlatform.name }} sample build tests - - task: PublishBuildArtifacts@1 - condition: always() - displayName: publish artifacts - inputs: - ArtifactName: build_net_${{ BuildPlatform.name }}_samples +- stage: pack_net + displayName: Pack .NET MAUI + dependsOn: [] + jobs: + - ${{ each PackPlatform in parameters.PackPlatforms }}: + - job: pack_net_${{ PackPlatform.name }} + workspace: + clean: all + displayName: ${{ PackPlatform.name }} + timeoutInMinutes: 240 + pool: + name: ${{ PackPlatform.poolName }} + vmImage: ${{ PackPlatform.vmImage }} + demands: ${{ PackPlatform.demands }} + variables: + - name: _buildScript + value: $(Build.SourcesDirectory)/build.cmd -ci + - name: _BuildConfig + value: Release + - name: _BuildOfficalId + value: $[ format('{0}.{1}', format('{0:yyyyMMdd}', pipeline.startTime), counter(format('{0:yyyyMMdd}', pipeline.startTime), 1) )] - - stage: templates_net - displayName: Test Templates - dependsOn: pack_net - jobs: - - template: common/maui-templates.yml - parameters: - RunPlatforms: ${{ parameters.RunTemplatePlatforms }} - BuildPlatforms: ${{ parameters.BuildTemplatePlatforms }} - MacBuildPool: ${{ parameters.MacTemplatePool }} - conditionMacTemplates: or( - ${{ parameters.BuildEverything }}, - ne(variables['Build.Reason'], 'PullRequest'), - eq(variables['System.TeamProject'], 'devdiv')) - prepareSteps: + steps: + - template: common/pack.yml + parameters: + platform: ${{ PackPlatform.name }} + provisionatorChannel: ${{ parameters.provisionatorChannel }} + artifact: ${{ PackPlatform.artifact }} + artifactsPath: $(Build.ArtifactStagingDirectory) + artifactBinaries: 'pack-binaries' + buildConfiguration: $(_BuildConfig) + dotnetScript: $(Build.SourcesDirectory)/dotnet.cmd + buildScript: $(_buildScript) + repoArtifactsPath: $(Build.Arcade.ArtifactsPath) + repoLogPath: $(Build.Arcade.LogsPath) + repoTestResultsPath: $(Build.Arcade.TestResultsPath) + officialBuildId: $(_BuildOfficalId) + prepareSteps: - template: common/provision.yml parameters: checkoutDirectory: '$(System.DefaultWorkingDirectory)' provisionatorChannel: ${{ parameters.provisionatorChannel }} - skipAndroidSdks: true - skipAndroidImages: true - installDefaultAndroidApi: true - skipXcode: false - ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') )}}: + skipJdk: false + skipAndroidCommonSdks: false + skipAndroidPlatformApis: false + onlyAndroidPlatformDefaultApis: true + skipAndroidEmulatorImages: true + skipAndroidCreateAvds: true + skipProvisioning: true + skipXcode: ${{ ne(PackPlatform.name , 'macOS') }} + ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}: skipProvisionator: false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - ${{ else }}: + ${{ else }}: skipProvisionator: true - - - - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: - - template: common/localization.yml + +- stage: samples_net + displayName: Test .NET MAUI Samples + dependsOn: pack_net + jobs: + - ${{ each BuildPlatform in parameters.BuildPlatforms }}: + - job: build_net_${{ BuildPlatform.name }}_samples + workspace: + clean: all + displayName: ${{ BuildPlatform.name }} + timeoutInMinutes: 120 + pool: + name: ${{ BuildPlatform.poolName }} + vmImage: ${{ BuildPlatform.vmImage }} + demands: ${{ BuildPlatform.demands }} + steps: + - template: common/provision.yml + parameters: + poolName: ${{ BuildPlatform.poolName }} + skipJdk: false + skipAndroidCommonSdks: false + skipAndroidPlatformApis: false + onlyAndroidPlatformDefaultApis: true + skipAndroidEmulatorImages: true + skipAndroidCreateAvds: true + skipProvisioning: true + skipXcode: ${{ ne(BuildPlatform.name , 'macOS') }} + ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}: + skipProvisionator: false + ${{ else }}: + skipProvisionator: true + - task: DownloadBuildArtifacts@0 + displayName: 'Download Packages' + inputs: + artifactName: nuget + itemPattern: '**/*.nupkg' + downloadPath: $(System.DefaultWorkingDirectory)/artifacts + - pwsh: Move-Item -Path artifacts\nuget\*.nupkg -Destination artifacts -Force + displayName: Move the downloaded artifacts + - pwsh: ./build.ps1 --target=dotnet-local-workloads --verbosity=diagnostic + displayName: 'Install .NET (Local Workloads)' + retryCountOnTaskFailure: 3 + env: + DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) + PRIVATE_BUILD: $(PrivateBuild) + - pwsh: ./build.ps1 --target=dotnet-integration-build --verbosity=diagnostic + displayName: Build Microsoft.Maui.IntegrationTests + - pwsh: ./build.ps1 --target=dotnet-integration-test --filter="Category=Samples" --resultsfilename="integration-samples" --verbosity=diagnostic + displayName: Run ${{ BuildPlatform.name }} sample build tests + - task: PublishTestResults@2 + displayName: Publish the ${{ BuildPlatform.name }} sample build tests + condition: always() + inputs: + testRunner: VSTest + testResultsFiles: '$(build.artifactstagingdirectory)/**/*.trx' + testRunTitle: ${{ BuildPlatform.name }} sample build tests + - task: PublishBuildArtifacts@1 + condition: always() + displayName: publish artifacts + inputs: + ArtifactName: build_net_${{ BuildPlatform.name }}_samples + +- stage: templates_net + displayName: Test Templates + dependsOn: pack_net + jobs: + - template: common/maui-templates.yml + parameters: + RunPlatforms: ${{ parameters.RunTemplatePlatforms }} + BuildPlatforms: ${{ parameters.BuildTemplatePlatforms }} + MacBuildPool: ${{ parameters.MacTemplatePool }} + conditionMacTemplates: or( ${{ parameters.BuildEverything }}, ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv')) + prepareSteps: + - template: common/provision.yml + parameters: + checkoutDirectory: '$(System.DefaultWorkingDirectory)' + provisionatorChannel: ${{ parameters.provisionatorChannel }} + skipAndroidSdks: true + skipAndroidImages: true + installDefaultAndroidApi: true + skipXcode: false + ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') )}}: + skipProvisionator: false + ${{ else }}: + skipProvisionator: true + +- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: + - template: common/localization.yml diff --git a/eng/pipelines/maui-release.yml b/eng/pipelines/maui-release.yml index fba671ac333d..7e2038048546 100644 --- a/eng/pipelines/maui-release.yml +++ b/eng/pipelines/maui-release.yml @@ -30,44 +30,44 @@ schedules: - inflight/current variables: - - template: /eng/pipelines/common/variables.yml@self +- template: /eng/pipelines/common/variables.yml@self parameters: - - name: VM_IMAGE_HOST - type: object - default: - name: MAUI-1ESPT - image: 1ESPT-Windows2022 - os: windows - - - name: PackPlatform - type: object - default: - name: Windows - artifact: nuget - binariesArtifact: pack-binaries - metadataArtifact: metadata - logsArtifact: logs - docsArtifact: xml-docs - - - name: Skip1ESComplianceTasks - type: boolean - default: false - - - name: PushMauiPackagesToMaestro - type: boolean - default: true +- name: VM_IMAGE_HOST + type: object + default: + name: MAUI-1ESPT + image: 1ESPT-Windows2022 + os: windows + +- name: PackPlatform + type: object + default: + name: Windows + artifact: nuget + binariesArtifact: pack-binaries + metadataArtifact: metadata + logsArtifact: logs + docsArtifact: xml-docs + +- name: Skip1ESComplianceTasks + type: boolean + default: false + +- name: PushMauiPackagesToMaestro + type: boolean + default: true resources: repositories: - - repository: yaml-templates - type: git - name: DevDiv/Xamarin.yaml-templates - ref: refs/heads/main - - repository: 1ESPipelineTemplates - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release + - repository: yaml-templates + type: git + name: DevDiv/Xamarin.yaml-templates + ref: refs/heads/main + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates @@ -94,115 +94,115 @@ extends: enabled: true configFile: '$(Build.SourcesDirectory)\eng\automation\guardian\tsaoptions-v2.json' stages: - - stage: pack_net - displayName: Pack .NET MAUI - dependsOn: [] - jobs: - - job: pack_net_${{ parameters.PackPlatform.name }} - workspace: - clean: all - displayName: ${{ parameters.PackPlatform.name }} - timeoutInMinutes: 240 - - pool: ${{ parameters.VM_IMAGE_HOST }} - - templateContext: - outputs: - - output: pipelineArtifact - displayName: 'Publish the ${{ parameters.PackPlatform.artifact }} artifacts' - artifactName: ${{ parameters.PackPlatform.artifact }} - targetPath: '$(Build.ArtifactStagingDirectory)/nuget' - - - output: pipelineArtifact - displayName: 'Publish the ${{ parameters.PackPlatform.binariesArtifact }} artifacts' - artifactName: ${{ parameters.PackPlatform.binariesArtifact }} - targetPath: '$(System.DefaultWorkingDirectory)/artifacts/binaries' - - - output: pipelineArtifact - displayName: 'Publish the ${{ parameters.PackPlatform.docsArtifact }} artifacts' - artifactName: ${{ parameters.PackPlatform.docsArtifact }} - targetPath: '$(System.DefaultWorkingDirectory)/artifacts/docs-packs' - - - output: pipelineArtifact - displayName: 'Publish the ${{ parameters.PackPlatform.metadataArtifact }} artifacts' - artifactName: ${{ parameters.PackPlatform.metadataArtifact }} - targetPath: '$(Build.ArtifactStagingDirectory)/metadata' - - - output: pipelineArtifact - displayName: 'Publish the ${{ parameters.PackPlatform.logsArtifact }} artifacts' - artifactName: ${{ parameters.PackPlatform.logsArtifact }} - targetPath: '$(Build.ArtifactStagingDirectory)/logs' - - variables: - - name: _buildScript - value: $(Build.SourcesDirectory)/build.cmd -ci - - name: _BuildConfig - value: Release - - steps: - - template: /eng/pipelines/common/pack.yml@self - parameters: - publishArtifacts: false - platform: ${{ parameters.PackPlatform.name }} - artifact: ${{ parameters.PackPlatform.artifact }} - artifactBinaries: ${{ parameters.PackPlatform.binariesArtifact }} - artifactsPath: '$(Build.ArtifactStagingDirectory)' - buildConfiguration: $(_BuildConfig) - dotnetScript: $(Build.SourcesDirectory)/dotnet.cmd - buildScript: $(_buildScript) - repoArtifactsPath: $(Build.Arcade.ArtifactsPath) - repoLogPath: $(Build.Arcade.LogsPath) - repoTestResultsPath: $(Build.Arcade.TestResultsPath) - officialBuildId: $(_BuildOfficalId) - prepareSteps: - - template: /eng/pipelines/common/provision.yml@self - parameters: - checkoutDirectory: '$(System.DefaultWorkingDirectory)' - # gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) - skipJdk: false - skipAndroidCommonSdks: false - skipAndroidPlatformApis: false - onlyAndroidPlatformDefaultApis: true - skipAndroidEmulatorImages: true - skipAndroidCreateAvds: true - skipProvisioning: true - skipXcode: true - - - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: # Sign only using the private server - - template: /eng/pipelines/common/sign.yml@self - parameters: - dependsOn: ['pack_net'] - stageName: 'nuget_signing' - poolName: ${{ parameters.VM_IMAGE_HOST.name }} - vmImage: ${{ parameters.VM_IMAGE_HOST.image }} - os: ${{ parameters.VM_IMAGE_HOST.os }} - - - template: /eng/pipelines/common/insertion.yml@self # Insert on VS and SDK + - stage: pack_net + displayName: Pack .NET MAUI + dependsOn: [] + jobs: + - job: pack_net_${{ parameters.PackPlatform.name }} + workspace: + clean: all + displayName: ${{ parameters.PackPlatform.name }} + timeoutInMinutes: 240 + + pool: ${{ parameters.VM_IMAGE_HOST }} + + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish the ${{ parameters.PackPlatform.artifact }} artifacts' + artifactName: ${{ parameters.PackPlatform.artifact }} + targetPath: '$(Build.ArtifactStagingDirectory)/nuget' + + - output: pipelineArtifact + displayName: 'Publish the ${{ parameters.PackPlatform.binariesArtifact }} artifacts' + artifactName: ${{ parameters.PackPlatform.binariesArtifact }} + targetPath: '$(System.DefaultWorkingDirectory)/artifacts/binaries' + + - output: pipelineArtifact + displayName: 'Publish the ${{ parameters.PackPlatform.docsArtifact }} artifacts' + artifactName: ${{ parameters.PackPlatform.docsArtifact }} + targetPath: '$(System.DefaultWorkingDirectory)/artifacts/docs-packs' + + - output: pipelineArtifact + displayName: 'Publish the ${{ parameters.PackPlatform.metadataArtifact }} artifacts' + artifactName: ${{ parameters.PackPlatform.metadataArtifact }} + targetPath: '$(Build.ArtifactStagingDirectory)/metadata' + + - output: pipelineArtifact + displayName: 'Publish the ${{ parameters.PackPlatform.logsArtifact }} artifacts' + artifactName: ${{ parameters.PackPlatform.logsArtifact }} + targetPath: '$(Build.ArtifactStagingDirectory)/logs' + + variables: + - name: _buildScript + value: $(Build.SourcesDirectory)/build.cmd -ci + - name: _BuildConfig + value: Release + + steps: + - template: /eng/pipelines/common/pack.yml@self parameters: - dependsOn: ['nuget_signing'] - stageName: 'sdk_insertion' - poolName: ${{ parameters.VM_IMAGE_HOST.name }} - vmImage: ${{ parameters.VM_IMAGE_HOST.image }} - os: ${{ parameters.VM_IMAGE_HOST.os }} - pushMauiPackagesToMaestro: ${{ parameters.PushMauiPackagesToMaestro }} + publishArtifacts: false + platform: ${{ parameters.PackPlatform.name }} + artifact: ${{ parameters.PackPlatform.artifact }} + artifactBinaries: ${{ parameters.PackPlatform.binariesArtifact }} + artifactsPath: '$(Build.ArtifactStagingDirectory)' + buildConfiguration: $(_BuildConfig) + dotnetScript: $(Build.SourcesDirectory)/dotnet.cmd + buildScript: $(_buildScript) + repoArtifactsPath: $(Build.Arcade.ArtifactsPath) + repoLogPath: $(Build.Arcade.LogsPath) + repoTestResultsPath: $(Build.Arcade.TestResultsPath) + officialBuildId: $(_BuildOfficalId) + prepareSteps: + - template: /eng/pipelines/common/provision.yml@self + parameters: + checkoutDirectory: '$(System.DefaultWorkingDirectory)' + skipJdk: false + skipAndroidCommonSdks: false + skipAndroidPlatformApis: false + onlyAndroidPlatformDefaultApis: true + skipAndroidEmulatorImages: true + skipAndroidCreateAvds: true + skipProvisioning: true + skipXcode: true + + - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: + # Sign only using the private server + - template: /eng/pipelines/common/sign.yml@self + parameters: + dependsOn: [ 'pack_net' ] + stageName: 'nuget_signing' + poolName: ${{ parameters.VM_IMAGE_HOST.name }} + vmImage: ${{ parameters.VM_IMAGE_HOST.image }} + os: ${{ parameters.VM_IMAGE_HOST.os }} + + - template: /eng/pipelines/common/insertion.yml@self # Insert on VS and SDK + parameters: + dependsOn: [ 'nuget_signing' ] + stageName: 'sdk_insertion' + poolName: ${{ parameters.VM_IMAGE_HOST.name }} + vmImage: ${{ parameters.VM_IMAGE_HOST.image }} + os: ${{ parameters.VM_IMAGE_HOST.os }} + pushMauiPackagesToMaestro: ${{ parameters.PushMauiPackagesToMaestro }} - - template: /eng/pipelines/common/apiscan.yml@self # ApiScan + - template: /eng/pipelines/common/apiscan.yml@self # ApiScan + parameters: + dependsOn: [ 'pack_net' ] + poolName: ${{ parameters.VM_IMAGE_HOST.name }} + vmImage: ${{ parameters.VM_IMAGE_HOST.image }} + os: ${{ parameters.VM_IMAGE_HOST.os }} + tsaUploadEnabled: true + tsaConfigFile: '$(Build.SourcesDirectory)\eng\automation\guardian\tsaoptions-v2.json' + scanArtifacts: [ '${{ parameters.PackPlatform.binariesArtifact }}' ] + softwareVersion: 9.0 + + - ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + - template: /eng/pipelines/common/push-nightly.yml@self parameters: - dependsOn: ['pack_net'] + dependsOn: [ 'sdk_insertion' ] + stageName: 'nightly' + displayName: 'Push Nightly' poolName: ${{ parameters.VM_IMAGE_HOST.name }} vmImage: ${{ parameters.VM_IMAGE_HOST.image }} - os: ${{ parameters.VM_IMAGE_HOST.os }} - tsaUploadEnabled: true - tsaConfigFile: '$(Build.SourcesDirectory)\eng\automation\guardian\tsaoptions-v2.json' - scanArtifacts: ['${{ parameters.PackPlatform.binariesArtifact }}'] - softwareVersion: 9.0 - - - ${{ if eq(variables['Build.Reason'], 'Schedule') }}: - - template: /eng/pipelines/common/push-nightly.yml@self - parameters: - dependsOn: ['sdk_insertion'] - stageName: 'nightly' - displayName: 'Push Nightly' - poolName: ${{ parameters.VM_IMAGE_HOST.name }} - vmImage: ${{ parameters.VM_IMAGE_HOST.image }} - os: ${{ parameters.VM_IMAGE_HOST.os }} + os: ${{ parameters.VM_IMAGE_HOST.os }} diff --git a/eng/pipelines/ui-tests.yml b/eng/pipelines/ui-tests.yml index c9db6cf73888..0b27928f8735 100644 --- a/eng/pipelines/ui-tests.yml +++ b/eng/pipelines/ui-tests.yml @@ -42,7 +42,7 @@ pr: - THIRD-PARTY-NOTICES.TXT variables: - - template: /eng/pipelines/common/variables.yml + - template: /eng/pipelines/common/variables.yml@self - name: AgentPoolAccessToken value: $(botdeploy--azdo--token--register--xamarin-public--untrusted) @@ -160,7 +160,6 @@ stages: runCompatibilityTests: true ${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}: skipProvisioning: false - gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) ${{ else }}: skipProvisioning: true projects: diff --git a/eng/provisioning/provisioning.csx b/eng/provisioning/provisioning.csx deleted file mode 100644 index d077a3909afc..000000000000 --- a/eng/provisioning/provisioning.csx +++ /dev/null @@ -1,7 +0,0 @@ -if (IsMac) -{ - AppleCodesignIdentity("Apple Development: Jonathan Dick (FJL7285DY2)", "https://dl.internalx.com/qa/code-signing-entitlements/components-mac-ios-certificate.p12"); - AppleCodesignProfile("https://dl.internalx.com/qa/code-signing-entitlements/components-ios-provisioning.mobileprovision"); - AppleCodesignProfile("https://dl.internalx.com/qa/code-signing-entitlements/components-mac-provisioning.mobileprovision"); - AppleCodesignProfile("https://dl.internalx.com/qa/code-signing-entitlements/components-tvos-provisioning.mobileprovision"); -}