1+ name : Setup Fortran Conda CI/CD
2+
3+ on :
4+ push :
5+ branches : [main, master, dev]
6+ paths-ignore :
7+ - ' README.md'
8+ - ' CHANGELOG.md'
9+ - ' VERSION'
10+ - ' LICENSE'
11+ pull_request :
12+ branches : [main, master]
13+ paths-ignore :
14+ - ' README.md'
15+ - ' CHANGELOG.md'
16+ - ' VERSION'
17+ - ' LICENSE'
18+ workflow_dispatch :
19+ permissions :
20+ contents : write
21+ pull-requests : write
22+
23+ jobs :
24+ test_fpm :
25+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
26+ name : ${{ matrix.os }}_${{ matrix.compiler }}_fpm
27+ runs-on : ${{ matrix.os }}
28+ strategy :
29+ fail-fast : false
30+ matrix :
31+ os : [ubuntu-latest, macos-latest, windows-latest]
32+ compiler : [gfortran, ifx, lfortran, flang-new, nvfortran]
33+ include :
34+ - os : ubuntu-latest
35+ extra-packages : " libblas, liblapack"
36+ - os : windows-latest
37+ extra-packages : " libblas, liblapack"
38+ - os : macos-latest
39+ extra-packages : " libblas, liblapack"
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+
50+ steps :
51+ - name : Setup Fortran
52+ uses : gha3mi/setup-fortran-conda@latest
53+ with :
54+ compiler : ${{ matrix.compiler }}
55+ platform : ${{ matrix.os }}
56+
57+ - name : fpm test (debug)
58+ if : always()
59+ run : fpm @${{ matrix.os }}_${{ matrix.compiler }}_debug --verbose
60+
61+ - name : fpm test (release)
62+ if : always()
63+ run : fpm @${{ matrix.os }}_${{ matrix.compiler }}_release --verbose
64+
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+
82+ status_fpm :
83+ if : ${{ always() && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }}
84+ name : Generate STATUS.md
85+ needs : [test_fpm]
86+ runs-on : ubuntu-latest
87+ steps :
88+ - name : Generate summary
89+ uses : gha3mi/setup-fortran-conda@latest
90+ with :
91+ generate-status-fpm : true
92+
93+ update_readme_table :
94+ if : ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }}
95+ name : Update README.md status table
96+ needs : [status_fpm]
97+ runs-on : ubuntu-latest
98+ steps :
99+ - name : Update README status
100+ uses : gha3mi/setup-fortran-conda@latest
101+ with :
102+ update-readme-table : true
103+ update-readme-token : ${{ secrets.GH_PAT_ForSolver }} # Update with your GitHub personal access token
104+ update-readme-user-name : " Seyed Ali Ghasemi" # Update with your name
105+ update-readme-user-email : " info@gha3mi.com" # Update with your email
106+
107+ linter_fortitude :
108+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
109+ name : Run Fortitude Linter
110+ runs-on : ubuntu-latest
111+ steps :
112+ - name : Run Fortitude Linter
113+ uses : gha3mi/setup-fortran-conda@latest
114+ with :
115+ fortitude-check : true
116+ fortitude-settings : " --output-format github"
0 commit comments