From 38d5dc70f24cb14b4588d24c3fec3306c1fb42fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimas=20Misevi=C4=8Dius?= Date: Tue, 3 Oct 2023 20:15:58 +0300 Subject: [PATCH] Limit when CI workflows are triggered * skip test workflows if only documentation is changed * skip Cirrus CI and AppVeyor workflows if only .github directory content is changed * avoid double testing --- .appveyor.yml | 9 +++++++++ .cirrus.yml | 4 +++- .github/workflows/static_analysis.yml | 7 ++++++- .github/workflows/test-macos.yml | 7 ++++++- .github/workflows/test-ubuntu.yml | 7 ++++++- .github/workflows/test-windows.yml | 7 ++++++- 6 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 35cfee4..e46ca70 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,3 +1,12 @@ +branches: + only: [ main ] + +skip_commits: + files: + - '.github/**/*' + - 'doc/**/*' + - '**/*.md' + environment: matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 diff --git a/.cirrus.yml b/.cirrus.yml index 9b1f827..c016d02 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,8 +1,10 @@ task: + skip: "changesIncludeOnly('.github/**' , 'doc/**', '**.md')" + name: FreeBSD freebsd_instance: matrix: - image_family: freebsd-13-1 + image_family: freebsd-13-2 image_family: freebsd-12-3 install_script: | pkg install -y cmake git diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 5c390d3..0bc8275 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -1,6 +1,11 @@ name: Static Analysis -on: [push, pull_request] +on: + push: + branches: [ main ] + paths-ignore: [ 'doc/**', '**.md' ] + pull_request: + paths-ignore: [ 'doc/**', '**.md' ] jobs: build: diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index c8bdff4..6db4342 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -1,6 +1,11 @@ name: macOS -on: [push, pull_request] +on: + push: + branches: [ main ] + paths-ignore: [ 'doc/**', '**.md' ] + pull_request: + paths-ignore: [ 'doc/**', '**.md' ] jobs: build: diff --git a/.github/workflows/test-ubuntu.yml b/.github/workflows/test-ubuntu.yml index ab04a68..8f00442 100644 --- a/.github/workflows/test-ubuntu.yml +++ b/.github/workflows/test-ubuntu.yml @@ -1,6 +1,11 @@ name: Ubuntu -on: [push, pull_request] +on: + push: + branches: [ main ] + paths-ignore: [ 'doc/**', '**.md' ] + pull_request: + paths-ignore: [ 'doc/**', '**.md' ] jobs: build: diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 1988cf3..239325d 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -1,6 +1,11 @@ name: Windows -on: [push, pull_request] +on: + push: + branches: [ main ] + paths-ignore: [ 'doc/**', '**.md' ] + pull_request: + paths-ignore: [ 'doc/**', '**.md' ] jobs: build: