From e8963251be2795ad87d55b424e70f351226fcb5b Mon Sep 17 00:00:00 2001 From: Tom M Date: Mon, 10 May 2021 23:19:24 +0200 Subject: [PATCH] Avoid unnecessary pipeline runs (#885) Pipelines should not be triggered when other pipelines are modified. This saves many resources when messing around with a single pipeline, because other pipelines won't run. --- .azure/azure-pipelines-android.yml | 15 +++++++++++++++ .azure/azure-pipelines-mac.yml | 18 ++++++++++++++---- .azure/azure-pipelines-vcpkg.yml | 14 ++++++++++++++ .azure/azure-pipelines-win.yml | 18 ++++++++++++++---- .github/workflows/linux.yml | 10 +++++++++- .github/workflows/sonarcloud.yml | 8 +++++++- 6 files changed, 73 insertions(+), 10 deletions(-) diff --git a/.azure/azure-pipelines-android.yml b/.azure/azure-pipelines-android.yml index fa02722e..7f3b71c7 100644 --- a/.azure/azure-pipelines-android.yml +++ b/.azure/azure-pipelines-android.yml @@ -1,3 +1,18 @@ + +trigger: + paths: + include: + - '*' + exclude: + - '.azure/azure-pipelines-mac.yml' + - '.azure/azure-pipelines-vcpkg.yml' + - '.azure/azure-pipelines-win.yml' + - '.circleci/config.yml' + - '.github/workflows/linux.yml' + - '.github/workflows/sonarcloud.yml' + - '.cirrus.yml' + - 'README.md' + parameters: - name: UseCache displayName: Use Dependency Cache diff --git a/.azure/azure-pipelines-mac.yml b/.azure/azure-pipelines-mac.yml index 66ac937d..d9903239 100644 --- a/.azure/azure-pipelines-mac.yml +++ b/.azure/azure-pipelines-mac.yml @@ -1,7 +1,17 @@ -# C/C++ with GCC -# Build your C/C++ project with GCC using make. -# Add steps that publish test results, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc + +trigger: + paths: + include: + - '*' + exclude: + - '.azure/azure-pipelines-android.yml' + - '.azure/azure-pipelines-vcpkg.yml' + - '.azure/azure-pipelines-win.yml' + - '.circleci/config.yml' + - '.github/workflows/linux.yml' + - '.github/workflows/sonarcloud.yml' + - '.cirrus.yml' + - 'README.md' jobs: - job: macOS diff --git a/.azure/azure-pipelines-vcpkg.yml b/.azure/azure-pipelines-vcpkg.yml index f2de1339..050abb6f 100644 --- a/.azure/azure-pipelines-vcpkg.yml +++ b/.azure/azure-pipelines-vcpkg.yml @@ -1,4 +1,18 @@ +trigger: + paths: + include: + - '*' + exclude: + - '.azure/azure-pipelines-android.yml' + - '.azure/azure-pipelines-mac.yml' + - '.azure/azure-pipelines-win.yml' + - '.circleci/config.yml' + - '.github/workflows/linux.yml' + - '.github/workflows/sonarcloud.yml' + - '.cirrus.yml' + - 'README.md' + variables: toolset: 'v142' generator: 'Visual Studio 16 2019' diff --git a/.azure/azure-pipelines-win.yml b/.azure/azure-pipelines-win.yml index 594d1cb6..7ca59cf2 100644 --- a/.azure/azure-pipelines-win.yml +++ b/.azure/azure-pipelines-win.yml @@ -1,7 +1,17 @@ -# C/C++ with GCC -# Build your C/C++ project with GCC using make. -# Add steps that publish test results, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc + +trigger: + paths: + include: + - '*' + exclude: + - '.azure/azure-pipelines-android.yml' + - '.azure/azure-pipelines-mac.yml' + - '.azure/azure-pipelines-vcpkg.yml' + - '.circleci/config.yml' + - '.github/workflows/linux.yml' + - '.github/workflows/sonarcloud.yml' + - '.cirrus.yml' + - 'README.md' jobs: - job: WindowsXP diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 78ab68d0..19f6a638 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,6 +1,14 @@ name: FluidSynth Linux -on: [push, pull_request] +on: + pull_request: + push: + paths-ignore: + - '.azure/**' + - '.circleci/**' + - '.github/workflows/sonarcloud.yml' + - '.cirrus.yml' + - 'README.md' env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 05d70a48..9de8b19e 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -4,9 +4,15 @@ on: push: branches: - master + paths-ignore: + - '.azure/**' + - '.circleci/**' + - '.github/workflows/linux.yml' + - '.cirrus.yml' + - 'README.md' pull_request: types: [opened, synchronize, reopened] - + env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # Use Debug build for better code coverage results