From 5a35d7eb98d612fe6b5de0b45c2e571c9efc3717 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 19 Sep 2024 18:18:01 +0200 Subject: [PATCH 1/4] Fix stuff --- tools/devops/automation/templates/tests/stage.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/devops/automation/templates/tests/stage.yml b/tools/devops/automation/templates/tests/stage.yml index 7b5649db6792..ccc2ffbd38fd 100644 --- a/tools/devops/automation/templates/tests/stage.yml +++ b/tools/devops/automation/templates/tests/stage.yml @@ -118,6 +118,13 @@ stages: matrix: $[ stageDependencies.configure_build.configure.outputs['test_matrix.TEST_MATRIX'] ] steps: + - bash: | + set +x + for repo in /Users/builder/azdo/_work/*/s/xamarin-macios; do cd $repo; git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"; done + for repo in /Users/builder/azdo/_work/*/s/xamarin-macios; do cd $repo; git fetch origin; done + displayName: 'Fix stuff' + name: FixStuff + - bash: | env | sort env From fbdc7dbd6948259776249a655357ff08a9b1f817 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 19 Sep 2024 18:19:23 +0200 Subject: [PATCH 2/4] Speed this up a bit. --- tools/devops/automation/templates/tests/stage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/devops/automation/templates/tests/stage.yml b/tools/devops/automation/templates/tests/stage.yml index ccc2ffbd38fd..99ece1a268f0 100644 --- a/tools/devops/automation/templates/tests/stage.yml +++ b/tools/devops/automation/templates/tests/stage.yml @@ -122,6 +122,7 @@ stages: set +x for repo in /Users/builder/azdo/_work/*/s/xamarin-macios; do cd $repo; git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"; done for repo in /Users/builder/azdo/_work/*/s/xamarin-macios; do cd $repo; git fetch origin; done + exit 1 displayName: 'Fix stuff' name: FixStuff From 98805844531e82bc8140a6aa4523f12cde616e66 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 20 Sep 2024 08:19:02 +0200 Subject: [PATCH 3/4] Hurry up --- .../automation/run-post-pr-build-tests.yml | 1 - .../templates/build/build-mac-tests.yml | 61 +------------------ .../automation/templates/tests/stage.yml | 4 +- 3 files changed, 4 insertions(+), 62 deletions(-) diff --git a/tools/devops/automation/run-post-pr-build-tests.yml b/tools/devops/automation/run-post-pr-build-tests.yml index 84d8d1e58e72..cd6441e5526e 100644 --- a/tools/devops/automation/run-post-pr-build-tests.yml +++ b/tools/devops/automation/run-post-pr-build-tests.yml @@ -11,7 +11,6 @@ resources: source: xamarin-macios-pr trigger: stages: - - build_packages - build_macos_tests extends: diff --git a/tools/devops/automation/templates/build/build-mac-tests.yml b/tools/devops/automation/templates/build/build-mac-tests.yml index 75d3b85db689..116878e6c522 100644 --- a/tools/devops/automation/templates/build/build-mac-tests.yml +++ b/tools/devops/automation/templates/build/build-mac-tests.yml @@ -31,62 +31,5 @@ parameters: default: '$(MaciosUploadPrefix)' steps: -- template: build.yml - parameters: - isPR: ${{ parameters.isPR }} - repositoryAlias: ${{ parameters.repositoryAlias }} - commit: ${{ parameters.commit }} - vsdropsPrefix: ${{ parameters.vsdropsPrefix }} - keyringPass: ${{ parameters.keyringPass }} - gitHubToken: ${{ parameters.gitHubToken }} - xqaCertPass: ${{ parameters.xqaCertPass }} - buildSteps: - - # funny enough we need these profiles to build the mac tests - - bash: '"$BUILD_SOURCESDIRECTORY"/maccore/tools/install-qa-provisioning-profiles.sh -v' - displayName: 'Add tests provisioning profiles' - timeoutInMinutes: 30 - continueOnError: true # should not stop the build will result in test failures but we do want the pkg - env: - AUTH_TOKEN_GITHUB_COM: ${{ parameters.gitHubToken }} - AUTH_TOKEN_LA_DEV_APPLE_P12: ${{ parameters.xqaCertPass }} - AUTH_TOKEN_LA_DISTR_APPLE_P12: ${{ parameters.xqaCertPass }} - AUTH_TOKEN_LA_MAC_INSTALLER_DISTR_P12: ${{ parameters.xqaCertPass }} - AUTH_TOKEN_VSENG_XAMARIN_MAC_DEVICES_P12: ${{ parameters.xqaCertPass }} - AUTH_TOKEN_VSENG_XAMARIN_MAC_DEVICES_2_P12: ${{ parameters.xqaCertPass }} - - - bash: | - set -x - set -e - - make -C $(Build.SourcesDirectory)/xamarin-macios/tests package-tests - - if test -f "$(Build.SourcesDirectory)/xamarin-macios/tests/mac-test-package.7z"; then - set +x - echo "##vso[artifact.upload containerfolder=mac-test-package;artifactname=${{ parameters.uploadPrefix }}mac-test-package]$(Build.SourcesDirectory)/xamarin-macios/tests/mac-test-package.7z" - set -x - fi - - name: macTestPkg - displayName: 'Package macOS tests' - condition: and(succeeded(), contains(variables['RUN_MAC_TESTS'], 'true')) - timeoutInMinutes: 60 - - - ${{ if eq(parameters.uploadBinlogs, true) }}: - # Copy all the binlogs to a separate directory, keeping directory structure. - - script: | - set -x - mkdir -p $(Build.ArtifactStagingDirectory)/mactests-binlogs - rsync -av --prune-empty-dirs --include '*/' --include '*.binlog' --exclude '*' $(Build.SourcesDirectory)/xamarin-macios $(Build.ArtifactStagingDirectory)/mactests-binlogs - displayName: Copy all binlogs - continueOnError: true - condition: succeededOrFailed() - - # Publish all the binlogs we collected in the previous step - - task: 1ES.PublishPipelineArtifact@1 - displayName: 'Publish Artifact: All binlogs' - inputs: - path: $(Build.ArtifactStagingDirectory)/mactests-binlogs - artifact: '${{ parameters.uploadPrefix }}mactests-binlogs-$(Build.BuildId)-$(System.StageAttempt)-$(System.JobAttempt)' - continueOnError: true - condition: succeededOrFailed() +- bash: echo "Let's do this real quick" + displayName: "Hurry up" diff --git a/tools/devops/automation/templates/tests/stage.yml b/tools/devops/automation/templates/tests/stage.yml index 99ece1a268f0..6ff9c53e4c5b 100644 --- a/tools/devops/automation/templates/tests/stage.yml +++ b/tools/devops/automation/templates/tests/stage.yml @@ -119,8 +119,8 @@ stages: steps: - bash: | - set +x - for repo in /Users/builder/azdo/_work/*/s/xamarin-macios; do cd $repo; git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"; done + set -x + for repo in /Users/builder/azdo/_work/*/s/xamarin-macios; do echo $repo; cd $repo; ls -la; git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" || true; done for repo in /Users/builder/azdo/_work/*/s/xamarin-macios; do cd $repo; git fetch origin; done exit 1 displayName: 'Fix stuff' From ffce071af06a98e493ff1d902baa91ece6ad7b31 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 20 Sep 2024 08:46:18 +0200 Subject: [PATCH 4/4] More speedup --- tools/devops/automation/templates/tests/stage.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/devops/automation/templates/tests/stage.yml b/tools/devops/automation/templates/tests/stage.yml index 6ff9c53e4c5b..51d90980023e 100644 --- a/tools/devops/automation/templates/tests/stage.yml +++ b/tools/devops/automation/templates/tests/stage.yml @@ -80,8 +80,6 @@ stages: - stage: ${{ parameters.stageName }} displayName: ${{ parameters.displayName }} dependsOn: - - ${{ if eq(parameters.postPipeline, false) }}: - - build_packages - configure_build # we need to have the pkgs built and the device sets to be ran, that is decided via the labels or type of build during the build_packages stage condition: and(succeeded(), ${{ parameters.condition }})