@@ -3,19 +3,12 @@ name: Setup Fortran Conda CI/CD
33on :
44 push :
55 branches : [main, dev]
6- paths-ignore :
7- - ' README.md'
8- - ' CHANGELOG.md'
9- - ' VERSION'
10- - ' LICENSE'
6+ paths-ignore : ['README.md','CHANGELOG.md','VERSION','LICENSE']
117 pull_request :
128 branches : [main]
13- paths-ignore :
14- - ' README.md'
15- - ' CHANGELOG.md'
16- - ' VERSION'
17- - ' LICENSE'
9+ paths-ignore : ['README.md','CHANGELOG.md','VERSION','LICENSE']
1810 workflow_dispatch :
11+
1912permissions :
2013 contents : write
2114 pull-requests : write
@@ -28,31 +21,21 @@ jobs:
2821 strategy :
2922 fail-fast : false
3023 matrix :
31- os : [ubuntu-latest, macos-latest, windows-latest]
32- compiler : [gfortran, ifx, flang-new, nvfortran]
3324 include :
34- - os : ubuntu-latest
35- extra-packages : " "
36- - os : windows-latest
37- extra-packages : " "
38- - os : macos-latest
39- extra-packages : " "
40- exclude :
41- - os : macos-latest
42- compiler : flang-new
43- - os : macos-latest
44- compiler : ifx
45- - os : macos-latest
46- compiler : nvfortran
47- - os : windows-latest
48- compiler : nvfortran
49-
25+ - {os: ubuntu-latest, compiler: gfortran }
26+ - {os: ubuntu-latest, compiler: ifx }
27+ - {os: ubuntu-latest, compiler: flang-new}
28+ - {os: ubuntu-latest, compiler: nvfortran}
29+ - {os: windows-latest, compiler: gfortran }
30+ - {os: windows-latest, compiler: ifx, fpm-version: "0.12.0"}
31+ - {os: macos-latest, compiler: gfortran }
32+
5033 steps :
5134 - name : Setup Fortran
5235 uses : gha3mi/setup-fortran-conda@latest
5336 with :
5437 compiler : ${{ matrix.compiler }}
55- platform : ${{ matrix.os }}
38+ fpm-version : ${{ matrix.fpm-version }}
5639
5740 - name : fpm test (debug)
5841 if : always()
@@ -62,55 +45,27 @@ jobs:
6245 if : always()
6346 run : fpm @${{ matrix.os }}_${{ matrix.compiler }}_release --verbose
6447
65- doc_ford :
66- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }}
67- name : Generate FORD Documentation
68- runs-on : ubuntu-latest
69- steps :
70- - name : Setup and Generate FORD Documentation
71- uses : gha3mi/setup-fortran-conda@latest
72- with :
73- compiler : gfortran
74- platform : ubuntu-latest
75- generate-doc-ford : true
76- ford-working-directory : .
77- ford-config : README.md
78- ford-output-directory : doc
79- ford-branch : gh-pages
80- ford-target-folder : .
81-
8248 test_cmake :
8349 if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
8450 name : ${{ matrix.os }}_${{ matrix.compiler }}_cmake
8551 runs-on : ${{ matrix.os }}
8652 strategy :
8753 fail-fast : false
8854 matrix :
89- os : [ubuntu-latest, macos-latest, windows-latest]
90- compiler : [gfortran, ifx, flang-new, nvfortran]
9155 include :
92- - os : ubuntu-latest
93- extra-packages : " "
94- - os : windows-latest
95- extra-packages : " "
96- - os : macos-latest
97- extra-packages : " "
98- exclude :
99- - os : macos-latest
100- compiler : flang-new
101- - os : macos-latest
102- compiler : ifx
103- - os : macos-latest
104- compiler : nvfortran
105- - os : windows-latest
106- compiler : nvfortran
107-
56+ - {os: ubuntu-latest, compiler: gfortran }
57+ - {os: ubuntu-latest, compiler: ifx }
58+ - {os: ubuntu-latest, compiler: flang-new}
59+ - {os: ubuntu-latest, compiler: nvfortran}
60+ - {os: windows-latest, compiler: gfortran }
61+ - {os: windows-latest, compiler: ifx }
62+ - {os: macos-latest, compiler: gfortran }
63+
10864 steps :
10965 - name : Setup Fortran
11066 uses : gha3mi/setup-fortran-conda@latest
11167 with :
11268 compiler : ${{ matrix.compiler }}
113- platform : ${{ matrix.os }}
11469
11570 - name : cmake test (debug)
11671 if : always()
12580 cmake -S . -B build/cmake/release -DCMAKE_BUILD_TYPE=Release -G Ninja -DFORCAD_BUILD_TESTS=ON -DCMAKE_Fortran_FLAGS="-DFOR_DEBUG"
12681 cmake --build build/cmake/release --config Release --verbose
12782 ctest --test-dir build/cmake/release --output-on-failure -VV
128-
83+
12984 - name : cmake install (static)
13085 if : always()
13186 run : |
@@ -148,32 +103,26 @@ jobs:
148103 if : always()
149104 run : cmake --build build/cmake/shared --target uninstall
150105
151- status_fpm :
152- if : ${{ always() && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }}
153- name : Generate STATUS.md
154- needs : [test_fpm]
155- runs-on : ubuntu-latest
156- steps :
157- - name : Generate summary
158- uses : gha3mi/setup-fortran-conda@latest
159- with :
160- generate-status-fpm : true
161-
162- status_cmake :
163- if : ${{ always() && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }}
164- name : Generate STATUS.md
165- needs : [test_cmake]
106+ doc_ford :
107+ if : ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && !contains(github.event.head_commit.message, '[skip ci]') }}
108+ name : Generate FORD Documentation
166109 runs-on : ubuntu-latest
167110 steps :
168- - name : Generate summary
111+ - name : Setup and Generate FORD Documentation
169112 uses : gha3mi/setup-fortran-conda@latest
170113 with :
171- generate-status-cmake : true
114+ compiler : gfortran
115+ generate-doc-ford : true
116+ ford-working-directory : .
117+ ford-config : README.md
118+ ford-output-directory : doc
119+ ford-branch : gh-pages
120+ ford-target-folder : .
172121
173122 update_readme_table :
174- if : ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }}
123+ if : ${{ always() && ( github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }}
175124 name : Update README.md status table
176- needs : [status_fpm, status_cmake ]
125+ needs : [test_fpm, test_cmake ]
177126 runs-on : ubuntu-latest
178127 steps :
179128 - name : Update README status
0 commit comments