Skip to content

Commit 11d9ef9

Browse files
committed
CI updates
1 parent 4b32151 commit 11d9ef9

File tree

2 files changed

+33
-14
lines changed

2 files changed

+33
-14
lines changed

.github/workflows/CI.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
matrix:
1010
os: [ubuntu-latest]
1111
gcc_v: [10] # Version of GFortran we want to use.
12-
python-version: [3.7]
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

@@ -29,7 +29,7 @@ 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

@@ -43,25 +43,38 @@ jobs:
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

56-
- name: Run test
57-
run: fpm test
55+
- name: Run app
56+
run: fpm run --profile debug --flag -coverage -- configs/ci.json
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 ./quadrature-fortran.md
6174

6275
- name: Deploy Documentation
6376
if: github.ref == 'refs/heads/master'
64-
uses: JamesIves/github-pages-deploy-action@4.1.0
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.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33

44
Adaptive Gaussian Quadrature with Modern Fortran
55

6+
### Status
7+
[![GitHub release](https://img.shields.io/github/release/jacobwilliams/quadrature-fortran.svg)](https://github.com/jacobwilliams/quadrature-fortran/releases/latest)
8+
[![CI Status](https://github.com/jacobwilliams/quadrature-fortran/actions/workflows/CI.yml/badge.svg)](https://github.com/jacobwilliams/quadrature-fortran/actions)
9+
[![codecov](https://codecov.io/gh/jacobwilliams/quadrature-fortran/branch/master/graph/badge.svg)](https://codecov.io/gh/jacobwilliams/quadrature-fortran)
10+
[![last-commit](https://img.shields.io/github/last-commit/jacobwilliams/quadrature-fortran)](https://github.com/jacobwilliams/quadrature-fortran/commits/master)
11+
612
### Brief description
713

814
An object-oriented modern Fortran library to integrate functions using adaptive Gaussian quadrature. There are five selectable methods to use:

0 commit comments

Comments
 (0)