From 523af87e34161dfb989b38ef97c2d62b58b258c2 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Fri, 7 Jun 2024 13:13:32 -0500 Subject: [PATCH] build: add a caching copy of the CI pipeline (#17392) This is a place for @dfederm to work, but I couldn't create the pipeline definition without first creating the yml file _in main_. Thanks SFI. --- build/pipelines/ci-caching.yml | 96 ++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 build/pipelines/ci-caching.yml diff --git a/build/pipelines/ci-caching.yml b/build/pipelines/ci-caching.yml new file mode 100644 index 00000000000..25e50a114f3 --- /dev/null +++ b/build/pipelines/ci-caching.yml @@ -0,0 +1,96 @@ +trigger: + batch: true +# branches: +# include: +# - main +# - feature/* +# - gh-readonly-queue/* +# paths: +# exclude: +# - doc/* +# - samples/* +# - tools/* + +#pr: +# branches: +# include: +# - main +# - feature/* +# paths: +# exclude: +# - doc/* +# - samples/* +# - tools/* + +variables: + - name: runCodesignValidationInjectionBG + value: false + +# 0.0.yyMM.dd## +# 0.0.1904.0900 +name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr) + +parameters: + - name: auditMode + displayName: "Build in Audit Mode (x64)" + type: boolean + default: true + - name: runTests + displayName: "Run Tests" + type: boolean + default: true + - name: buildPlatforms + type: object + default: + - x64 + - x86 + - arm64 + +stages: + - ${{ if eq(parameters.auditMode, true) }}: + - stage: Audit_x64 + displayName: Audit Mode + dependsOn: [] + jobs: + - template: ./templates-v2/job-build-project.yml + parameters: + pool: + ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}: + name: SHINE-OSS-L + ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}: + name: SHINE-INT-L + buildPlatforms: [x64] + buildConfigurations: [AuditMode] + buildEverything: true + keepAllExpensiveBuildOutputs: false + + - ${{ each platform in parameters.buildPlatforms }}: + - stage: Build_${{ platform }} + displayName: Build ${{ platform }} + dependsOn: [] + jobs: + - template: ./templates-v2/job-build-project.yml + parameters: + pool: + ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}: + name: SHINE-OSS-L + ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}: + name: SHINE-INT-L + buildPlatforms: + - ${{ platform }} + buildConfigurations: [Release] + buildEverything: true + keepAllExpensiveBuildOutputs: false + + - ${{ if eq(parameters.runTests, true) }}: + - stage: Test_${{ platform }} + displayName: Test ${{ platform }} + dependsOn: + - Build_${{ platform }} + condition: succeeded() + jobs: + - template: ./templates-v2/job-test-project.yml + parameters: + platform: ${{ platform }} + # The tests might be run more than once; log one artifact per attempt. + outputArtifactStem: -$(System.JobAttempt)