From 2dd03ce740d97fb6f4da6342c66760237b3cba93 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 18 Jul 2026 21:13:53 +0200 Subject: [PATCH 1/2] Add rust-bindings to the system tests --- elastic-tube-1d/metadata.yaml | 4 +- .../component-templates/rust-bindings.yaml | 17 +++++++ tools/tests/components.yaml | 48 ++++++++++++------- .../tests/dockerfiles/ubuntu_2404/Dockerfile | 20 ++++++++ tools/tests/tests.yaml | 12 +++++ 5 files changed, 83 insertions(+), 18 deletions(-) create mode 100644 tools/tests/component-templates/rust-bindings.yaml diff --git a/elastic-tube-1d/metadata.yaml b/elastic-tube-1d/metadata.yaml index e8fcc30a8..11d90961d 100644 --- a/elastic-tube-1d/metadata.yaml +++ b/elastic-tube-1d/metadata.yaml @@ -35,7 +35,7 @@ cases: participant: Fluid directory: ./fluid-rust run: ./run.sh - component: bare + component: rust-bindings solid-cpp: participant: Solid @@ -65,4 +65,4 @@ cases: participant: Solid directory: ./solid-rust run: ./run.sh - component: bare + component: rust-bindings diff --git a/tools/tests/component-templates/rust-bindings.yaml b/tools/tests/component-templates/rust-bindings.yaml new file mode 100644 index 000000000..7884d7af3 --- /dev/null +++ b/tools/tests/component-templates/rust-bindings.yaml @@ -0,0 +1,17 @@ +build: + context: {{ dockerfile_context }} + args: + {% for key, value in build_arguments.items() %} + - {{key}}={{value}} + {% endfor %} + target: rust_bindings +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 658b1d826..2da554503 100644 --- a/tools/tests/components.yaml +++ b/tools/tests/components.yaml @@ -90,22 +90,6 @@ dune-adapter: repository: https://github.com/precice/dune-adapter default: "main" - -solids4foam: - repository: https://github.com/solids4foam/solids4foam - template: component-templates/solids4foam.yaml - build_arguments: - PLATFORM: - description: Dockerfile platform used - default: "ubuntu_2404" - # The name "PLATFORM" is misleading: For this component, we use a different base image. - TUTORIALS_REF: - description: Tutorial git reference to use - default: "master" - OPENFOAM_ADAPTER_REF: - description: Reference/tag of the OpenFOAM adapter to use - default: "master" - fenics-adapter: template: component-templates/fenics-adapter.yaml build_arguments: @@ -250,6 +234,38 @@ python-bindings: repository: https://github.com/precice/python-bindings default: "develop" +rust-bindings: + template: component-templates/rust-bindings.yaml + build_arguments: + PLATFORM: + default: "ubuntu_2404" + PRECICE_REF: + repository: https://github.com/precice/precice + default: "develop" + PRECICE_PRESET: + default: "production-audit" + TUTORIALS_REF: + repository: https://github.com/precice/tutorials + default: "develop" + RUST_BINDINGS_REF: + repository: https://github.com/precice/rust-bindings + default: "develop" + +solids4foam: + repository: https://github.com/solids4foam/solids4foam + template: component-templates/solids4foam.yaml + build_arguments: + PLATFORM: + description: Dockerfile platform used + default: "ubuntu_2404" + # The name "PLATFORM" is misleading: For this component, we use a different base image. + TUTORIALS_REF: + description: Tutorial git reference to use + default: "master" + OPENFOAM_ADAPTER_REF: + description: Reference/tag of the OpenFOAM adapter to use + default: "master" + su2-adapter: template: component-templates/su2-adapter.yaml build_timeout: 600 diff --git a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile index 64f31db33..c1fbf3864 100644 --- a/tools/tests/dockerfiles/ubuntu_2404/Dockerfile +++ b/tools/tests/dockerfiles/ubuntu_2404/Dockerfile @@ -119,6 +119,26 @@ RUN git clone https://github.com/precice/python-bindings.git python-bindings && ### end of python_bindings stage ### +FROM precice AS rust_bindings +ARG RUST_BINDINGS_PR +ARG RUST_BINDINGS_REF + +USER root +RUN apt-get -qq update && \ + apt-get -qq install rustup + +USER precice +WORKDIR /home/precice + +RUN rustup default stable && \ + git clone https://github.com/precice/rust-bindings.git rust-bindings && \ + cd rust-bindings && \ + if [ -n "${RUST_BINDINGS_PR}" ]; then git fetch origin pull/${RUST_BINDINGS_PR}/head; fi && \ + git checkout ${RUST_BINDINGS_REF} && \ + cargo build +### end of rust_bindings stage ### + + FROM precice AS micro_manager ARG MICRO_MANAGER_REF diff --git a/tools/tests/tests.yaml b/tools/tests/tests.yaml index 35122dd7e..5485c2c61 100644 --- a/tools/tests/tests.yaml +++ b/tools/tests/tests.yaml @@ -116,6 +116,13 @@ test_suites: - fluid-python - solid-python reference_result: ./elastic-tube-1d/reference-results/fluid-python_solid-python.tar.gz + - &elastic-tube-1d_fluid-rust_solid-rust + path: elastic-tube-1d + case_combination: + - fluid-rust + - solid-rust + reference_result: ./elastic-tube-1d/reference-results/fluid-rust_solid-rust.tar.gz + elastic-tube-3d: tutorials: @@ -680,6 +687,7 @@ test_suites: - *elastic-tube-1d_fluid-fortran_solid-fortran - *elastic-tube-1d_fluid-fortran-module_solid-fortran-module - *elastic-tube-1d_fluid-python_solid-python + - *elastic-tube-1d_fluid-rust_solid-rust - *elastic-tube-3d_fluid-openfoam_solid-calculix - *flow-around-controlled-moving-cylinder_controller-fmi_fluid-openfoam_solid-python - *flow-over-heated-plate_fluid-openfoam_solid-fenics @@ -900,6 +908,10 @@ test_suites: - *perpendicular-flap_fluid-su2_solid-fenics - *two-scale-heat-conduction_macro-nutils_micro-nutils + rust-bindings: + tutorials: + - *elastic-tube-1d_fluid-rust_solid-rust + solids4foam: tutorials: - *perpendicular-flap_fluid-openfoam_solid-solids4foam From 7b4ef31aa7abc28f0530bee5c42a1102177949b5 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 18 Jul 2026 21:34:14 +0200 Subject: [PATCH 2/2] Add RUST_BINDINGS_REF to reference_versions.yaml --- tools/tests/reference_versions.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tests/reference_versions.yaml b/tools/tests/reference_versions.yaml index d9994c125..852cd514d 100644 --- a/tools/tests/reference_versions.yaml +++ b/tools/tests/reference_versions.yaml @@ -25,6 +25,7 @@ MICRO_MANAGER_REF: "bf5ea7b" # develop, July 7, 2026 OPENFOAM_ADAPTER_REF: "2c3062c" # develop, May 27, 2026 PRECICE_REF: "v3.4.1" PYTHON_BINDINGS_REF: "v3.4.0" +RUST_BINDINGS_REF: "v3.4.0" SU2_ADAPTER_REF: "5abe79b" # develop, May 27, 2026 TUTORIALS_REF: "develop"