Skip to content

Commit

Permalink
CI: Run workflows based on changed files to save CI resources (#8445)
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored Apr 15, 2024
1 parent e493ccc commit a8c71e0
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 17 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
name: Build

on:
pull_request:
paths-ignore:
- 'doc/**'
- '!doc/**/CMakeLists.txt'
push:
branches:
- master
- 6.[0-9]+
paths-ignore:
- 'doc/**'
- '!doc/**/CMakeLists.txt'
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/build.yml'
pull_request:
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- 'CMakeLists.txt'
- '.github/workflows/build.yml'

defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Check Links
on:
# Uncomment the 'pull_request' line below to trigger the workflow in PR
# pull_request:
workflow_dispatch:
# Schedule runs on 12 noon every Sunday
schedule:
- cron: '0 12 * * 0'
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/code-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ on:
branches:
- master
- '[0-9]+.[0-9]+'
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'
pull_request:
paths-ignore:
- 'doc/**'
- '!doc/**/CMakeLists.txt'
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'

name: Code Validator

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ on:
- master
- 6.[0-9]+
paths:
- 'src/**'
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/docker.yml'
pull_request:
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/docker.yml'

defaults:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ on:
- master
- 6.[0-9]+
paths:
- 'doc/**'
- '.github/workflows/**'
- 'ci/**'
- 'doc/**'
- '**/CMakeLists.txt'
- '.github/workflows/docs.yml'
release:
types:
- published
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
on:
# enable pull request for debugging
# pull_request:
workflow_dispatch:
# Schedule runs daily
schedule:
- cron: '0 0 * * *'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/remind.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Reminders

on:
workflow_dispatch:
schedule:
- cron: '0 0 1 */6 *' # Runs at midnight on the 1st day every 6th month

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scm-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name: SCM Check
on:
# uncomment the 'pull_request' line to test the workflow in PRs
# pull_request:
workflow_dispatch:
schedule:
# weekly cron job
- cron: '0 0 * * 0'
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
name: Tests

on:
pull_request:
push:
branches:
- master
- 6.[0-9]+
paths:
- 'src/**'
- 'test/**'
- 'share/**'
- 'doc/examples/**'
- 'doc/scripts/**'
- '.github/workflows/**'
- 'ci/**'
- '.github/workflows/tests.yml'
pull_request:
paths:
- 'src/**'
- 'test/**'
- 'doc/examples/**'
- 'doc/scripts/**'
- '.github/workflows/tests.yml'

defaults:
run:
Expand Down

0 comments on commit a8c71e0

Please sign in to comment.