File tree Expand file tree Collapse file tree 3 files changed +78
-6
lines changed Expand file tree Collapse file tree 3 files changed +78
-6
lines changed Original file line number Diff line number Diff line change 1+ # This is used by the action https://github.com/dorny/paths-filter
2+ # Lists all files to be filtered for changes to run a CI for test.yml & coverage.yml
3+
4+ fortran_src : &fortran_src
5+ - ' **/*.f90'
6+ - ' **/*.fpp'
7+
8+ python_src : &python_src
9+ - ' **/*.py'
10+ - ' toolchain/requirements.txt'
11+
12+ cmakelist : &cmakelist
13+ - ' CMakeLists.txt'
14+ - ' toolchain/cmake/**'
15+
16+ tests : &tests
17+ - ' tests/**'
18+
19+ scripts : &scripts
20+ - ' mfc.sh'
21+ - ' mfc.bat'
22+ - ' toolchain/bootstrap/**'
23+
24+ yml : &yml
25+ - ' **/*.yml'
26+
27+ checkall : &checkall
28+ - *fortran_src
29+ - *python_src
30+ - *cmakelist
31+ - *tests
32+ - *scripts
33+ - *yml
Original file line number Diff line number Diff line change @@ -3,18 +3,36 @@ name: Coverage Check
33on : [push, pull_request, workflow_dispatch]
44
55jobs :
6+ file-changes :
7+ name : Detect File Changes
8+ runs-on : ' ubuntu-latest'
9+ outputs :
10+ checkall : ${{ steps.changes.outputs.checkall }}
11+ steps :
12+ - name : Clone
13+ uses : actions/checkout@v4
14+
15+ - name : Detect Changes
16+ uses : dorny/paths-filter@v3
17+ id : changes
18+ with :
19+ filters : " .github/file-filter.yml"
20+
621 run :
722 name : Coverage Test on CodeCov
23+ if : needs.file-changes.outputs.checkall == 'true'
24+ needs : file-changes
825 runs-on : " ubuntu-latest"
926 steps :
27+ - name : Checkouts
28+ uses : actions/checkout@v4
29+
1030 - name : Setup Ubuntu
1131 run : |
1232 sudo apt update -y
1333 sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
14-
15- - name : Checkouts
16- uses : actions/checkout@v4
17-
34+
35+
1836 - name : Build
1937 run : /bin/bash mfc.sh build -j $(nproc) --gcov
2038
Original file line number Diff line number Diff line change 1717 workflow_dispatch :
1818
1919jobs :
20+ file-changes :
21+ name : Detect File Changes
22+ runs-on : ' ubuntu-latest'
23+ outputs :
24+ checkall : ${{ steps.changes.outputs.checkall }}
25+ steps :
26+ - name : Clone
27+ uses : actions/checkout@v4
28+
29+ - name : Detect Changes
30+ uses : dorny/paths-filter@v3
31+ id : changes
32+ with :
33+ filters : " .github/file-filter.yml"
34+
2035 github :
2136 name : Github
37+ if : needs.file-changes.outputs.checkall == 'true'
38+ needs : file-changes
2239 strategy :
2340 matrix :
2441 os : ['ubuntu', 'macos']
3855 fail-fast : false
3956 continue-on-error : true
4057 runs-on : ${{ matrix.os }}-latest
58+
4159 steps :
4260 - name : Clone
4361 uses : actions/checkout@v4
96114 OPT2 : ${{ matrix.debug == 'debug' && '-% 20' || '' }}
97115
98116 docker :
99- name : Github | Docker
117+ name : Github | Docker
118+ if : needs.file-changes.outputs.checkall == 'true'
119+ needs : file-changes
100120 runs-on : ubuntu-latest
101121 steps :
102122 - name : Clone
@@ -107,7 +127,8 @@ jobs:
107127
108128 self :
109129 name : Self Hosted
110- if : github.repository == 'MFlowCode/MFC'
130+ if : github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
131+ needs : file-changes
111132 continue-on-error : true
112133 strategy :
113134 matrix :
You can’t perform that action at this time.
0 commit comments