Skip to content

Commit

Permalink
Create test recipe for Fortuno
Browse files Browse the repository at this point in the history
  • Loading branch information
aradi committed Nov 13, 2024
1 parent 23e7d6f commit 065de81
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
22 changes: 22 additions & 0 deletions recipes/fortuno/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -ex

if [ "${mpi}" == "nompi" ]; then
MPI=OFF
else
MPI=ON
fi

cmake_options=(
${CMAKE_ARGS}
"-DWITH_FORTUNO_SERIAL=ON"
"-DWITH_FORTUNO_MPI=${MPI}"
)

mkdir -p _build
pushd _build

FFLAGS="-fno-backtrace" cmake "${cmake_options[@]}" -GNinja ..
ninja all install

popd
4 changes: 4 additions & 0 deletions recipes/fortuno/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mpi:
- nompi
# - mpich
# - openmpi
73 changes: 73 additions & 0 deletions recipes/fortuno/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{% set name = "fortuno" %}
{% set version = "0.1" %}
{% set build = 0 %}
{% set mpi = mpi or "nompi" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/fortuno-repos/fortuno/archive/refs/heads/main.zip
# url: https://github.com/fortuno-repos/fortuno/releases/download/{{ version }}/fortuno-{{ version }}.tar.gz
sha256: 2ad45984038b5ca663e0d7baa1c77811d3662c573795d342c94aaf24e5bedeae

build:
number: {{ build }}
skip: True # [win]

{% if mpi != "nompi" %}
{% set mpi_prefix = "mpi_" + mpi %}
{% else %}
{% set mpi_prefix = "nompi" %}
{% endif %}
string: "{{ mpi_prefix }}_h{{ PKG_HASH }}_{{ build }}"

{% if mpi != "nompi" %}
run_exports:
- {{ name }} * {{ mpi_prefix }}_*
{% endif %}


requirements:
build:
- {{ compiler('fortran') }}
# this is necessary for all compiled recipes
- {{ stdlib('c') }}
- cmake
- ninja
- pkg-config
host:
- {{ mpi }} # [mpi != "nompi"]
run:
- {{ mpi }} # [mpi != "nompi"]

test:
requires:
- pkg-config
commands:
- pkg-config {{ name }} --exact-version={{ version }}

about:
home: https://github.com/fortuno-repos/fortuno
summary: 'Flextensible unit testing framework for Fortran'
description: |
Fortuno (Fortran Unit Testing Objects) is a flexible & extensible, object-oriented unit testing
framework designed for the Fortran programming language. It emphasizes ease of use by minimizing
boiler plate code when writing tests, while also prioratizing modularity and extensibility.
Fortuno provides the essential building blocks to help developers create customized unit testing
solutions.
license: BSD-2-Clause-Patent
license_family: BSD
# It is required to include a license file in the package,
# (even if the license doesn't require it) using the license_file entry.
# Please also note that some projects have multiple license files which all need to be added using a valid yaml list.
# See https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#license-file
license_file: LICENSE
# The doc_url and dev_url are optional.
doc_url: https://fortuno.readthedocs.io/
dev_url: https://github.com/fortuno-repos/fortuno

extra:
recipe-maintainers:
- aradi

0 comments on commit 065de81

Please sign in to comment.