Skip to content

Commit

Permalink
Merge pull request #5 from FluidNumerics/feature/multidimension_array
Browse files Browse the repository at this point in the history
[WIP] Feature/multidimension array
  • Loading branch information
fluidnumerics-joe authored Nov 27, 2023
2 parents cb1f518 + c6695ab commit d440161
Show file tree
Hide file tree
Showing 68 changed files with 3,509 additions and 403 deletions.
51 changes: 45 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: ${{ matrix.os_name }} - ${{ matrix.compiler }} - ${{ matrix.test_type }} - ${{ github.event_name }}
name: ${{ matrix.os_name }} - ${{ matrix.compiler }} - ${{ matrix.build_type }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -29,8 +29,17 @@ jobs:
os_name: linux
compiler: gfortran-9
shell: bash
test_type: regular
coverage: false
build_type: coverage
- os: ubuntu-22.04
os_name: linux
compiler: gfortran-10
shell: bash
build_type: debug
- os: ubuntu-22.04
os_name: linux
compiler: gfortran-11
shell: bash
build_type: debug
defaults:
run:
shell: ${{ matrix.shell }}
Expand All @@ -45,19 +54,49 @@ jobs:
with:
update: true
install: git base-devel mingw-w64-x86_64-toolchain

- name: Show version information
run: |
${{ matrix.compiler }} --version
- name: Build
run: |
cd build
FC=${{ matrix.compiler }} FFLAGS="-O0 -g" cmake ../
FC=${{ matrix.compiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../
make VERBOSE=1
- name: Run regular function tests
if: ${{ matrix.test_type == 'regular' }}
- name: Initialize coverage counters
if: ${{ matrix.build_type == 'coverage' }}
run: |
sudo apt-get update -y && sudo apt-get install lcov
lcov --no-external \
--directory /home/runner/work/feq-parse \
--zerocounters
- name: Run ctests
run: |
cd build/test
ctest || ctest --rerun-failed --output-on-failure
- name: Create coverage report
if: ${{ matrix.build_type == 'coverage' }}
run: |
lcov --no-external \
--capture \
--directory /home/runner/work/feq-parse \
--exclude '*/test/*' \
--output-file /home/runner/work/lcov.info
- name: codecov
if: ${{ matrix.build_type == 'coverage' }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: /home/runner/work/lcov.info
flags: ctests

- name: Run memory checks with Valgrind (only Linux)
if: ${{ matrix.os_name == 'linux' && matrix.test_type == 'valgrind' }}
run: |
Expand Down
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ IF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)
MESSAGE(FATAL_ERROR "Fortran compiler does not support F90")
ENDIF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)

# Default Fortran compiler flags
# Fortran compiler flags
if( "${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU" )
set( CMAKE_Fortran_FLAGS "-cpp -ffree-line-length-512" )
set( CMAKE_Fortran_FLAGS_DEBUG "-g -O0 -C -Wall -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow" )
set( CMAKE_Fortran_FLAGS_COVERAGE "${CMAKE_Fortran_FLAGS_DEBUG} --coverage")
set( CMAKE_Fortran_FLAGS_PROFILE "-pg -O3")
set( CMAKE_Fortran_FLAGS_RELEASE "-O3" )

set( CMAKE_C_FLAGS_COVERAGE "-g -O0 --coverage")

endif()

ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/src)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/test)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright 2020 Fluid Numerics LLC

[![Build Status](https://github.com/fluidnumerics/feq-parse/actions/workflows/ci.yml/badge.svg)](https://github.com/FluidNumerics/feq-parse/actions)
[![codecov](https://codecov.io/gh/FluidNumerics/feq-parse/graph/badge.svg?token=IBNDDI4MHB)](https://codecov.io/gh/FluidNumerics/feq-parse)

`feqparse` is an equation parser Fortran class that is used to interpret and evaluate functions provided as strings.

Expand Down
Loading

0 comments on commit d440161

Please sign in to comment.