Skip to content

Commit a7ce10e

Browse files
Merge pull request #1 from jacobwilliams/develop
CI updates
2 parents ed1688a + f35c1db commit a7ce10e

File tree

6 files changed

+60
-26
lines changed

6 files changed

+60
-26
lines changed

.github/workflows/CI.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ jobs:
88
fail-fast: false
99
matrix:
1010
os: [ubuntu-latest]
11-
gcc_v: [9] # Version of GFortran we want to use.
12-
python-version: [3.7]
11+
gcc_v: [10] # Version of GFortran we want to use.
12+
python-version: [3.9]
1313
env:
1414
FC: gfortran-${{ matrix.gcc_v }}
1515
GCC_V: ${{ matrix.gcc_v }}
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3.0.2
2020
with:
2121
submodules: recursive
2222

23-
- name: Install Python
23+
- name: Set up Python 3.x
2424
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc.
2525
with:
2626
python-version: ${{ matrix.python-version }}
@@ -29,39 +29,52 @@ jobs:
2929
uses: ts-graphviz/setup-graphviz@v1
3030

3131
- name: Setup Fortran Package Manager
32-
uses: fortran-lang/setup-fpm@v3
32+
uses: fortran-lang/setup-fpm@v4
3333
with:
3434
github-token: ${{ secrets.GITHUB_TOKEN }}
3535

3636
- name: Install Python dependencies
3737
if: contains( matrix.os, 'ubuntu')
3838
run: |
3939
python -m pip install --upgrade pip
40-
pip install ford
40+
pip install matplotlib ford
4141
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
4242
4343
- name: Install GFortran Linux
4444
if: contains( matrix.os, 'ubuntu')
4545
run: |
46-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
47-
sudo apt-get update
48-
sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V}
49-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
50-
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
51-
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
46+
sudo apt-get install lcov
47+
sudo update-alternatives \
48+
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \
49+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \
50+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }}
5251
53-
- name: Compile
54-
run: fpm build --profile release
52+
# - name: Compile
53+
# run: fpm build --profile release
5554

5655
- name: Run tests
57-
run: fpm test
56+
run: fpm test --profile debug --flag -coverage
57+
58+
- name: Create coverage report
59+
run: |
60+
mkdir -p ${{ env.COV_DIR }}
61+
lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base
62+
lcov --capture --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.capture
63+
lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info
64+
env:
65+
COV_DIR: build/coverage
66+
67+
- name: Upload coverage report
68+
uses: codecov/codecov-action@v2
69+
with:
70+
files: build/coverage/coverage.info
5871

5972
- name: Build documentation
6073
run: ford ./stl-fortran.md
6174

6275
- name: Deploy Documentation
6376
if: github.ref == 'refs/heads/master'
64-
uses: JamesIves/github-pages-deploy-action@4.1.4
77+
uses: JamesIves/github-pages-deploy-action@v4.3.3
6578
with:
6679
branch: gh-pages # The branch the action should deploy to.
6780
folder: doc # The folder the action should deploy.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
STL-FORTRAN
22
https://github.com/jacobwilliams/stl-fortran
33

4-
Copyright (c) 2020-2021, Jacob Williams
4+
Copyright (c) 2020-2022, Jacob Williams
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without modification,

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
Fortran code for reading and writing STL (STereoLithography) files.
77

8+
### Status
9+
10+
[![GitHub release](https://img.shields.io/github/release/jacobwilliams/stl-fortran.svg)](https://github.com/jacobwilliams/stl-fortran/releases/latest)
11+
[![Build Status](https://github.com/jacobwilliams/stl-fortran/actions/workflows/CI.yml/badge.svg)](https://github.com/jacobwilliams/stl-fortran/actions)
12+
[![codecov](https://codecov.io/gh/jacobwilliams/stl-fortran/branch/master/graph/badge.svg)](https://codecov.io/gh/jacobwilliams/stl-fortran)
13+
[![last-commit](https://img.shields.io/github/last-commit/jacobwilliams/stl-fortran)](https://github.com/jacobwilliams/stl-fortran/commits/master)
14+
815
### Example
916

1017
```fortran
@@ -27,13 +34,19 @@ Fortran code for reading and writing STL (STereoLithography) files.
2734

2835
### Compiling
2936

30-
A [Fortran Package Manager](https://github.com/fortran-lang/fpm) manifest file is included, so that the library and tests cases can be compiled with FPM. For example:
37+
A [Fortran Package Manager](https://github.com/fortran-lang/fpm) manifest file is included, so that the library and test cases can be compiled with FPM. For example:
3138

3239
```
3340
fpm build --profile release
3441
fpm test --profile release
3542
```
3643

44+
To use `stl-fortran` within your fpm project, add the following to your `fpm.toml` file:
45+
```toml
46+
[dependencies]
47+
stl-fortran = { git="https://github.com/jacobwilliams/stl-fortran.git" }
48+
```
49+
3750
To generate the documentation using [FORD](https://github.com/Fortran-FOSS-Programmers/ford), run: ```ford stl-fortran.md```
3851

3952
### License

codecov.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
comment:
2+
layout: header, changes, diff, sunburst
3+
coverage:
4+
ignore:
5+
- test
6+
- doc
7+
status:
8+
patch:
9+
default:
10+
target: 20%
11+
project:
12+
default:
13+
target: 60%

fpm.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "stl-fortran"
22
author = "Jacob Williams"
3-
copyright = "Copyright (c) 2021, Jacob Williams"
3+
copyright = "Copyright (c) 2020-2022, Jacob Williams"
44
license = "BSD-3"
55
description = "Fortran STL File I/O"
66
homepage = "https://github.com/jacobwilliams/stl-fortran"
@@ -9,16 +9,11 @@ keywords = ["STL"]
99
[build]
1010
auto-executables = false
1111
auto-examples = false
12-
auto-tests = false
12+
auto-tests = true
1313
link = ["lapack", "blas"]
1414

1515
[library]
1616
source-dir = "src"
1717

1818
[install]
19-
library = true
20-
21-
[[test]]
22-
name = "test"
23-
source-dir = "tests"
24-
main = "test.f90"
19+
library = true
File renamed without changes.

0 commit comments

Comments
 (0)