Skip to content

Commit 86775c2

Browse files
committed
Skip some CIs if only Docs/ has changed
1 parent 8f4fbaf commit 86775c2

File tree

17 files changed

+179
-5
lines changed

17 files changed

+179
-5
lines changed

.github/workflows/apps.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10+
check_changes:
11+
uses: ./.github/workflows/check_changes.yml
12+
1013
castro:
1114
name: Castro
1215
runs-on: ubuntu-latest
16+
needs: check_changes
17+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
1318
steps:
1419
- uses: actions/checkout@v4
1520
- name: Get Latest Release Tag
@@ -62,6 +67,8 @@ jobs:
6267
warpx:
6368
name: WarpX
6469
runs-on: ubuntu-latest
70+
needs: check_changes
71+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
6572
steps:
6673
- uses: actions/checkout@v4
6774
- name: Download WarpX
@@ -105,7 +112,8 @@ jobs:
105112
pyamrex:
106113
name: pyamrex
107114
runs-on: ubuntu-latest
108-
steps:
115+
needs: check_changes
116+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
109117
- uses: actions/checkout@v4
110118
- name: Checkout pyamrex
111119
uses: actions/checkout@v4

.github/workflows/bittree.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10+
check_changes:
11+
uses: ./.github/workflows/check_changes.yml
12+
1013
bittree-2d:
1114
name: Bittree 2D
1215
runs-on: ubuntu-latest
16+
needs: check_changes
17+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
1318
steps:
1419
- uses: actions/checkout@v4
1520
- name: Dependencies
@@ -62,6 +67,8 @@ jobs:
6267
bittree-3d:
6368
name: Bittree 3D
6469
runs-on: ubuntu-latest
70+
needs: check_changes
71+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
6572
steps:
6673
- uses: actions/checkout@v4
6774
- name: Dependencies

.github/workflows/catalyst.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10+
check_changes:
11+
uses: ./.github/workflows/check_changes.yml
12+
1013
catalyst:
1114
name: Catalyst
1215
runs-on: ubuntu-22.04
13-
if: github.event.pull_request.draft == false
16+
needs: check_changes
17+
if: github.event.pull_request.draft == false && needs.check_changes.outputs.has_non_docs_changes == 'true'
1418
env:
1519
CXX: g++
1620
CC: gcc
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Changes
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
has_docs_changes:
7+
value: ${{ jobs.check.outputs.has_docs_changes }}
8+
has_non_docs_changes:
9+
value: ${{ jobs.check.outputs.has_non_docs_changes }}
10+
11+
jobs:
12+
check:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
has_non_docs_changes: ${{ steps.set-output.outputs.has_non_docs_changes }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: dorny/paths-filter@v3
19+
id: changes
20+
with:
21+
filters: |
22+
docs:
23+
- 'Docs/**'
24+
others:
25+
- '!Docs/**'
26+
- id: set-output
27+
run: |
28+
echo "has_docs_changes=${{ steps.changes.outputs.docs }}" >> $GITHUB_OUTPUT
29+
echo "has_non_docs_changes=${{ steps.changes.outputs.others }}" >> $GITHUB_OUTPUT

.github/workflows/clang.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -Wno-c++17-extensions: Clang complains about nodiscard if the standard is not set to c++17.
2-
31
name: LinuxClang
42

53
on: [push, pull_request]
@@ -9,11 +7,16 @@ concurrency:
97
cancel-in-progress: true
108

119
jobs:
10+
check_changes:
11+
uses: ./.github/workflows/check_changes.yml
12+
1213
# Build and install libamrex as AMReX CMake project
1314
# Note: this is an intentional "minimal" build that does not enable (many) options
1415
library_clang:
1516
name: [email protected] C++17 SP NOMPI Debug [lib]
1617
runs-on: ubuntu-20.04
18+
needs: check_changes
19+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
1720
steps:
1821
- uses: actions/checkout@v4
1922
- name: Dependencies
@@ -75,6 +78,8 @@ jobs:
7578
tests_clang:
7679
name: [email protected] C++17 SP Particles DP Mesh Debug [tests]
7780
runs-on: ubuntu-22.04
81+
needs: check_changes
82+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
7883
steps:
7984
- uses: actions/checkout@v4
8085
- name: Dependencies
@@ -131,6 +136,8 @@ jobs:
131136
tests_cxx20:
132137
name: Clang C++20 [tests]
133138
runs-on: ubuntu-22.04
139+
needs: check_changes
140+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
134141
steps:
135142
- uses: actions/checkout@v4
136143
- name: Dependencies
@@ -180,6 +187,8 @@ jobs:
180187
configure-2d:
181188
name: Clang NOMPI Release [configure 2D]
182189
runs-on: ubuntu-22.04
190+
needs: check_changes
191+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
183192
steps:
184193
- uses: actions/checkout@v4
185194
- name: Dependencies

.github/workflows/codeql.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
check_changes:
17+
uses: ./.github/workflows/check_changes.yml
18+
1619
analyze:
17-
if: ${{ github.repository == 'AMReX-Codes/amrex' || github.event_name != 'schedule' }}
20+
needs: check_changes
21+
if: ${{ github.repository == 'AMReX-Codes/amrex' || github.event_name != 'schedule' }} && needs.check_changes.outputs.has_non_docs_changes == 'true'
1822
name: Analyze
1923
runs-on: ubuntu-latest
2024
permissions:

.github/workflows/cuda.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10+
check_changes:
11+
uses: ./.github/workflows/check_changes.yml
12+
1013
# Build libamrex and all tests with CUDA 11.2
1114
tests-cuda11:
1215
name: [email protected] [email protected] C++17 Release [tests]
1316
runs-on: ubuntu-20.04
17+
needs: check_changes
18+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
1419
steps:
1520
- uses: actions/checkout@v4
1621
- name: Dependencies
@@ -62,6 +67,8 @@ jobs:
6267
tests-cuda11-clang:
6368
name: Clang@15 [email protected] C++17 Release [tests]
6469
runs-on: ubuntu-22.04
70+
needs: check_changes
71+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
6572
env:
6673
CC: clang-15
6774
CXX: clang++-15
@@ -115,6 +122,8 @@ jobs:
115122
tests-nvhpc-nvcc:
116123
name: NVHPC NVCC/NVC++ C++17 Release [tests]
117124
runs-on: ubuntu-20.04
125+
needs: check_changes
126+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
118127
steps:
119128
- uses: actions/checkout@v4
120129
- name: Dependencies
@@ -178,6 +187,8 @@ jobs:
178187
configure-3d-cuda:
179188
180189
runs-on: ubuntu-20.04
190+
needs: check_changes
191+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
181192
steps:
182193
- uses: actions/checkout@v4
183194
- name: Dependencies

.github/workflows/gcc.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13+
check_changes:
14+
uses: ./.github/workflows/check_changes.yml
15+
1316
# Build and install libamrex as AMReX CMake project
1417
# Note: this is an intentional "minimal" build that does not enable (many) options
1518
library:
1619
name: [email protected] C++17 Release [lib]
1720
runs-on: ubuntu-20.04
21+
needs: check_changes
22+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
1823
steps:
1924
- uses: actions/checkout@v4
2025
- name: Dependencies
@@ -72,6 +77,8 @@ jobs:
7277
tests_build_3D:
7378
name: GNU@13 C++17 3D Debug Fortran [tests]
7479
runs-on: ubuntu-24.04
80+
needs: check_changes
81+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
7582
steps:
7683
- uses: actions/checkout@v4
7784
- name: Dependencies
@@ -121,6 +128,8 @@ jobs:
121128
tests_build_2D:
122129
name: [email protected] C++17 2D Debug Fortran [tests]
123130
runs-on: ubuntu-20.04
131+
needs: check_changes
132+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
124133
steps:
125134
- uses: actions/checkout@v4
126135
- name: Dependencies
@@ -170,6 +179,8 @@ jobs:
170179
tests_build_1D:
171180
name: [email protected] C++17 1D Debug Fortran [tests]
172181
runs-on: ubuntu-20.04
182+
needs: check_changes
183+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
173184
steps:
174185
- uses: actions/checkout@v4
175186
- name: Dependencies
@@ -221,6 +232,8 @@ jobs:
221232
tests_cxx20:
222233
name: [email protected] C++20 OMP [tests]
223234
runs-on: ubuntu-20.04
235+
needs: check_changes
236+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
224237
steps:
225238
- uses: actions/checkout@v4
226239
- name: Dependencies
@@ -281,6 +294,8 @@ jobs:
281294
tests-nonmpi:
282295
name: [email protected] C++17 NOMPI [tests]
283296
runs-on: ubuntu-20.04
297+
needs: check_changes
298+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
284299
steps:
285300
- uses: actions/checkout@v4
286301
- name: Dependencies
@@ -340,6 +355,8 @@ jobs:
340355
tests-nofortran:
341356
name: GNU@12 C++17 w/o Fortran [tests]
342357
runs-on: ubuntu-22.04
358+
needs: check_changes
359+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
343360
steps:
344361
- uses: actions/checkout@v4
345362
- name: Dependencies
@@ -401,6 +418,8 @@ jobs:
401418
configure-1d:
402419
name: [email protected] Release [configure 1D]
403420
runs-on: ubuntu-20.04
421+
needs: check_changes
422+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
404423
steps:
405424
- uses: actions/checkout@v4
406425
- name: Dependencies
@@ -441,6 +460,8 @@ jobs:
441460
configure-3d:
442461
name: [email protected] Release [configure 3D]
443462
runs-on: ubuntu-22.04
463+
needs: check_changes
464+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
444465
steps:
445466
- uses: actions/checkout@v4
446467
- name: Dependencies
@@ -481,6 +502,8 @@ jobs:
481502
configure-3d-single-tprof:
482503
name: [email protected] Release [configure 3D]
483504
runs-on: ubuntu-20.04
505+
needs: check_changes
506+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
484507
steps:
485508
- uses: actions/checkout@v4
486509
- name: Dependencies
@@ -522,6 +545,8 @@ jobs:
522545
configure-3d-omp-debug:
523546
name: [email protected] OMP Debug [configure 3D]
524547
runs-on: ubuntu-20.04
548+
needs: check_changes
549+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
525550
steps:
526551
- uses: actions/checkout@v4
527552
- name: Dependencies
@@ -562,6 +587,8 @@ jobs:
562587
plotfile-tools:
563588
name: GNU Plotfile Tools [tools]
564589
runs-on: ubuntu-20.04
590+
needs: check_changes
591+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
565592
steps:
566593
- uses: actions/checkout@v4
567594
- name: Dependencies
@@ -601,6 +628,8 @@ jobs:
601628
tests_run:
602629
name: GNU@13 C++17 [tests]
603630
runs-on: ubuntu-24.04
631+
needs: check_changes
632+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
604633
steps:
605634
- uses: actions/checkout@v4
606635
- name: Dependencies
@@ -651,6 +680,8 @@ jobs:
651680
test_hdf5:
652681
name: [email protected] HDF5 I/O Test [tests]
653682
runs-on: ubuntu-20.04
683+
needs: check_changes
684+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
654685
env:
655686
CXX: h5pcc
656687
CC: h5cc

.github/workflows/hip.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10+
check_changes:
11+
uses: ./.github/workflows/check_changes.yml
12+
1013
tests-hip:
1114
name: HIP ROCm Flang C++17 [tests]
1215
runs-on: ubuntu-20.04
16+
needs: check_changes
17+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
1318
steps:
1419
- uses: actions/checkout@v4
1520
- name: Dependencies
@@ -69,6 +74,8 @@ jobs:
6974
tests-hip-wrapper:
7075
name: HIP ROCm [email protected] C++17 [tests-hipcc]
7176
runs-on: ubuntu-20.04
77+
needs: check_changes
78+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
7279
steps:
7380
- uses: actions/checkout@v4
7481
- name: Dependencies
@@ -127,6 +134,8 @@ jobs:
127134
configure-2d-single-hip:
128135
name: HIP EB [configure 2D]
129136
runs-on: ubuntu-20.04
137+
needs: check_changes
138+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
130139
steps:
131140
- uses: actions/checkout@v4
132141
- name: Dependencies
@@ -160,6 +169,8 @@ jobs:
160169
hip-3d-eb-gmake:
161170
name: HIP EB 3D GMake
162171
runs-on: ubuntu-20.04
172+
needs: check_changes
173+
if: needs.check_changes.outputs.has_non_docs_changes == 'true'
163174
steps:
164175
- uses: actions/checkout@v4
165176
- name: Dependencies

0 commit comments

Comments
 (0)