Skip to content

Commit

Permalink
More agressive skipping of duplicate workflows (#50042)
Browse files Browse the repository at this point in the history
* More agressive skipping of duplicate workflows
  • Loading branch information
kevingranade authored Jul 19, 2021
1 parent 91dccb2 commit 8d53c58
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 43 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/CBA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,30 @@ on:
push:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
- '**.c'
- '**/CMakeLists.txt'
- '**/Makefile'
- '**.hpp'
- '**.cmake'
- '.github/workflows/CBA.yml'
pull_request:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
- '**.c'
- '**/CMakeLists.txt'
- '**/Makefile'
- '**.hpp'
- '**.cmake'
- '.github/workflows/CBA.yml'


jobs:
skip-duplicates:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '[ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", ".github/workflows/CBA.yml" ]'

build:
needs: skip-duplicates
if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' }}

runs-on: ubuntu-latest

runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/astyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '["**.cpp", "**.h", "**.c"]'
astyle-code:
name: astyle check
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/basic-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
skip-duplicates:
continue-on-error: false
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
Expand All @@ -19,6 +19,7 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
basic-build:
needs: skip-duplicates
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,28 @@ on:
push:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
- '**.c'
- '**/CMakeLists.txt'
- '**/Makefile'
- '**.hpp'
- '**.cmake'

pull_request:
branches:
- master
- 0.F-dev
paths:
- '**.cpp'
- '**.h'
- '**.c'
- '**/CMakeLists.txt'
- '**/Makefile'
- '**.hpp'
- '**.cmake'

jobs:
skip-duplicates:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '[ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake" ]'
build:
needs: skip-duplicates
if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' }}

runs-on: ubuntu-20.04
env:
CMAKE: 1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: pull_request

jobs:
skip-duplicates:
continue-on-error: false
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
Expand All @@ -13,6 +13,7 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths: '["**.json"]'
style-json:
name: JSON style check
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
skip-duplicates:
continue-on-error: false
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
Expand All @@ -19,6 +19,7 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
varied_builds:
needs: skip-duplicates
Expand Down

0 comments on commit 8d53c58

Please sign in to comment.