Skip to content

Commit 1322b6c

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 1322b6c

28 files changed

Lines changed: 332 additions & 176 deletions

.github/workflows/CI-CD.yml

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

.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: 4 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
@@ -161,7 +151,7 @@ To generate the API documentation for `ForSolver` using
161151
command:
162152

163153
```shell
164-
ford ford.yml
154+
ford README.md
165155
```
166156

167157
## 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)