Skip to content

Commit 50180bc

Browse files
committed
Changed CI naming; added codecov; added readthedocs deps
1 parent f6e4abb commit 50180bc

7 files changed

Lines changed: 90 additions & 7 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Build
22

33
on:
44
push:

‎.github/workflows/ci_cov.yml‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
coverage:
9+
name: coverage (gnu14)
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v5
13+
14+
- name: Install compiler
15+
uses: fortran-lang/setup-fortran@v1
16+
with:
17+
compiler: gcc
18+
version: '14'
19+
20+
- name: Install dependencies (Linux)
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y meson ninja-build liblapack-dev libunwind-dev gcovr
24+
25+
- name: Set compiler environment
26+
run: |
27+
echo "FC=gfortran" >> "$GITHUB_ENV"
28+
echo "CC=gcc" >> "$GITHUB_ENV"
29+
30+
- name: Point gcov at the gcc 14 toolchain
31+
# gcovr calls the bare `gcov`, which on ubuntu-24.04 is the gcc 13 build
32+
# and cannot read gcc 14 .gcno files. Shim it to the matching version.
33+
run: |
34+
sudo ln -sf "$(command -v gcov-14)" /usr/local/bin/gcov
35+
gcov --version | head -n1
36+
37+
- name: Build with coverage instrumentation
38+
run: |
39+
meson setup build -Db_coverage=true
40+
meson compile -C build
41+
42+
- name: Run tests
43+
run: meson test -C build --suite moist --print-errorlogs
44+
45+
- name: Generate Cobertura XML coverage report
46+
run: ninja -C build coverage-xml
47+
48+
- name: Upload coverage to Codecov
49+
uses: codecov/codecov-action@v5
50+
with:
51+
files: build/meson-logs/coverage.xml
52+
flags: fortran
53+
token: ${{ secrets.CODECOV_TOKEN }}
54+
fail_ci_if_error: false

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
/install*/
3737
/_*/
3838

39+
# Coverage artifacts
40+
*.gcda
41+
*.gcno
42+
*.gcov
43+
coverage.xml
44+
3945
# Meson subproject artifacts (transitive wraps + lock are auto-generated)
4046
subprojects/toml-f.wrap
4147
.wraplock

‎.readthedocs.yaml‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ build:
1414
sphinx:
1515
configuration: docs/conf.py
1616

17-
# Optionally, but recommended,
18-
# declare the Python requirements required to build your documentation
19-
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20-
# python:
21-
# install:
22-
# - requirements: docs/requirements.txt
17+
# Declare the Python requirements required to build your docs
18+
python:
19+
install:
20+
- requirements: docs/requirements.txt

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
MOIST: Modular and Open-source Implicit Solvation Toolkit
22
==============
33

4+
[![Coverage](https://codecov.io/gh/lukaswittmann/moist/graph/badge.svg)](https://codecov.io/gh/lukaswittmann/moist)
5+
46
> [!Note]
57
> MOIST is currently in a pre-release state.
68
> This version only includes the cavity construction capabilities of the Modular and Open-source Implicit Solvation Toolkit.

‎codecov.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Codecov configuration for MOIST.
2+
# Coverage is reported for the core Fortran library (src/) only and is purely
3+
# informational — it never blocks a merge.
4+
# Reference: https://docs.codecov.com/docs/codecovyml-reference
5+
6+
coverage:
7+
status:
8+
project:
9+
default:
10+
informational: true
11+
patch:
12+
default:
13+
informational: true
14+
15+
# Vendored subprojects, the test suite, the CLI driver and the Python wrapper
16+
# are not part of the core library coverage.
17+
ignore:
18+
- "subprojects"
19+
- "test"
20+
- "app"
21+
- "python"
22+
- "config"
23+
- "build"

0 commit comments

Comments
 (0)