[WIP] Feature/multidimension array #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | |
--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: | | |
sudo apt-get install -y valgrind | |
valgrind --error-exitcode=1 -s ./test/testsuite -A |