From 328bd79eb8340b8958f567aaf5f8ffb81056cd36 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 24 Feb 2023 20:32:02 +0100 Subject: [PATCH] Add parameter to limit CI to selected triplets (#29738) * Add parameter to limit CI to selected triplets Pull requests which analyze the situation in a particular triplet, arch or platform may temporarily limit the triplets run in CI by overriding the default value of CI parameter 'tripletPattern'. * Add special chars for start and end * Proof of concept * Revert "Proof of concept" This reverts commit 326bd2632b7c7b5d2cff157e62ca557053254b6e. --- scripts/azure-pipelines/azure-pipelines.yml | 13 +++++++++++++ scripts/azure-pipelines/linux/azure-pipelines.yml | 5 +++++ scripts/azure-pipelines/osx/azure-pipelines.yml | 5 +++++ scripts/azure-pipelines/windows/azure-pipelines.yml | 5 +++++ 4 files changed, 28 insertions(+) diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 31aa830e7a..f47bb89416 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -11,6 +11,10 @@ parameters: displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap' type: string default: 'use default' + - name: tripletPattern + displayName: 'Enable triplets which contain this substring' + type: string + default: '' jobs: - template: windows/azure-pipelines.yml @@ -19,6 +23,7 @@ jobs: jobName: x86_windows poolName: $(windows-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: windows/azure-pipelines.yml parameters: @@ -26,6 +31,7 @@ jobs: jobName: x64_windows poolName: $(windows-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: windows/azure-pipelines.yml parameters: @@ -33,6 +39,7 @@ jobs: jobName: x64_windows_static poolName: $(windows-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: windows/azure-pipelines.yml parameters: @@ -40,6 +47,7 @@ jobs: jobName: x64_windows_static_md poolName: $(windows-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: windows/azure-pipelines.yml parameters: @@ -47,6 +55,7 @@ jobs: jobName: x64_uwp poolName: $(windows-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: windows/azure-pipelines.yml parameters: @@ -54,6 +63,7 @@ jobs: jobName: arm64_windows poolName: $(windows-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: windows/azure-pipelines.yml parameters: @@ -61,13 +71,16 @@ jobs: jobName: arm_uwp poolName: $(windows-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: osx/azure-pipelines.yml parameters: poolName: $(osx-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} - template: linux/azure-pipelines.yml parameters: poolName: $(linux-pool) vcpkgToolSha: ${{ parameters.vcpkgToolSha }} + tripletPattern: ${{ parameters.tripletPattern }} diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index 3b0d41be46..2b50cf3b6f 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -9,9 +9,14 @@ parameters: default: 'use default' - name: poolName type: string + - name: tripletPattern + displayName: 'Enable the triplets which contain this substring' + type: string + default: '' jobs: - job: x64_linux + condition: contains('^x64-linux$', '${{ parameters.tripletPattern }}') pool: name: ${{ parameters.poolName }} workspace: diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 4647b17c9e..332144e56f 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -9,9 +9,14 @@ parameters: default: 'use default' - name: poolName type: string + - name: tripletPattern + displayName: 'Enable the triplets which contain this substring' + type: string + default: '' jobs: - job: x64_osx + condition: contains('^x64-osx$', '${{ parameters.tripletPattern }}') pool: name: ${{ parameters.poolName }} workspace: diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index a06da2a2c6..3caf700ef6 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -15,9 +15,14 @@ parameters: default: 'x86_windows' - name: poolName type: string + - name: tripletPattern + displayName: 'Enable the triplets which contain this substring' + type: string + default: '' jobs: - job: ${{ parameters.jobName }} + condition: contains('^${{ parameters.triplet }}$', '${{ parameters.tripletPattern }}') pool: name: ${{ parameters.poolName }} workspace: