Skip to content

modernize dodstp

modernize dodstp #79

Workflow file for this run

name: Build and test pkg
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
gcc_v: [10] # Version of GFortran we want to use.
include:
- os: ubuntu-latest
os-arch: linux-x86_64
env:
FC: gfortran
GCC_V: ${{ matrix.gcc_v }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install GFortran Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
- name: Install fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fpm-version: "v0.10.0"
- name: Build with coverage info
run: |
gfortran --version
rm -rf ./build/gfortran*
fpm test --profile debug --flag "--coverage" --verbose
gcov ./build/gfortran*/odrpack95/src*.gcda -r ./src/ -b -w
- name: Run examples
run: |
gfortran --version
fpm run --example "example5" --profile release
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true