Message ID | 20230215220925.2313528-2-sstabellini@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | automation: add arm32 xl domU creation test | expand |
Hi Stefano, On 15/02/2023 23:09, Stefano Stabellini wrote: > > > From: Stefano Stabellini <stefano.stabellini@amd.com> > > 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@amd.com> > --- > Changes in v2: > - only copy binaries for the arm32 target > --- > automation/build/yocto/build-yocto.sh | 9 +++++++++ > automation/gitlab-ci/build.yaml | 1 + > 2 files changed, 10 insertions(+) > > diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh > index 3601cebc3c..dd7065e5b2 100755 > --- a/automation/build/yocto/build-yocto.sh > +++ b/automation/build/yocto/build-yocto.sh > @@ -166,6 +166,13 @@ function project_build() { > source "${YOCTODIR}/poky/oe-init-build-env" "${destdir}" > > bitbake "${build_image}" || exit 1 > + if [ $target = "qemuarm" ] > + then > + mkdir -p $OUTPUT > + cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUT > + cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUT > + cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUT > + fi I think it would be cleaner and more helpful especially for those using the yocto jobs locally to add a new parameter to build-yocto.sh (set by default to n) to copy the build output to a directory (e.g. binaries) instead of hardcoding it only for qemuarm. > ) || return 1 > } > > @@ -238,6 +245,8 @@ Options: > EOF > } > > +OUTPUT=`pwd`/binaries NIT: seems like all the variables in this script storing a directory path have a "DIR" suffix, so it should be OUTPUTDIR. Also, why not to define it at the top of the file? ~Michal
diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh index 3601cebc3c..dd7065e5b2 100755 --- a/automation/build/yocto/build-yocto.sh +++ b/automation/build/yocto/build-yocto.sh @@ -166,6 +166,13 @@ function project_build() { source "${YOCTODIR}/poky/oe-init-build-env" "${destdir}" bitbake "${build_image}" || exit 1 + if [ $target = "qemuarm" ] + then + mkdir -p $OUTPUT + cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUT + cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUT + cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUT + fi ) || return 1 } @@ -238,6 +245,8 @@ Options: EOF } +OUTPUT=`pwd`/binaries + for OPTION in "$@" do case ${OPTION} in diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index f62cf21f45..d4a2aa9a5b 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -215,6 +215,7 @@ artifacts: paths: - 'logs/*' + - binaries/ when: always needs: []