Skip to content

Commit caa060c

Browse files
authored
Fix: include the directory include in stdlib-fpm
Fix: include the directory include in stdlib-fpm
2 parents d57c776 + 4527cf4 commit caa060c

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.github/workflows/fpm-deployment.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,21 @@ jobs:
7676
steps:
7777
- name: Checkout code
7878
uses: actions/checkout@v4.2.2
79-
with:
80-
ref: stdlib-fpm
8179

8280
- uses: fortran-lang/setup-fortran@main
8381
id: setup-fortran
8482
with:
8583
compiler: ${{ matrix.toolchain.compiler }}
8684
version: ${{ matrix.toolchain.version }}
8785

86+
- name: Set up Python 3.x
87+
uses: actions/setup-python@v1
88+
with:
89+
python-version: 3.x
90+
91+
- name: Install requirements
92+
run: pip install --upgrade -r config/requirements.txt
93+
8894
- name: Setup Fortran Package Manager
8995
uses: fortran-lang/setup-fpm@v8
9096
with:
@@ -95,8 +101,9 @@ jobs:
95101
run: |
96102
sudo apt-get install lcov
97103
98-
- name: Run tests to generate the coverage.
99-
run: fpm test --profile release --flag '-DWITH_XDP -DWITH_QP -coverage'
104+
- run: | # Use fpm gnu ci to check xdp and qp
105+
python config/fypp_deployment.py --with_xdp --with_qp
106+
fpm test --profile release --flag '-DWITH_XDP -DWITH_QP -coverage'
100107
101108
- name: Create coverage report
102109
run: |

STYLE_GUIDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This style guide is a living document and proposed changes may be adopted after
1717

1818
* Source files should contain at most one `program`, `module`, or `submodule`
1919
* The filename should match the program or module name and have the file extension `.f90` or `.F90` if preprocessing is required
20+
* All included files must use the `.inc` extension. These files should be located in the `include/` directory.
2021
* If the interface and implementation is split using submodules the implementation submodule file should have the same name as the
2122
interface (parent) module but end in `_implementation`
2223
E.g., `string_class.f90` and `string_class_implementation.f90`

config/fypp_deployment.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ def deploy_stdlib_fpm(with_ilp64):
8989
else:
9090
base_folder = 'stdlib-fpm'
9191

92+
if not os.path.exists(base_folder+os.sep+'include'):
93+
os.makedirs(base_folder+os.sep+'include')
9294
if not os.path.exists(base_folder+os.sep+'src'):
9395
os.makedirs(base_folder+os.sep+'src')
9496
if not os.path.exists(base_folder+os.sep+'test'):
@@ -100,8 +102,9 @@ def recursive_copy(folder):
100102
for root, _, files in os.walk(folder):
101103
for file in files:
102104
if file not in prune:
103-
if file.endswith((".f90", ".F90", ".dat", ".npy", ".c", ".h")):
105+
if file.endswith((".f90", ".F90", ".dat", ".npy", ".c", ".h", ".inc")):
104106
shutil.copy2(os.path.join(root, file), base_folder+os.sep+folder+os.sep+file)
107+
recursive_copy('include')
105108
recursive_copy('src')
106109
recursive_copy('test')
107110
recursive_copy('example')

0 commit comments

Comments
 (0)