Skip to content

Commit ce848b2

Browse files
committed
ci: skip FP stability and convergence when no relevant files changed
Add a file-changes job (dorny/paths-filter) to both workflows so they skip on PRs that only touch docs, CI config, or other non-code files. Also register both workflow files in file-filter.yml so changes to them trigger a run.
1 parent 76cb3b6 commit ce848b2

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/file-filter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ yml: &yml
3030
- '.github/workflows/bench.yml'
3131
- '.github/workflows/test.yml'
3232
- '.github/workflows/formatting.yml'
33+
- '.github/workflows/fp-stability.yml'
34+
- '.github/workflows/convergence.yml'
3335

3436
checkall: &checkall
3537
- *fortran_src

.github/workflows/convergence.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,36 @@ on:
44
push:
55
branches: [master]
66
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
78
workflow_dispatch:
89

910
env:
1011
OMPI_MCA_rmaps_base_oversubscribe: 1
1112

1213
jobs:
14+
file-changes:
15+
name: Detect File Changes
16+
runs-on: ubuntu-latest
17+
outputs:
18+
checkall: ${{ steps.changes.outputs.checkall }}
19+
steps:
20+
- name: Clone
21+
uses: actions/checkout@v4
22+
23+
- name: Detect Changes
24+
uses: dorny/paths-filter@v3
25+
id: changes
26+
with:
27+
filters: ".github/file-filter.yml"
28+
1329
convergence:
1430
name: "Convergence"
1531
runs-on: ubuntu-latest
32+
needs: [file-changes]
33+
if: >-
34+
!cancelled() &&
35+
needs.file-changes.result == 'success' &&
36+
(needs.file-changes.outputs.checkall == 'true' || github.event_name == 'workflow_dispatch')
1637
timeout-minutes: 240
1738

1839
steps:

.github/workflows/fp-stability.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,29 @@ on:
3535
workflow_dispatch:
3636

3737
jobs:
38+
file-changes:
39+
name: Detect File Changes
40+
runs-on: ubuntu-latest
41+
outputs:
42+
checkall: ${{ steps.changes.outputs.checkall }}
43+
steps:
44+
- name: Clone
45+
uses: actions/checkout@v4
46+
47+
- name: Detect Changes
48+
uses: dorny/paths-filter@v3
49+
id: changes
50+
with:
51+
filters: ".github/file-filter.yml"
52+
3853
fp-stability:
3954
name: Floating-Point Stability (Verrou)
4055
runs-on: ubuntu-latest
56+
needs: [file-changes]
57+
if: >-
58+
!cancelled() &&
59+
needs.file-changes.result == 'success' &&
60+
(needs.file-changes.outputs.checkall == 'true' || github.event_name == 'workflow_dispatch')
4161
4262
steps:
4363
- name: Clone

0 commit comments

Comments
 (0)