Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@ on:
branches:
- master
- 6.[0-9]+
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/build.yml'
pull_request:
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- 'CMakeLists.txt'
- '.github/workflows/build.yml'
workflow_dispatch:

defaults:
Expand All @@ -33,8 +21,30 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
changes:
name: Detect relevant changes
runs-on: ubuntu-latest
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
# paths-filter needs a checkout for push events; on PRs it uses the API
- uses: actions/checkout@v6.0.2

- uses: dorny/paths-filter@v4.0.3
id: filter
with:
filters: |
relevant:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/build.yml'

build:
name: ${{ matrix.name }}
needs: changes
if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ${{ matrix.os }}

env:
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/code-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,35 @@ on:
branches:
- master
- '[0-9]+.[0-9]+'
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'
pull_request:
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'
workflow_dispatch:

name: Code Validator

jobs:
changes:
name: Detect relevant changes
runs-on: ubuntu-latest
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
# paths-filter needs a checkout for push events; on PRs it uses the API
- uses: actions/checkout@v6.0.2

- uses: dorny/paths-filter@v4.0.3
id: filter
with:
filters: |
relevant:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'

code-validator:
name: Code Validator
needs: changes
if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand Down
37 changes: 25 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,7 @@ on:
branches:
- master
- 6.[0-9]+
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/docker.yml'
pull_request:
paths:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/docker.yml'
workflow_dispatch:

defaults:
Expand All @@ -38,8 +26,33 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
changes:
name: Detect relevant changes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read # required by dorny/paths-filter on pull_request events
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
# paths-filter needs a checkout for push events; on PRs it uses the API
- uses: actions/checkout@v6.0.2

- uses: dorny/paths-filter@v4.0.3
id: filter
with:
filters: |
relevant:
- 'ci/**'
- 'cmake/**'
- 'src/**'
- '**/CMakeLists.txt'
- '.github/workflows/docker.yml'

docker:
name: ${{ matrix.image }}
needs: changes
if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
Expand Down
34 changes: 22 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@ on:
branches:
- master
- 6.[0-9]+
paths:
- 'src/**'
- 'test/**'
- 'doc/examples/**'
- 'doc/scripts/**'
- '.github/workflows/tests.yml'
pull_request:
paths:
- 'src/**'
- 'test/**'
- 'doc/examples/**'
- 'doc/scripts/**'
- '.github/workflows/tests.yml'
workflow_dispatch:

defaults:
Expand All @@ -33,8 +21,30 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
changes:
name: Detect relevant changes
runs-on: ubuntu-latest
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
# paths-filter needs a checkout for push events; on PRs it uses the API
- uses: actions/checkout@v6.0.2

- uses: dorny/paths-filter@v4.0.3
id: filter
with:
filters: |
relevant:
- 'src/**'
- 'test/**'
- 'doc/examples/**'
- 'doc/scripts/**'
- '.github/workflows/tests.yml'

test:
name: ${{ matrix.name }}
needs: changes
if: needs.changes.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch'
runs-on: ${{ matrix.os }}

env:
Expand Down
Loading