Skip to content

[WIP] Feature/multidimension array #8

[WIP] Feature/multidimension array

[WIP] Feature/multidimension array #8

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
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
run: |
cd build
FC=${{ matrix.compiler }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ../
make VERBOSE=1
- name: Initialize coverage counters
if: ${{ matrix.build_type == 'coverage' }}
run: |
sudo apt-get update -y && sudo apt-get install lcov
lcov --no-external \
--capture \
--initial \
--output-file lcov_base.info
- 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 \
--output-file lcov_test.info
lcov --add-tracefile lcov_base.info \
--add-tracefile lcov_test.info \
--output-file lcov.info
rm lcov_test.info lcov_base.info
- name: Upload coverage reports to Codecov
if: ${{ matrix.build_type == 'coverage' }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- 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