[Concept,14/14] CI: Build the Rust examples

Message ID 20250911214425.3687188-15-sjg@u-boot.org
State New
Headers
Series ulib: Add support for Rust main programs |

Commit Message

Simon Glass Sept. 11, 2025, 9:44 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Add the Rust examples to the 'Examples' test suite, so that we can be
sure they continue to build and run.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 .gitlab-ci.yml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
  

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3785e61ec3f..fbe56152d7a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -349,12 +349,19 @@  Examples:
       ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
         --board sandbox;
       set -e;
-    - echo "Building examples";
+    - echo "Building C examples";
       cd examples/ulib;
       make UBOOT_BUILD=${UBOOT_TRAVIS_BUILD_DIR} srctree=../..
-    - echo "Running static";
+    - echo "Running C static";
       ./demo_static
-    - echo "Running dynamic";
+    - echo "Running C dynamic";
+      LD_LIBRARY_PATH=${UBOOT_TRAVIS_BUILD_DIR} ./demo
+    - echo "Building Rust examples";
+      cd ../rust;
+      make UBOOT_BUILD=${UBOOT_TRAVIS_BUILD_DIR} srctree=../..
+    - echo "Running Rust static";
+      ./demo_static
+    - echo "Running Rust dynamic";
       LD_LIBRARY_PATH=${UBOOT_TRAVIS_BUILD_DIR} ./demo
 
 # Template for running the 'make check' tools