[Concept,09/10] CI: ulib: Test building examples separately

Message ID 20250905212330.354827-10-sjg@u-boot.org
State New
Headers
Series ulib: Provide examples for building outside the tree |

Commit Message

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

Check that it is possible to build the ulib examples separately from
the U-Boot build.

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

 .gitlab-ci.yml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
  

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 59bcd798d6f..e4e86801fdc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -337,6 +337,26 @@  Check packing of Python tools:
   script:
     - make pip
 
+Examples:
+  extends: .test_suites
+  script:
+    - git config --global user.name "GitLab CI Runner";
+      git config --global user.email trini@konsulko.com;
+      git config --global --add safe.directory "${CI_PROJECT_DIR}";
+      export USER=gitlab;
+      export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox;
+      set +e;
+      ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
+        --board sandbox;
+      set -e;
+    - echo "Building examples";
+      cd examples/ulib;
+      make UBOOT_BUILD=${UBOOT_TRAVIS_BUILD_DIR} srctree=../..
+    - echo "Running static";
+      ./demo_static
+    - echo "Running dynamic";
+      LD_LIBRARY_PATH=${UBOOT_TRAVIS_BUILD_DIR} ./demo
+
 # Template for running the 'make check' tools
 .python_check_template:
   stage: test.py