[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] automation: add binaries/ to artifacts for Yocto arm32 job



commit a0c3b87a764bcbd433f5f248c5ae2e2ca60a1321
Author:     Stefano Stabellini <stefano.stabellini@xxxxxxx>
AuthorDate: Fri Feb 17 16:07:46 2023 -0800
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxx>
CommitDate: Mon Feb 27 13:19:31 2023 -0800

    automation: add binaries/ to artifacts for Yocto arm32 job
    
    Copy the build output of Yocto builds to binaries/ for the arm32 target,
    and export binaries/ among the jobs artifacts so that they can be reused
    by other jobs.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
    Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 automation/build/yocto/build-yocto.sh | 16 ++++++++++++++++
 automation/gitlab-ci/build.yaml       |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/automation/build/yocto/build-yocto.sh 
b/automation/build/yocto/build-yocto.sh
index 3601cebc3c..93ce81ce82 100755
--- a/automation/build/yocto/build-yocto.sh
+++ b/automation/build/yocto/build-yocto.sh
@@ -18,6 +18,7 @@ CACHEDIR="$HOME/yocto-cache"
 LOGDIR="$HOME/logs"
 XENDIR="$HOME/xen"
 BUILDDIR="$HOME/build"
+OUTPUTDIR=`pwd`/binaries
 
 # what yocto bsp we support
 TARGET_SUPPORTED="qemuarm qemuarm64 qemux86-64"
@@ -31,6 +32,7 @@ do_build="y"
 do_run="y"
 do_localsrc="n"
 do_dump="n"
+do_copy="n"
 build_result=0
 
 # layers to include in the project
@@ -166,6 +168,16 @@ function project_build() {
         source "${YOCTODIR}/poky/oe-init-build-env" "${destdir}"
 
         bitbake "${build_image}" || exit 1
+        if [ $do_copy = "y" ]
+        then
+            if [ $target = "qemuarm" ]
+            then
+                mkdir -p $OUTPUTDIR
+                cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUTDIR
+                cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUTDIR
+                cp 
$BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUTDIR
+            fi
+        fi
     ) || return 1
 }
 
@@ -235,6 +247,7 @@ Options:
                    Default: ${CACHEDIR}
   --layer-dir=DIR  directory containing the checkout of yocto layers
                    Default: ${YOCTODIR}
+  --copy-output    Copy output binaries to binaries/
 EOF
 }
 
@@ -290,6 +303,9 @@ do
         --layer-dir=*)
             YOCTODIR="${OPTION#*=}"
             ;;
+        --copy-output)
+            do_copy="y"
+            ;;
         --*)
             echo "Invalid option ${OPTION}"
             help
diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 8a08052051..9b7425cca8 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -208,13 +208,14 @@
     - /^coverity-tested\/.*/
     - /^stable-.*/
   script:
-    - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs 
--xen-dir=`pwd` ${YOCTO_BOARD}
+    - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs 
--xen-dir=`pwd` ${YOCTO_BOARD} ${YOCTO_OUTPUT}
   variables:
     YOCTO_VERSION: kirkstone
     CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}-${YOCTO_HOST}
   artifacts:
     paths:
       - 'logs/*'
+      - binaries/
     when: always
   needs: []
 
@@ -664,6 +665,7 @@ yocto-qemuarm:
   extends: .yocto-test-arm64
   variables:
     YOCTO_BOARD: qemuarm
+    YOCTO_OUTPUT: --copy-output
 
 yocto-qemux86-64:
   extends: .yocto-test-arm64
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.