From 5c2aa6109c3a5095e63be9fb44941c095da46bf6 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 13 Jun 2024 17:40:47 -0400 Subject: [PATCH 1/7] Testing public pipeline --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 46eb96e..3114a7a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -47,7 +47,7 @@ jobs: version: $(DotNetCoreVersion) - script: dotnet build Xamarin.Android.Tools.sln -bl:$(Build.ArtifactStagingDirectory)/build.binlog - displayName: 'Build solution Xamarin.Android.Tools.sln' + displayName: Build solution Xamarin.Android.Tools.sln - task: DotNetCoreCLI@2 displayName: 'Run Tests' From 060bb35a55b09281acd27b7ce05d8939f2e23ac7 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 14 Jun 2024 12:07:30 -0400 Subject: [PATCH 2/7] Update status badges --- README.md | 19 ++----------------- azure-pipelines.yaml | 4 ++-- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index fb3bf39..93efde7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # android-tools +[![Build Status](https://dev.azure.com/devdiv/DevDiv/_apis/build/status%2FXamarin%2FAndroid%2Fandroid-tools?branchName=main)](https://dev.azure.com/devdiv/DevDiv/_build/latest?definitionId=22338&branchName=main) **android-tools** is a repo to easily share code between the [xamarin-android][android] repo and the .NET for Android commercial tooling, @@ -7,20 +8,6 @@ submodule the entire **android** repo, which is gigantic. [android]: https://github.com/xamarin/xamarin-android -# Build Status - -| Platform | Status | -|-----------------------|--------| -| **macOS** | [![macOS Build Status][azure-macOS-icon]][azure-macOS-status] | -| **Windows** | [![Windows Build Status][azure-Windows-icon]][azure-Windows-status] | - - -[azure-macOS-icon]: https://dev.azure.com/xamarin/public/_apis/build/status/xamarin-android-tools -[azure-macOS-status]: https://dev.azure.com/xamarin/public/_build/latest?definitionId=3 -[azure-Windows-icon]: https://dev.azure.com/xamarin/public/_apis/build/status/xamarin-android-tools -[azure-Windows-status]: https://dev.azure.com/xamarin/public/_build/latest?definitionId=3 - - # Build Requirements **-android-tools** requires .NET 6 or later. @@ -71,7 +58,7 @@ The major version in the `nuget.version` file should be updated when a breaking The minor version should be updated when new functionality is added. The patch version will be automatically determined by the number of commits since the last version change. -Xamarin.Android.Tools.AndroidSdk nupkg files are produced for every build which occurrs on [Azure Devops](https://dev.azure.com/xamarin/Xamarin/_build?definitionId=2&_a=summary). +Xamarin.Android.Tools.AndroidSdk nupkg files are produced for every build which occurrs on [Azure Devops](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=22338). To download one of these packages, navigate to the build you are interested in and click on the `Artifacts` button. Alternatively, "unofficial" releases are currently hosted on the [Xamarin.Android](https://dev.azure.com/xamarin/public/_packaging?_a=feed&feed=Xamarin.Android) feed. @@ -85,8 +72,6 @@ Add the feed to your project's `NuGet.config` to reference these packages: ``` -An Azure Pipelines [Release ](https://dev.azure.com/xamarin/public/_release?view=mine&_a=releases&definitionId=12) can be manually triggered to push a new version to this feed. - # Mailing Lists To discuss this project, and participate in the design, we use the diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3114a7a..bac2723 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -1,4 +1,4 @@ -name: Android.Tools $(Rev:r) +name: android-tools $(Rev:r) trigger: - main @@ -47,7 +47,7 @@ jobs: version: $(DotNetCoreVersion) - script: dotnet build Xamarin.Android.Tools.sln -bl:$(Build.ArtifactStagingDirectory)/build.binlog - displayName: Build solution Xamarin.Android.Tools.sln + displayName: 'Build solution Xamarin.Android.Tools.sln' - task: DotNetCoreCLI@2 displayName: 'Run Tests' From 806b4d38c92740f5feeda9c66670cad73dad7b3d Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 14 Jun 2024 12:17:08 -0400 Subject: [PATCH 3/7] Update pipeline --- azure-pipelines.yaml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index bac2723..45344e0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -10,7 +10,7 @@ pr: parameters: - name: ApiScanSourceBranch - default: 'refs/heads/main' + default: refs/heads/main # Global variables variables: @@ -21,22 +21,17 @@ jobs: - job: build displayName: Build and Test timeoutInMinutes: 60 - cancelTimeoutInMinutes: 2 - strategy: matrix: macOS: - vmImage: macOS-12 + vmImage: macOS-13 windows: vmImage: windows-2022 Codeql.Enabled: true - pool: vmImage: $(vmImage) - workspace: clean: all - steps: - checkout: self clean: true @@ -46,11 +41,14 @@ jobs: inputs: version: $(DotNetCoreVersion) - - script: dotnet build Xamarin.Android.Tools.sln -bl:$(Build.ArtifactStagingDirectory)/build.binlog - displayName: 'Build solution Xamarin.Android.Tools.sln' + - task: DotNetCoreCLI@2 + displayName: Build solution Xamarin.Android.Tools.sln + inputs: + projects: Xamarin.Android.sln + arguments: -bl:$(Build.ArtifactStagingDirectory)/build.binlog - task: DotNetCoreCLI@2 - displayName: 'Run Tests' + displayName: Run Tests inputs: command: test projects: bin/TestDebug-net*/**/*-Tests.dll @@ -63,8 +61,12 @@ jobs: Write-Host "##vso[task.setvariable variable=xat.nuget.version]$version" condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) - - script: dotnet pack src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog - displayName: 'Build NuGet' + - task: DotNetCoreCLI@2 + displayName: Build NuGet + inputs: + command: pack + projects: src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj + arguments: -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) - task: PublishPipelineArtifact@1 From bd67bcdcff071b1e525a65cdfaf7ea90cb644494 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 14 Jun 2024 12:50:14 -0400 Subject: [PATCH 4/7] Fix solution name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 45344e0..978051a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -44,7 +44,7 @@ jobs: - task: DotNetCoreCLI@2 displayName: Build solution Xamarin.Android.Tools.sln inputs: - projects: Xamarin.Android.sln + projects: Xamarin.Android.Tools.sln arguments: -bl:$(Build.ArtifactStagingDirectory)/build.binlog - task: DotNetCoreCLI@2 From 9e55f16de6c6508a202590d4b80e7b8e457009c4 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 14 Jun 2024 13:51:36 -0400 Subject: [PATCH 5/7] Fix pack passing arguments --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 978051a..96aef31 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -64,9 +64,9 @@ jobs: - task: DotNetCoreCLI@2 displayName: Build NuGet inputs: - command: pack + command: custom projects: src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj - arguments: -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog + arguments: pack -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) - task: PublishPipelineArtifact@1 From 4c6eca09549ca12a66de665b0f4ea00f988d1dba Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 14 Jun 2024 13:55:08 -0400 Subject: [PATCH 6/7] Fix custom pack arguments param name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 96aef31..a283230 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -66,7 +66,7 @@ jobs: inputs: command: custom projects: src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj - arguments: pack -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog + custom: pack -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) - task: PublishPipelineArtifact@1 From b94bd80e27dec82398441a39b7360708eb9afefe Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Fri, 14 Jun 2024 14:10:32 -0400 Subject: [PATCH 7/7] Pack argument update take 2 --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a283230..7c83e8f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -66,7 +66,8 @@ jobs: inputs: command: custom projects: src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj - custom: pack -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog + custom: pack + arguments: -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) - task: PublishPipelineArtifact@1