From 99f7d53f715557d5cc15e218795ca9219611f973 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 1 Nov 2023 15:53:24 -0400 Subject: [PATCH 1/3] Test build from fork with no token --- build-tools/automation/azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 3488fb0bbb2..3b45aab894b 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -112,6 +112,8 @@ stages: artifactName: $(TestAssembliesArtifactName) downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) + - script: echo hello world + # Set up dependencies to run tests in both debug and release configurations - task: DotNetCoreCLI@2 displayName: build Xamarin.Android.Tools.BootstrapTasks.csproj From f7b08679473d2daee63a9f321815fbf46aeaf3e3 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 1 Nov 2023 16:33:25 -0400 Subject: [PATCH 2/3] Fixes --- build-tools/automation/azure-pipelines.yaml | 2 -- .../yaml-templates/build-linux.yaml | 25 ++++++++++--------- .../yaml-templates/commercial-build.yaml | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index 3b45aab894b..3488fb0bbb2 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -112,8 +112,6 @@ stages: artifactName: $(TestAssembliesArtifactName) downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration) - - script: echo hello world - # Set up dependencies to run tests in both debug and release configurations - task: DotNetCoreCLI@2 displayName: build Xamarin.Android.Tools.BootstrapTasks.csproj diff --git a/build-tools/automation/yaml-templates/build-linux.yaml b/build-tools/automation/yaml-templates/build-linux.yaml index 12ea459a70e..16703009f4f 100644 --- a/build-tools/automation/yaml-templates/build-linux.yaml +++ b/build-tools/automation/yaml-templates/build-linux.yaml @@ -40,15 +40,20 @@ stages: path: ${{ parameters.checkoutPath }} persistCredentials: ${{ parameters.checkoutPersistCredentials }} - - checkout: monodroid - clean: true - submodules: recursive - path: s/xamarin-android/external/monodroid - persistCredentials: true + - ${{ if ne(variables['System.PullRequest.IsFork'], 'True') }}: + - checkout: monodroid + clean: true + submodules: recursive + path: s/xamarin-android/external/monodroid + persistCredentials: true - - script: rm -rf external/monodroid/external/xamarin-android - workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android - displayName: delete external xamarin-android submodule + - script: rm -rf external/monodroid/external/xamarin-android + workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android + displayName: delete external xamarin-android submodule + + - script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration) + workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android + displayName: make prepare-external-git-dependencies - template: setup-ubuntu.yaml @@ -57,10 +62,6 @@ stages: inputs: forceReinstallCredentialProvider: true - - script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration) - workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android - displayName: make prepare-external-git-dependencies - - script: make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration) workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android displayName: make jenkins diff --git a/build-tools/automation/yaml-templates/commercial-build.yaml b/build-tools/automation/yaml-templates/commercial-build.yaml index 5a84b5b119b..59a2dd2f10b 100644 --- a/build-tools/automation/yaml-templates/commercial-build.yaml +++ b/build-tools/automation/yaml-templates/commercial-build.yaml @@ -24,7 +24,7 @@ steps: # Always checkout a second resource to ensure we are using multi-repo checkout behavior # https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path -- checkout: yaml-templates +- checkout: maui - script: > ls -l /Applications && From 6da398f9950e1523269ea5eeadda38a08ece67b6 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 1 Nov 2023 16:46:06 -0400 Subject: [PATCH 3/3] Add multirepo checkout to linux --- build-tools/automation/yaml-templates/build-linux.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-tools/automation/yaml-templates/build-linux.yaml b/build-tools/automation/yaml-templates/build-linux.yaml index 16703009f4f..859ab2b4b46 100644 --- a/build-tools/automation/yaml-templates/build-linux.yaml +++ b/build-tools/automation/yaml-templates/build-linux.yaml @@ -40,6 +40,10 @@ stages: path: ${{ parameters.checkoutPath }} persistCredentials: ${{ parameters.checkoutPersistCredentials }} + # Always checkout a second resource to ensure we are using multi-repo checkout behavior + # https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path + - checkout: maui + - ${{ if ne(variables['System.PullRequest.IsFork'], 'True') }}: - checkout: monodroid clean: true