Skip to content

Commit 6c0644b

Browse files
committed
refactor: update CI/CD, avoid kinds dependency
- used setup-fortran-conda action for CI/CD - Updated README.md - Created VERSION file - Removed deprecated ford.yml file - Enhanced fpm.rsp with detailed CI configurations for various platforms - Updated fpm.toml with new project metadata and dependencies - Refactored code to use forsolver_kinds module instead of kinds - Updated test files to reflect changes in module usage
1 parent 1ad8749 commit 6c0644b

28 files changed

+338
-176
lines changed

.github/workflows/CI-CD.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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"

.github/workflows/CI_doc.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/CI_test.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
[![GitHub](https://img.shields.io/badge/GitHub-ForSolver-blue.svg?style=social&logo=github)](https://github.com/gha3mi/forsolver)
2-
[![Version](https://img.shields.io/github/release/gha3mi/forsolver.svg)](https://github.com/gha3mi/forsolver/releases/latest)
1+
[![GitHub](https://img.shields.io/badge/GitHub-forsolver-blue.svg?style=social&logo=github)](https://github.com/gha3mi/forsolver)
2+
[![Version](https://img.shields.io/github/v/tag/gha3mi/forsolver?label=version&sort=semver)](https://github.com/gha3mi/forsolver/releases)
33
[![Documentation](https://img.shields.io/badge/ford-Documentation%20-blueviolet.svg)](https://gha3mi.github.io/forsolver/)
4+
[![Setup Fortran Conda CI/CD](https://github.com/gha3mi/forsolver/actions/workflows/CI-CD.yml/badge.svg?branch=main)](https://github.com/gha3mi/forsolver/actions/workflows/CI-CD.yml)
45
[![License](https://img.shields.io/github/license/gha3mi/forsolver?color=green)](https://github.com/gha3mi/forsolver/blob/main/LICENSE)
5-
[![Build](https://github.com/gha3mi/forsolver/actions/workflows/CI_test.yml/badge.svg)](https://github.com/gha3mi/forsolver/actions/workflows/CI_test.yml)
66

77

88
**ForSolver**: A Fortran library of linear and nonlinear solvers.
@@ -70,16 +70,6 @@ you can easily include it by adding the following line to your `fpm.toml` file:
7070
forsolver = {git="https://github.com/gha3mi/forsolver.git"}
7171
```
7272

73-
## Runing Tests
74-
75-
Execute the following commands to run tests with specific compilers:
76-
77-
```shell
78-
fpm @<compiler>-test
79-
```
80-
`compiler: ifx, ifort, gfortran, nvfortran`
81-
82-
8373
## Examples
8474

8575
### Example 1: Linear System Solver
@@ -152,6 +142,11 @@ program example2
152142
end program example2
153143
```
154144

145+
## CI Status
146+
147+
<!-- STATUS:setup-fortran-conda:START -->
148+
<!-- STATUS:setup-fortran-conda:END -->
149+
155150
## API Documentation
156151

157152
The most up-to-date API documentation for the master branch is available
@@ -161,7 +156,7 @@ To generate the API documentation for `ForSolver` using
161156
command:
162157

163158
```shell
164-
ford ford.yml
159+
ford README.md
165160
```
166161

167162
## Contributing

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.3.1

ford.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)