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 : " libopenblas, libblas, liblapack, mkl, mkl-include"
36+ - os : windows-latest
37+ extra-packages : " libopenblas, libblas, liblapack, mkl, mkl-include"
38+ - os : macos-latest
39+ extra-packages : " libopenblas, 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+ extra-packages : ${{ matrix.extra-packages }}
57+
58+ - name : fpm test (debug)
59+ if : always()
60+ run : fpm @${{ matrix.os }}_${{ matrix.compiler }}_debug --verbose
61+
62+ - name : fpm test (release)
63+ if : always()
64+ run : fpm @${{ matrix.os }}_${{ matrix.compiler }}_release --verbose
65+
66+ doc_ford :
67+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }}
68+ name : Generate FORD Documentation
69+ runs-on : ubuntu-latest
70+ steps :
71+ - name : Setup and Generate FORD Documentation
72+ uses : gha3mi/setup-fortran-conda@latest
73+ with :
74+ compiler : gfortran
75+ platform : ubuntu-latest
76+ generate-doc-ford : true
77+ ford-working-directory : .
78+ ford-config : README.md
79+ ford-output-directory : doc
80+ ford-branch : gh-pages
81+ ford-target-folder : .
82+
83+ status_fpm :
84+ if : ${{ always() && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }}
85+ name : Generate STATUS.md
86+ needs : [test_fpm]
87+ runs-on : ubuntu-latest
88+ steps :
89+ - name : Generate summary
90+ uses : gha3mi/setup-fortran-conda@latest
91+ with :
92+ generate-status-fpm : true
93+
94+ update_readme_table :
95+ if : ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }}
96+ name : Update README.md status table
97+ needs : [status_fpm]
98+ runs-on : ubuntu-latest
99+ steps :
100+ - name : Update README status
101+ uses : gha3mi/setup-fortran-conda@latest
102+ with :
103+ update-readme-table : true
104+ update-readme-token : ${{ secrets.GH_PAT_ForSolver }} # Update with your GitHub personal access token
105+ update-readme-user-name : " Seyed Ali Ghasemi" # Update with your name
106+ update-readme-user-email : " info@gha3mi.com" # Update with your email
107+
108+ linter_fortitude :
109+ if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
110+ name : Run Fortitude Linter
111+ runs-on : ubuntu-latest
112+ steps :
113+ - name : Run Fortitude Linter
114+ uses : gha3mi/setup-fortran-conda@latest
115+ with :
116+ fortitude-check : true
117+ fortitude-settings : " --output-format github"
0 commit comments