Skip to content

Update CI.yml

Update CI.yml #126

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]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Fortran compiler
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc
version: 10
- name: Install fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fpm-version: 'v0.10.1'
- name: Build with coverage info
run: |
gfortran --version
rm -rf ./build/gfortran*
fpm test --profile debug --flag "--coverage -fopenmp" --verbose
gcov ./build/gfortran*/hrweno/src*.gcda -r ./src/ -b -w
- name: Run examples
run: |
gfortran --version
fpm run --example "example1*" --profile release --flag "-fopenmp"
fpm run --example "example2*" --profile release --flag "-fopenmp"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true