Skip to content

[WIP] Feature/multidimension array - Rank 2 - Rank 4 support #36

[WIP] Feature/multidimension array - Rank 2 - Rank 4 support

[WIP] Feature/multidimension array - Rank 2 - Rank 4 support #36

Workflow file for this run

name: ci
on:
push:
branches:
- master
- main
paths-ignore:
- 'AUTHORS.md'
- 'LICENSE.md'
- 'README.md'
pull_request:
paths-ignore:
- 'AUTHORS.md'
- 'LICENSE.md'
- 'README.md'
jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: ${{ matrix.os_name }} - ${{ matrix.compiler }} - ${{ matrix.build_type }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Linux
- os: ubuntu-22.04
os_name: linux
compiler: gfortran-9
shell: bash
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
- os: ubuntu-22.04
os_name: linux
compiler: gfortran-10
shell: bash
build_type: fpm
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
# - name: Add msbuild to PATH
# if: ${{ matrix.os_name == 'windows-latest' }}
# uses: microsoft/[email protected]
- uses: msys2/setup-msys2@v2
if: ${{ matrix.os == 'windows-latest' }}
with:
update: true
install: git base-devel mingw-w64-x86_64-toolchain
- name: Show version information
run: |
${{ matrix.compiler }} --version
- name: Build with Cmake
if: ${{ matrix.build_type != 'fpm' }}
run: |
cd build
FC=${{ matrix.compiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../
make VERBOSE=1
- name: fpm tests
if: ${{ matrix.build_type == 'fpm' }}
run: |
wget https://github.com/fortran-lang/fpm/releases/download/v0.9.0/fpm-0.9.0-linux-x86_64
chmod +x ./fpm-0.9.0-linux-x86_64 && mv ./fpm-0.9.0-linux-x86_64 fpm
./fpm install
./fpm test
./fpm run --example "*"
- 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
if: ${{ matrix.build_type != 'fpm' }}
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: |
sudo apt-get install -y valgrind
valgrind --error-exitcode=1 -s ./test/testsuite -A