Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b8df65f
[build] setup public pipeline on `dnceng-public`
jonathanpeppers Dec 8, 2025
48209aa
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
b139c7b
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
5e59a0e
asdf
jonathanpeppers Dec 8, 2025
f80579f
asdf
jonathanpeppers Dec 8, 2025
ea5a896
asdf
jonathanpeppers Dec 8, 2025
4864f51
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
9386845
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
e928e58
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
5498617
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
f73c4c7
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
ffcf229
WIP
jonathanpeppers Dec 8, 2025
8bb4244
Create stage-linux-tests-public.yaml
jonathanpeppers Dec 8, 2025
b6d8984
Update build-linux.yaml
jonathanpeppers Dec 8, 2025
a8598bd
Update build-linux.yaml
jonathanpeppers Dec 8, 2025
ac918ea
Update build-macos.yaml
jonathanpeppers Dec 8, 2025
c738564
Update build-windows.yaml
jonathanpeppers Dec 8, 2025
04a4ff3
asdf
jonathanpeppers Dec 8, 2025
6ab6d60
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
02294dd
Update azure-pipelines-public.yaml
jonathanpeppers Dec 8, 2025
68b69eb
Update azure-pipelines-public.yaml
jonathanpeppers Dec 9, 2025
2c1b703
Fix build ordering
jonathanpeppers Dec 9, 2025
125b513
Log disk space usage
jonathanpeppers Dec 9, 2025
c1a87ac
`NetCore-Public-XL` pool
jonathanpeppers Dec 9, 2025
a1521ae
Remove `-XL`
jonathanpeppers Dec 9, 2025
830246c
Log disk space all builds
jonathanpeppers Dec 9, 2025
5824edc
Linux: NetCore-Public
jonathanpeppers Dec 9, 2025
7e2e10f
Update azure-pipelines-public.yaml
jonathanpeppers Dec 9, 2025
7c9dfef
Update azure-pipelines-public.yaml
jonathanpeppers Dec 9, 2025
bab4f8c
Update build-linux-steps.yaml
jonathanpeppers Dec 9, 2025
ffed058
Update build-windows-steps.yaml
jonathanpeppers Dec 9, 2025
7c9b25a
Update setup-test-environment-steps.yaml
jonathanpeppers Dec 9, 2025
1bfaf51
Revert "Update build-windows-steps.yaml"
jonathanpeppers Dec 10, 2025
13ca81e
Update build-windows-steps.yaml
jonathanpeppers Dec 10, 2025
40b6ce6
Update build-windows-steps.yaml
jonathanpeppers Dec 10, 2025
110f19c
Update setup-jdk-variables.yaml
jonathanpeppers Dec 10, 2025
a7ca03a
Update setup-jdk-variables.yaml
jonathanpeppers Dec 10, 2025
7063835
Revert "Update setup-jdk-variables.yaml"
jonathanpeppers Dec 10, 2025
265a6ad
Update setup-jdk-variables.yaml
jonathanpeppers Dec 10, 2025
21c6e3d
apt-get install -y g++-10 gcc-10
jonathanpeppers Dec 10, 2025
2dc48f2
Update azure-pipelines-public.yaml
jonathanpeppers Dec 10, 2025
a755da6
Update azure-pipelines-public.yaml
jonathanpeppers Dec 10, 2025
51034bb
Add missing `makeMSBuildArgs`
jonathanpeppers Dec 10, 2025
41fc2f4
Provision API 35
jonathanpeppers Dec 10, 2025
02797d3
Package Tests Stage
jonathanpeppers Dec 10, 2025
8308f76
Update stage-package-tests.yaml
jonathanpeppers Dec 10, 2025
de57313
Update Step_Android_SDK_NDK.cs
jonathanpeppers Dec 11, 2025
0c6a772
Add `skipTests` queue parameter
jonathanpeppers Dec 11, 2025
030c211
Set $(AndroidNdkDirectory)
jonathanpeppers Dec 12, 2025
321ea61
Revert "Add `skipTests` queue parameter"
jonathanpeppers Dec 12, 2025
604b0d1
Update stage-linux-tests.yaml
jonathanpeppers Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
334 changes: 334 additions & 0 deletions build-tools/automation/azure-pipelines-public.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
# .NET for Android Pipeline - Public Build
# This pipeline runs on the public dnceng instance for:
# - PRs from forks (contributors)
# - Main or release branch CI builds
# Internal branches use the DevDiv pipeline (azure-pipelines.yaml)

name: $(Build.SourceBranchName)-$(Build.SourceVersion)-$(Rev:r)

trigger:
branches:
include:
- main
- release/*

pr:
branches:
include:
- main
- release/*

parameters:
- name: macTestAgentsUseCleanImages # Test agents we do not need to clean up when finished because they are not reused
default: true

# Repository resources - checkout android-tools to force multi-repo checkout behavior
resources:
repositories:
- repository: android-tools
type: github
name: dotnet/android-tools
endpoint: public
ref: refs/heads/main

# Global variables
variables:
- template: /build-tools/automation/yaml-templates/variables.yaml@self
# Override for public pipeline
- name: DefaultJavaSdkMajorVersion
value: 21
# Override pool images for public Microsoft-hosted agents
- name: HostedMacImage
value: macOS-14
- name: LinuxPoolImage
value: ubuntu-22.04
- name: NetCorePublicPoolName
value: NetCore-Public
- name: WindowsPoolImageNetCorePublic
value: windows.vs2022.amd64.open
- name: LinuxPoolImageNetCorePublic
value: build.Ubuntu.2204.amd64.open

# Public builds don't use 1ES templates - just plain stages
stages:
# macOS Build Stage
- stage: mac_build
displayName: Mac
jobs:
- job: mac_build_create_installers
displayName: macOS > Build
pool:
name: Azure Pipelines
vmImage: $(HostedMacImage)
os: macOS
timeoutInMinutes: 240
cancelTimeoutInMinutes: 5
workspace:
clean: all
steps:
- checkout: self
path: s/android
persistCredentials: false

# Checkout a second repo to force multi-repo checkout behavior
# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path
- checkout: android-tools
path: s/android-tools

- template: /build-tools/automation/yaml-templates/build-macos-steps.yaml
parameters:
xaSourcePath: $(System.DefaultWorkingDirectory)/android
installerArtifactName: $(InstallerArtifactName)
nugetArtifactName: $(NuGetArtifactName)
testAssembliesArtifactName: $(TestAssembliesArtifactName)
windowsToolchainPdbArtifactName: $(WindowsToolchainPdbArtifactName)
buildResultArtifactName: Build Results - macOS
use1ESTemplate: false

# Windows Build Stage
- stage: win_build_test
displayName: Windows
dependsOn: []
jobs:
- job: win_build_test
displayName: Windows > Build & Smoke Test
pool:
name: $(NetCorePublicPoolName)
demands:
- ImageOverride -equals $(WindowsPoolImageNetCorePublic)
timeoutInMinutes: 240
steps:
- checkout: self
persistCredentials: false

- template: /build-tools/automation/yaml-templates/build-windows-steps.yaml
parameters:
buildResultArtifactName: Build Results - Windows
use1ESTemplate: false

# Linux Build Stage
- stage: linux_build
displayName: Linux
dependsOn: []
jobs:
- job: linux_build_create_sdk_pack
displayName: Linux > Build
pool:
name: $(NetCorePublicPoolName)
demands:
- ImageOverride -equals $(LinuxPoolImageNetCorePublic)
timeoutInMinutes: 240
workspace:
clean: all
variables:
CXX: g++-10
CC: gcc-10
steps:
- checkout: self
path: s/android
persistCredentials: false

# Checkout a second repo to force multi-repo checkout behavior
- checkout: android-tools
path: s/android-tools

- script: |
sudo apt-get update
sudo apt-get install -y g++-10 gcc-10
displayName: install g++-10 and gcc-10

- template: /build-tools/automation/yaml-templates/build-linux-steps.yaml
parameters:
buildResultArtifactName: Build Results - Linux
xaSourcePath: $(System.DefaultWorkingDirectory)/android
nugetArtifactName: $(LinuxNuGetArtifactName)
use1ESTemplate: false

# Package Tests Stage
- template: /build-tools/automation/yaml-templates/stage-package-tests.yaml
parameters:
macTestAgentsUseCleanImages: ${{ parameters.macTestAgentsUseCleanImages }}
use1ESTemplate: false

# Linux Tests Stage
- stage: linux_tests
displayName: Linux Tests
dependsOn:
- mac_build
- linux_build
jobs:
- job: linux_tests_smoke_1
displayName: Linux > Tests > MSBuild 1
pool:
name: $(NetCorePublicPoolName)
demands:
- ImageOverride -equals $(LinuxPoolImageNetCorePublic)
timeoutInMinutes: 180
workspace:
clean: all
steps:
- template: /build-tools/automation/yaml-templates/setup-test-environment-public.yaml
parameters:
useAgentJdkPath: false
use1ESTemplate: false

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux BuildTest
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = BuildTest"

- template: /build-tools/automation/yaml-templates/upload-results.yaml
parameters:
configuration: $(XA.Build.Configuration)
artifactName: Test Results - MSBuild - Linux 1
use1ESTemplate: false

- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml

- job: linux_tests_smoke_2
displayName: Linux > Tests > MSBuild 2
pool:
name: $(NetCorePublicPoolName)
demands:
- ImageOverride -equals $(LinuxPoolImageNetCorePublic)
timeoutInMinutes: 180
workspace:
clean: all
steps:
- template: /build-tools/automation/yaml-templates/setup-test-environment-public.yaml
parameters:
useAgentJdkPath: false
use1ESTemplate: false

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux PackagingTest
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = PackagingTest"

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux XASdkTests
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = XASdkTests & Name != XamarinLegacySdk"

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml
parameters:
testRunTitle: Xamarin.Android.Build.Tests - Linux AndroidDependenciesTests
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
dotNetTestExtraArgs: --filter "Name = AndroidDependenciesTests"

- task: ShellScript@2
displayName: Test dotnet-local.sh
inputs:
scriptPath: dotnet-local.sh
args: build samples/HelloWorld/HelloWorld/HelloWorld.DotNet.csproj

- template: /build-tools/automation/yaml-templates/upload-results.yaml
parameters:
configuration: $(XA.Build.Configuration)
artifactName: Test Results - MSBuild - Linux 2
use1ESTemplate: false

- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml

# MSBuild Tests Stage
- stage: msbuild_dotnet
displayName: MSBuild Tests
dependsOn: mac_build
jobs:
- job: mac_msbuild_tests
strategy:
parallel: 10
displayName: macOS > Tests > MSBuild
pool:
name: Azure Pipelines
vmImage: $(HostedMacImage)
os: macOS
timeoutInMinutes: 240
cancelTimeoutInMinutes: 5
steps:
- template: /build-tools/automation/yaml-templates/setup-test-environment-public.yaml
parameters:
installTestSlicer: true
use1ESTemplate: false

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: /build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml
parameters:
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
testFilter: ''
testRunTitle: Xamarin.Android.Build.Tests - macOS
retryFailedTests: false
xaSourcePath: $(System.DefaultWorkingDirectory)

- template: /build-tools/automation/yaml-templates/upload-results.yaml
parameters:
artifactName: Test Results - MSBuild - macOS-$(System.JobPositionInPhase)
xaSourcePath: $(System.DefaultWorkingDirectory)
use1ESTemplate: false

- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml
parameters:
condition: true

- job: win_msbuild_tests
strategy:
parallel: 8
displayName: Windows > Tests > MSBuild
pool:
name: $(NetCorePublicPoolName)
demands:
- ImageOverride -equals $(WindowsPoolImageNetCorePublic)
timeoutInMinutes: 240
cancelTimeoutInMinutes: 5
steps:
- script: netsh int ipv4 set global sourceroutingbehavior=drop

- template: /build-tools/automation/yaml-templates/kill-processes.yaml

- template: /build-tools/automation/yaml-templates/clean.yaml

- template: /build-tools/automation/yaml-templates/setup-test-environment-public.yaml
parameters:
useAgentJdkPath: false
installTestSlicer: true
use1ESTemplate: false

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: /build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml
parameters:
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/$(DotNetStableTargetFramework)/Xamarin.Android.Build.Tests.dll
testFilter: ''
testRunTitle: Xamarin.Android.Build.Tests - Windows
retryFailedTests: false
xaSourcePath: $(System.DefaultWorkingDirectory)

- template: /build-tools/automation/yaml-templates/upload-results.yaml
parameters:
artifactName: Test Results - MSBuild - Windows-$(System.JobPositionInPhase)
xaSourcePath: $(System.DefaultWorkingDirectory)
use1ESTemplate: false

- template: /build-tools/automation/yaml-templates/fail-on-issue.yaml
parameters:
condition: true
Loading
Loading