Skip to content

Adding fpm support (#16) #26

Adding fpm support (#16)

Adding fpm support (#16) #26

name: Build/Test
on: [push, pull_request]
jobs:
build-linux-and-macos:
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8"]
build-type: [Release]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true
- name: Show conda installation info
run: |
conda info
conda list
- name: Install build tools and dependencies into env
run: |
conda install -c conda-forge --override-channels fortran-compiler cmake bmi-fortran
conda list
- name: Make cmake build directory
run: cmake -E make_directory build
- name: Configure cmake
working-directory: ${{ github.workspace }}/build
run: |
cmake $GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
- name: Build
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target install --config ${{ matrix.build-type }}
- name: Test
working-directory: ${{ github.workspace }}/build
run: ctest -C ${{ matrix.build-type }} --output-on-failure
- name: Memcheck
if: matrix.os == 'ubuntu-latest'
working-directory: ${{ github.workspace }}/example
run: |
sudo apt-get install -y valgrind
valgrind \
--tool=memcheck \
--leak-check=yes \
--show-reachable=yes \
--num-callers=20 \
--track-fds=yes \
run_bmiheatf test1.cfg