From df46d089d545bbb25cce9e01f94c154e3124917d Mon Sep 17 00:00:00 2001 From: Rahul Pandey <103115900+rp9-next@users.noreply.github.com> Date: Fri, 16 Feb 2024 09:10:30 +0000 Subject: [PATCH] ICU-22314 Refactor Azure CI into workflows conditional on modified paths See #2701 --- ...pelines.yml => .azure-pipelines-icu4c.yml} | 31 +++++------------- .ci-builds/.azure-pipelines-icu4j.yml | 32 +++++++++++++++++++ 2 files changed, 40 insertions(+), 23 deletions(-) rename .ci-builds/{.azure-pipelines.yml => .azure-pipelines-icu4c.yml} (96%) create mode 100644 .ci-builds/.azure-pipelines-icu4j.yml diff --git a/.ci-builds/.azure-pipelines.yml b/.ci-builds/.azure-pipelines-icu4c.yml similarity index 96% rename from .ci-builds/.azure-pipelines.yml rename to .ci-builds/.azure-pipelines-icu4c.yml index ebcbe731916d..5fe1d8c7fda5 100644 --- a/.ci-builds/.azure-pipelines.yml +++ b/.ci-builds/.azure-pipelines-icu4c.yml @@ -1,31 +1,16 @@ # Azure Pipelines (VSTS) configuration for CI builds for ICU. +trigger: + paths: + include: + - icu4c/* + + variables: MAVEN_ARGS: '--show-version --no-transfer-progress' jobs: #------------------------------------------------------------------------- -- job: ICU4J_OpenJDK_Ubuntu_2204 - displayName: 'J: Linux OpenJDK (Ubuntu 22.04)' - timeoutInMinutes: 20 - pool: - vmImage: 'ubuntu-22.04' - demands: ant - steps: - - checkout: self - lfs: true - fetchDepth: 10 - - script: | - echo "Building ICU4J" && cd icu4j && mvn install - displayName: 'Build and Test' - env: - BUILD: ICU4J - # exit with a non-zero status in order to make this step show as a red X in the UI. - - script: | - cd icu4j && cat `find . -name surefire-reports -type d -exec grep -l -r --include="*.txt" FAILED {} \;` && exit 1 - condition: failed() # only run if the build fails. - displayName: 'List failures (if any)' -#------------------------------------------------------------------------- - job: ICU4C_Clang_Ubuntu_2204 displayName: 'C: Linux Clang (Ubuntu 22.04)' timeoutInMinutes: 30 @@ -587,11 +572,11 @@ jobs: - task: Cache@2 displayName: 'Restore Cygwin cache' inputs: - # Use the contents of the file ".azure-pipelines.yml" as part of the key, as that contains the list of CYG_PACKAGES. + # Use the contents of the file ".azure-pipelines-icu4c.yml" as part of the key, as that contains the list of CYG_PACKAGES. # Also include the Cygwin version as part of the key. If we want to use a newer version of Cygwin, we can update CYG_VERSION_KEY. # Note: CYG_VERSION_KEY may become out of sync with (older than) the version we actually use if we update this file # without updating CYG_VERSION_KEY. Any updates to this file guarantees that we're using the latest version. - key: '"$(CYG_VERSION_KEY)" | .ci-builds/.azure-pipelines.yml' + key: '"$(CYG_VERSION_KEY)" | .ci-builds/.azure-pipelines-icu4c.yml' path: "$(CYG_CACHE)" - task: PowerShell@2 displayName: 'Download Cygwin setup' diff --git a/.ci-builds/.azure-pipelines-icu4j.yml b/.ci-builds/.azure-pipelines-icu4j.yml new file mode 100644 index 000000000000..7221898fd32e --- /dev/null +++ b/.ci-builds/.azure-pipelines-icu4j.yml @@ -0,0 +1,32 @@ +# Azure Pipelines (VSTS) configuration for CI builds for ICU. + +trigger: + paths: + include: + - icu4j/* + +variables: + MAVEN_ARGS: '--show-version --no-transfer-progress' + +jobs: +#------------------------------------------------------------------------- +- job: ICU4J_OpenJDK_Ubuntu_2204 + displayName: 'J: Linux OpenJDK (Ubuntu 22.04)' + timeoutInMinutes: 20 + pool: + vmImage: 'ubuntu-22.04' + demands: ant + steps: + - checkout: self + lfs: true + fetchDepth: 10 + - script: | + echo "Building ICU4J" && cd icu4j && mvn install + displayName: 'Build and Test' + env: + BUILD: ICU4J + # exit with a non-zero status in order to make this step show as a red X in the UI. + - script: | + cd icu4j && cat `find . -name surefire-reports -type d -exec grep -l -r --include="*.txt" FAILED {} \;` && exit 1 + condition: failed() # only run if the build fails. + displayName: 'List failures (if any)'