diff --git a/.github/workflows/system-tests-latest-components.yml b/.github/workflows/system-tests-latest-components.yml index 2953bcf2d..f330cc501 100644 --- a/.github/workflows/system-tests-latest-components.yml +++ b/.github/workflows/system-tests-latest-components.yml @@ -4,7 +4,7 @@ on: schedule: - cron: "0 4 * * *" workflow_dispatch: - + jobs: gather-refs: name: Map Git branches to latest refs @@ -140,6 +140,8 @@ jobs: OPENFOAM_ADAPTER_REF:${{ needs.gather-refs.outputs.ref-openfoam-adapter }},\ SU2_VERSION:7.5.1,\ SU2_ADAPTER_REF:${{ needs.gather-refs.outputs.ref-su2-adapter }},\ - TUTORIALS_REF:${{ needs.gather-refs.outputs.ref-tutorials }}" + TUTORIALS_REF:${{ needs.gather-refs.outputs.ref-tutorials }},\ + DUNE_VERSION:2.9,\ + DUMUX_VERSION:3.7" system_tests_branch: develop - log_level: "INFO" \ No newline at end of file + log_level: "INFO" diff --git a/free-flow-over-porous-media/metadata.yaml b/free-flow-over-porous-media/metadata.yaml new file mode 100644 index 000000000..c309adb92 --- /dev/null +++ b/free-flow-over-porous-media/metadata.yaml @@ -0,0 +1,21 @@ +name: Free flow over porous media +path: free-flow-over-porous-media +url: https://precice.org/tutorials-free-flow-over-porous-media.html + +participants: + - Free-Flow + - Porous-Media + +cases: + free-flow-dumux: + participant: Free-Flow + directory: ./free-flow-dumux + run: ./run.sh + component: dumux-adapter + + porous-media-dumux: + participant: Porous-Media + directory: ./porous-media-dumux + run: ./run.sh + component: dumux-adapter + diff --git a/tools/tests/build_docker_images.py b/tools/tests/build_docker_images.py index 89b9a3041..8dfb0c401 100644 --- a/tools/tests/build_docker_images.py +++ b/tools/tests/build_docker_images.py @@ -30,7 +30,8 @@ def main(): args = parser.parse_args() # Configure logging based on the provided log level - logging.basicConfig(level=args.log_level, format='%(levelname)s: %(message)s') + logging.basicConfig(level=args.log_level, + format='%(levelname)s: %(message)s') print(f"Using log-level: {args.log_level}") @@ -48,7 +49,8 @@ def main(): test_suite_found = available_testsuites.get_by_name( test_suite_requested) if not test_suite_found: - logging.error(f"Did not find the testsuite with name {test_suite_requested}") + logging.error( + f"Did not find the testsuite with name {test_suite_requested}") else: test_suites_to_execute.append(test_suite_found) if not test_suites_to_execute: @@ -66,15 +68,18 @@ def main(): if not systemtests_to_run: raise RuntimeError("Did not find any Systemtests to execute.") - logging.info(f"About to build the images for the following systemtests:\n {systemtests_to_run}") + logging.info( + f"About to build the images for the following systemtests:\n {systemtests_to_run}") results = [] for number, systemtest in enumerate(systemtests_to_run): - logging.info(f"Started building {systemtest}, {number}/{len(systemtests_to_run)}") + logging.info( + f"Started building {systemtest}, {number}/{len(systemtests_to_run)}") t = time.perf_counter() result = systemtest.run_only_build(run_directory) elapsed_time = time.perf_counter() - t - logging.info(f"Building image for {systemtest} took {elapsed_time:^.1f} seconds") + logging.info( + f"Building image for {systemtest} took {elapsed_time:^.1f} seconds") results.append(result) build_docker_success = True diff --git a/tools/tests/component-templates/dumux-adapter.yaml b/tools/tests/component-templates/dumux-adapter.yaml new file mode 100644 index 000000000..e3a93a718 --- /dev/null +++ b/tools/tests/component-templates/dumux-adapter.yaml @@ -0,0 +1,16 @@ +build: + context: {{ dockerfile_context }} + args: + {% for key, value in build_arguments.items() %} + - {{key}}={{value}} + {% endfor %} + target: dumux_adapter +depends_on: + prepare: + condition: service_completed_successfully +volumes: + - {{ run_directory }}:/runs +command: > + /bin/bash -c "id && + cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' && + {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1" diff --git a/tools/tests/components.yaml b/tools/tests/components.yaml index 35f5d1739..f30342b98 100644 --- a/tools/tests/components.yaml +++ b/tools/tests/components.yaml @@ -165,4 +165,25 @@ dealii-adapter: default: "master" DEALII_ADAPTER_REF: description: Version of deal.ii-adapter to use - default: "master" \ No newline at end of file + default: "master" + +dumux-adapter: + repository: https://github.com/precice/dumux-adapter + template: component-templates/dumux-adapter.yaml + build_arguments: + PLATFORM: + description: Dockerfile platform used + default: "ubuntu_2404" + PRECICE_REF: + description: Version of preCICE to use + default: "main" + PRECICE_PRESET: + description: CMake preset of preCICE + default: "production-audit" + TUTORIALS_REF: + description: Tutorial git reference to use + default: "master" + DUMUX_ADAPTER_REF: + semnantic: Git ref of the dumux adapter to use + default: "main" + diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index 7cd356612..00102bce3 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -22,25 +22,25 @@ USER root # Installing necessary dependecies for preCICE RUN apt-get -qq update && \ apt-get -qq -y install \ - build-essential \ - software-properties-common \ - cmake \ - curl \ - g++ \ - gfortran \ - git \ - libbenchmark-dev \ - libboost-all-dev \ - libeigen3-dev \ - libxml2-dev \ - lsb-release \ - petsc-dev \ - python3-dev \ - python3-numpy \ - python3-pip \ - python3-venv \ - pkg-config \ - wget + build-essential \ + software-properties-common \ + cmake \ + curl \ + g++ \ + gfortran \ + git \ + libbenchmark-dev \ + libboost-all-dev \ + libeigen3-dev \ + libxml2-dev \ + lsb-release \ + petsc-dev \ + python3-dev \ + python3-numpy \ + python3-pip \ + python3-venv \ + pkg-config \ + wget USER precice FROM precice_dependecies AS precice @@ -187,4 +187,36 @@ RUN git clone https://github.com/precice/dealii-adapter.git &&\ if [ -n "${DEALII_ADAPTER_PR}" ]; then git fetch origin pull/${DEALII_ADAPTER_PR}/head; fi && \ git checkout ${DEALII_ADAPTER_REF} && \ cmake . && \ - make -j $(nproc) \ No newline at end of file + make -j $(nproc) + +FROM precice_dependecies AS dumux +USER root +RUN apt-get update +USER precice +COPY --from=precice /home/precice/.local/ /home/precice/.local/ +ARG DUNE_VERSION +ARG DUMUX_VERSION +RUN mkdir dumux&&\ + cd dumux&&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-common.git -b releases/$DUNE_VERSION &&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-geometry.git -b releases/$DUNE_VERSION &&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-grid.git -b releases/$DUNE_VERSION &&\ + git clone --depth 1 https://gitlab.dune-project.org/core/dune-istl.git -b releases/$DUNE_VERSION &&\ + git clone --depth 1 https://gitlab.dune-project.org/extensions/dune-subgrid.git -b releases/$DUNE_VERSION &&\ + git clone --depth 1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git -b releases/$DUMUX_VERSION &&\ + git clone -b cell_problems https://git.iws.uni-stuttgart.de/dumux-appl/dumux-phasefield.git &&\ + git clone --depth 1 https://gitlab.dune-project.org/extensions/dune-SPGrid.git -b releases/$DUNE_VERSION +USER precice +WORKDIR /home/precice/dumux +ENV PATH ${WORKDIR}/dune-common/bin:${PATH} +# build core DUNE, DuMuX and the adapter +RUN dunecontrol --opts=cmake-test.opts all +ENV DUNE_CONTROL_PATH=${WORKDIR}/dune-common/dune.module:${WORKDIR}/dune-geometry/dune.module:${WORKDIR}/dune-grid/dune.module:${WORKDIR}/dune-localfunctions/dune.module:${WORKDIR}/dune-istl/dune.module:${WORKDIR}/dune-subgrid/dune.module:${WORKDIR}/dumux/dune.module +ARG DUMUX_ADAPTER_PR +ARG DUMUX_ADAPTER_REF +RUN git clone --depth 1 https://github.com/precice/dumux-adapter.git &&\ + cd dumux-adapter && \ + if [ -n "${DUMUX_ADAPTER_PR}" ]; then git fetch origin pull/${DUMUX_ADAPTER_PR}/head; fi && \ + git checkout ${DUMUX_ADAPTER_REF} && \ + cd .. &&\ + dunecontrol --opts=cmake-test.opts --only=dumux-adapter all \ No newline at end of file diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index 30bfd6ba2..07f774085 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -22,8 +22,8 @@ test_suites: tutorials: - path: flow-over-heated-plate case_combination: - - fluid-openfoam - - solid-fenics + - fluid-openfoam + - solid-fenics reference_result: ./flow-over-heated-plate/reference-results/fluid-openfoam_solid-fenics.tar.gz nutils_test: tutorials: @@ -39,6 +39,18 @@ test_suites: - fluid-openfoam - solid-calculix reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-calculix.tar.gz + dumux_test: + tutorials: + # - path: free-flow-over-porous-media + # case_combination: + # - free-flow-dumux + # - porous-media-dumux + # reference_result: ./free-flow-over-porous-media/reference-results/free-flow-dumux_porous-media-dumux.tar.gz + - path: two-scale-heat-conduction + case_combination: + - macro-dumux + - micro-dumux + reference_result: ./two-scale-heat-conduction/reference-results/macro-dumux_micro-dumux.tar.gz su2_test: tutorials: - path: perpendicular-flap @@ -128,4 +140,4 @@ test_suites: - fluid-openfoam - solid-upstream-dealii - solid-downstream-dealii - reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii.tar.gz \ No newline at end of file + reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii.tar.gz diff --git a/two-scale-heat-conduction/metadata.yaml b/two-scale-heat-conduction/metadata.yaml new file mode 100644 index 000000000..0270198c2 --- /dev/null +++ b/two-scale-heat-conduction/metadata.yaml @@ -0,0 +1,20 @@ +name: Two-scale heat conduction +path: two-scale-heat-conduction +url: https://precice.org/tutorials-two-scale-heat-conduction.html + +participants: + - macro-heat + - Micro-Manager + +cases: + macro-dumux: + participant: macro-heat + directory: ./macro-dumux + run: ./run.sh + component: dumux-adapter + + micro-dumux: + participant: Micro-Manager + directory: ./micro-dumux + run: ./run.sh + component: dumux-adapter