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

Re: [PATCH v2 0/3] Yocto Gitlab CI


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 19 Oct 2022 08:10:50 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vtGb7538Cx8y2U4c/1zdE7k1Q7Ac0s9VsCZsLE3gk6g=; b=aR1ZkkvOhBlx5F+p3bF1rSap4FMWZAmdpFSxFJ7lix4iWmGFBJC3PXLTaFAIv6cMHdWqnraLTrKEEQycddHsdvxo9cNppEP7DugVKvtTfA8w7tZQi7mr2Q/IVBCf2RYl/EuQpHYW5uEkQMiBsZhUMy8uEeVeqnrF+1UjMFeTti1dI2VUEVdF46zH7qgbPqd7IlRzKE7047Qbc1IvQahgAXz0XMdIw+VYBsU/dG1U9SZvSpVz/bAJCl5GhRDTmOZ0ZZmoohNQpB41pr9XIT4HdB7dxHjeXhy4JbAIZIXJ3nGl4p56FOFXAgB8Zvar3oIA8+0f+v1gK/KSB1xvpCxrEg==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vtGb7538Cx8y2U4c/1zdE7k1Q7Ac0s9VsCZsLE3gk6g=; b=O3OYBb0sCrw/Eg4Jzw+eA/0Op+922cDwHIgJ7U/elFgErGJI9lw8vbCOJrWbNeYjZj+gvTD97DEvwlfIJya2EE0eiMLr9iwEqaSjERYvSNJGZOpuOdVlZUZJkd0etlzAuNzIDqOBS46X38MNjXdfLtAEf0tJsRXEJlq2MTMqvuRJrfnDiy3C5Qsiig1g7HIEEXltoBY58RKIwD6I9JcedQhuhIdLmmCr3seXSH0/CNMRixoUdeYan+90zazlU+7wboz37TTZePSD0ZpEo2BLUyfAo1/HnxxdWRy4CMxdIv1bV2ijDqZxPbLOsYd7KOmsu0f4YWVzVJDox1daWJrbCg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=D2zsURfvCc8qVkvOMJlY2OXPdgYykH34bB0fcpVlLiF5jLA1ML5+27puayrXSZr1nxZnMtdZchsV57e3InZX9P2azHGSgygNn1BnthSdvQrWUX/QolIxSjuMs+r5GWftxKRBe1xf4nqFivcHgQLgM/uO1zsd8b93zg+8t6MrhCvo9MnSEpkj1ij5LvNWOG8QEIKYMPDNBUfZfMDCoCOIdgz/gUZSuJg4o3o0FbarCaUFVRnYO4T0WW9fjqaAAGESur3gFhMvKWEVIkBKVYFlW06VJU1x0n6y6OFIQ6lC28cKndjscLGI0DFKWbLnjv1bUy5tB/Hos5hOGwj7bztUmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mewOLLt33gpDH0uL6FCACeHvKeLa/rEjS78IKBr5vOjovDjCVcnB3m7WEDTCA5roFWZzRZQwFt69FXAKGZOIjVCQgRe2/bPO9B04qYN2IfacvpmPN+w/M5tJMGpnGw8/QTVueVBN6blk0BhCPynnONDxs+nUwn1tEef/2p5M0Cr2wRcawke2FxCwP580tZeHMmQ4zlq3nIoo43GpB7aDuw73erkl1iUTkBRuUaYgbJXzGsdoDc9f6xHGTREjEZt0kAO/nfoJZi2D6onEqtuNewaHKZFkpr/id9JlgOT2f63Pfi5GLfl3JFRti9zDzp3jOBF6/WD8TwPGodFNDWSZcw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>
  • Delivery-date: Wed, 19 Oct 2022 08:11:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHY3hEMDLhOM5SRDUy6m8XkPQoc/64OWrqAgAP8xgCAAQ3WgIABes6AgACIUwA=
  • Thread-topic: [PATCH v2 0/3] Yocto Gitlab CI

Hi Stefano,

> On 19 Oct 2022, at 01:02, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Mon, 17 Oct 2022, Stefano Stabellini wrote:
>> It should be
>> 
>> BB_NUMBER_THREADS="2"
>> 
>> but that worked! Let me a couple of more tests.
> 
> I could run successfully a Yocto build test with qemuarm64 as target in
> gitlab-ci, hurray! No size issues, no build time issues, everything was
> fine. See:
> https://gitlab.com/xen-project/people/sstabellini/xen/-/jobs/3193051236
> https://gitlab.com/xen-project/people/sstabellini/xen/-/jobs/3193083119

Awesome, this is quite fast :-)

> 
> I made the appended changes in top of this series.
> 
> - I pushed registry.gitlab.com/xen-project/xen/yocto:kirkstone and
>  registry.gitlab.com/xen-project/xen/yocto:kirkstone-qemuarm64

This should already be handle by the Makefile using PUSH or did
you have to modify something ?

> - for the gitlab-ci runs, we need to run build-yocto.sh from the copy in
>  xen.git, not from a copy stored inside a container

Ok

> - when building the kirkstone-qemuarm64 container the first time
>  (outside of gitlab-ci) I used COPY and took the script from the local
>  xen.git tree

Ok

> - after a number of tests, I settled on: BB_NUMBER_THREADS="8" more than
>  this and it breaks on some workstations, please add it

I will put this by default and leave a command line argument to have a solution 
to change this.

> - I am running the yocto build on arm64 so that we can use the arm64
>  hardware to do it in gitlab-ci

I tested this when I made the patches and this works for arm64, arm32 and x86 
targets on an arm64 machine so go for it.

> 
> Please feel free to incorporate these changes in your series, and add
> corresponding changes for the qemuarm32 and qemux86 targets.

Will do and I will also add a patch to create the build.yaml entries.

> 
> I am looking forward to it! Almost there!

Me to :-)

Thanks a lot for the testing and the review.

Cheers
Bertrand

> 
> Cheers,
> 
> Stefano
> 
> 
> diff --git a/automation/build/yocto/build-yocto.sh 
> b/automation/build/yocto/build-yocto.sh
> index 0d31dad607..16f1dcc0a5 100755
> --- a/automation/build/yocto/build-yocto.sh
> +++ b/automation/build/yocto/build-yocto.sh
> @@ -107,6 +107,9 @@ IMAGE_INSTALL:append:pn-xen-image-minimal = " 
> ssh-pregen-hostkeys"
> # Save some disk space
> INHERIT += "rm_work"
> 
> +# Reduce number of jobs
> +BB_NUMBER_THREADS="8"
> +
> EOF
> 
>     if [ "${do_localsrc}" = "y" ]; then
> diff --git a/automation/build/yocto/kirkstone-qemuarm64.dockerfile 
> b/automation/build/yocto/kirkstone-qemuarm64.dockerfile
> index f279a7af92..aea3fc1f3e 100644
> --- a/automation/build/yocto/kirkstone-qemuarm64.dockerfile
> +++ b/automation/build/yocto/kirkstone-qemuarm64.dockerfile
> @@ -16,7 +16,8 @@ ARG target=qemuarm64
> 
> # This step can take one to several hours depending on your download bandwith
> # and the speed of your computer
> -RUN /home/$USER_NAME/bin/build-yocto.sh --dump-log $target
> +COPY ./build-yocto.sh /
> +RUN /build-yocto.sh --dump-log $target
> 
> FROM $from_image
> 
> diff --git a/automation/build/yocto/kirkstone.dockerfile 
> b/automation/build/yocto/kirkstone.dockerfile
> index 367a7863b6..ffbd91aa90 100644
> --- a/automation/build/yocto/kirkstone.dockerfile
> +++ b/automation/build/yocto/kirkstone.dockerfile
> @@ -84,9 +84,6 @@ RUN mkdir -p /home/$USER_NAME/yocto-layers \
>              /home/$USER_NAME/xen && \
>     chown $USER_NAME.$USER_NAME /home/$USER_NAME/*
> 
> -# Copy the build script
> -COPY build-yocto.sh /home/$USER_NAME/bin/
> -
> # clone yocto repositories we need
> ARG yocto_version="kirkstone"
> RUN for rep in \
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> index ddc2234faf..4b8bcde252 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -584,6 +584,22 @@ alpine-3.12-gcc-arm64-boot-cpupools:
>     EXTRA_XEN_CONFIG: |
>       CONFIG_BOOT_TIME_CPUPOOLS=y
> 
> +yocto-kirkstone-qemuarm64:
> +  stage: build
> +  image: registry.gitlab.com/xen-project/xen/${CONTAINER}
> +  script:
> +    - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs 
> --xen-dir=`pwd` qemuarm64
> +  variables:
> +    CONTAINER: yocto:kirkstone-qemuarm64
> +  artifacts:
> +    paths:
> +      - '*.log'
> +      - '*/*.log'
> +      - 'logs/*'
> +    when: always
> +  tags:
> +    - arm64
> +
> ## Test artifacts common
> 
> .test-jobs-artifact-common:




 


Rackspace

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