Skip to content

updated version number in fpm file #42

updated version number in fpm file

updated version number in fpm file #42

Workflow file for this run

name: CI
on: [push]
jobs:
Build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
gcc_v: [9,10,11,12] # gfortran versions to test
python-version: [3.9]
env:
FC: gfortran-${{ matrix.gcc_v }}
GCC_V: ${{ matrix.gcc_v }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Python
if: contains( matrix.gcc_v, 10 )
uses: actions/setup-python@v4 # Use pip to install latest CMake, & FORD/Jin2For, etc.
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
if: contains( matrix.gcc_v, 10 )
uses: ts-graphviz/setup-graphviz@v1
- name: Setup Fortran Package Manager
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python dependencies
if: contains( matrix.gcc_v, 10 )
run: |
python -m pip install --upgrade pip
pip install ford numpy matplotlib
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install GFortran Linux
run: |
sudo apt-get install lcov
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }}
# - name: Compile
# run: fpm build --profile release
- name: Run tests
run: fpm test --profile debug --flag -coverage
- name: Create coverage report
if: contains( matrix.gcc_v, 10 )
run: |
mkdir -p ${{ env.COV_DIR }}
mv ./build/gfortran_*/*/* ${{ env.COV_DIR }}
lcov --capture --initial --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.base
lcov --capture --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.capture
lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info
env:
COV_DIR: build/coverage
- name: Upload coverage report
if: contains( matrix.gcc_v, 10 )
uses: codecov/codecov-action@v3
with:
files: build/coverage/coverage.info
- name: Build documentation
if: contains( matrix.gcc_v, 10 )
run: ford ./fortran-csv-module.md
- name: Deploy Documentation
if: contains( matrix.gcc_v, 10 ) && github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: doc # The folder the action should deploy.