diff mbox series

[4/6] CI: Express HYPERVISOR_ONLY in build.yml

Message ID 20221230003848.3241-5-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series CI: Fixes/cleanup in preparation for RISCV | expand

Commit Message

Andrew Cooper Dec. 30, 2022, 12:38 a.m. UTC
Whether to build only Xen, or everything, is a property of container,
toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.

Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
testcases at the point that arm32 get matched with a container that can only
build Xen.

For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Doug Goldstein <cardoe@cardoe.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Anthony PERARD <anthony.perard@citrix.com>
CC: Michal Orzel <michal.orzel@amd.com>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 automation/gitlab-ci/build.yaml |  2 ++
 automation/scripts/build        | 11 ++++-------
 2 files changed, 6 insertions(+), 7 deletions(-)

Comments

Oleksii Dec. 30, 2022, 10:04 a.m. UTC | #1
Hi Andrew,

This is not something critical but I would like to see HYPERVISOR_ONLY
set explicitly for all debian-unstable-gcc-arm32-* jobs as it is not
clear for end-user of build.yaml that  "the RANDCONFIG ->
HYPERVISOR_ONLY implication."

~Oleksii

On Fri, 2022-12-30 at 00:38 +0000, Andrew Cooper wrote:
> Whether to build only Xen, or everything, is a property of container,
> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
> 
> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-
> gcc-arm32-*
> testcases at the point that arm32 get matched with a container that
> can only
> build Xen.
> 
> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Doug Goldstein <cardoe@cardoe.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony PERARD <anthony.perard@citrix.com>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
>  automation/gitlab-ci/build.yaml |  2 ++
>  automation/scripts/build        | 11 ++++-------
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-
> ci/build.yaml
> index 93d9ff69a9f2..e6a9357de3ef 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
>    extends: .gcc-arm32-cross-build
>    variables:
>      CONTAINER: debian:unstable-arm32-gcc
> +    HYPERVISOR_ONLY: y
>  
>  debian-unstable-gcc-arm32-debug:
>    extends: .gcc-arm32-cross-build-debug
>    variables:
>      CONTAINER: debian:unstable-arm32-gcc
> +    HYPERVISOR_ONLY: y
>  
>  debian-unstable-gcc-arm32-randconfig:
>    extends: .gcc-arm32-cross-build
> diff --git a/automation/scripts/build b/automation/scripts/build
> index f2301d08789d..4c6d1f3b70bc 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -19,7 +19,9 @@ if [[ "${RANDCONFIG}" == "y" ]]; then
>      fi
>  
>      make -j$(nproc) -C xen
> KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
> -    hypervisor_only="y"
> +
> +    # RANDCONFIG implies HYPERVISOR_ONLY
> +    HYPERVISOR_ONLY="y"
>  else
>      echo "CONFIG_DEBUG=${debug}" > xen/.config
>  
> @@ -34,15 +36,10 @@ fi
>  # to exit early -- bash is invoked with -e.
>  cp xen/.config xen-config
>  
> -# arm32 only cross-compiles the hypervisor
> -if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
> -    hypervisor_only="y"
> -fi
> -
>  # Directory for the artefacts to be dumped into
>  mkdir binaries
>  
> -if [[ "${hypervisor_only}" == "y" ]]; then
> +if [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
>      # Xen-only build
>      make -j$(nproc) xen
>
Michal Orzel Jan. 2, 2023, 2:05 p.m. UTC | #2
Hi Andrew,

On 30/12/2022 01:38, Andrew Cooper wrote:
> 
> 
> Whether to build only Xen, or everything, is a property of container,
> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
> 
> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
> testcases at the point that arm32 get matched with a container that can only
> build Xen.
> 
> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Michal Orzel <michal.orzel@amd.com>

With regards to Oleksii comment, I do not think we should add HYPERVISOR_ONLY explicitly
for randconfig debian-unstable-gcc-arm32-* jobs. Doing so would require similar change
for all the randconfig jobs to be consistent and this is not needed.

~Michal
Stefano Stabellini Jan. 4, 2023, 1:15 a.m. UTC | #3
On Fri, 30 Dec 2022, Andrew Cooper wrote:

> Whether to build only Xen, or everything, is a property of container,
> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
> 
> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
> testcases at the point that arm32 get matched with a container that can only
> build Xen.
> 
> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Doug Goldstein <cardoe@cardoe.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony PERARD <anthony.perard@citrix.com>
> CC: Michal Orzel <michal.orzel@amd.com>
> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
>  automation/gitlab-ci/build.yaml |  2 ++
>  automation/scripts/build        | 11 ++++-------
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> index 93d9ff69a9f2..e6a9357de3ef 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
>    extends: .gcc-arm32-cross-build
>    variables:
>      CONTAINER: debian:unstable-arm32-gcc
> +    HYPERVISOR_ONLY: y
>  
>  debian-unstable-gcc-arm32-debug:
>    extends: .gcc-arm32-cross-build-debug
>    variables:
>      CONTAINER: debian:unstable-arm32-gcc
> +    HYPERVISOR_ONLY: y

can you move the setting of HYPERVISOR_ONLY to .arm32-cross-build-tmpl ?

I think that makes the most sense because .arm32-cross-build-tmpl is the
one setting XEN_TARGET_ARCH and also the x86_64 tag.

>  
>  debian-unstable-gcc-arm32-randconfig:
>    extends: .gcc-arm32-cross-build
> diff --git a/automation/scripts/build b/automation/scripts/build
> index f2301d08789d..4c6d1f3b70bc 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -19,7 +19,9 @@ if [[ "${RANDCONFIG}" == "y" ]]; then
>      fi
>  
>      make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
> -    hypervisor_only="y"
> +
> +    # RANDCONFIG implies HYPERVISOR_ONLY
> +    HYPERVISOR_ONLY="y"
>  else
>      echo "CONFIG_DEBUG=${debug}" > xen/.config
>  
> @@ -34,15 +36,10 @@ fi
>  # to exit early -- bash is invoked with -e.
>  cp xen/.config xen-config
>  
> -# arm32 only cross-compiles the hypervisor
> -if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
> -    hypervisor_only="y"
> -fi
> -
>  # Directory for the artefacts to be dumped into
>  mkdir binaries
>  
> -if [[ "${hypervisor_only}" == "y" ]]; then
> +if [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
>      # Xen-only build
>      make -j$(nproc) xen
>  
> -- 
> 2.11.0
>
Andrew Cooper Jan. 4, 2023, 1:27 a.m. UTC | #4
On 04/01/2023 1:15 am, Stefano Stabellini wrote:
> On Fri, 30 Dec 2022, Andrew Cooper wrote:
>
>> Whether to build only Xen, or everything, is a property of container,
>> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
>>
>> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
>> testcases at the point that arm32 get matched with a container that can only
>> build Xen.
>>
>> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: Doug Goldstein <cardoe@cardoe.com>
>> CC: Stefano Stabellini <sstabellini@kernel.org>
>> CC: Anthony PERARD <anthony.perard@citrix.com>
>> CC: Michal Orzel <michal.orzel@amd.com>
>> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
>> ---
>>  automation/gitlab-ci/build.yaml |  2 ++
>>  automation/scripts/build        | 11 ++++-------
>>  2 files changed, 6 insertions(+), 7 deletions(-)
>>
>> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
>> index 93d9ff69a9f2..e6a9357de3ef 100644
>> --- a/automation/gitlab-ci/build.yaml
>> +++ b/automation/gitlab-ci/build.yaml
>> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
>>    extends: .gcc-arm32-cross-build
>>    variables:
>>      CONTAINER: debian:unstable-arm32-gcc
>> +    HYPERVISOR_ONLY: y
>>  
>>  debian-unstable-gcc-arm32-debug:
>>    extends: .gcc-arm32-cross-build-debug
>>    variables:
>>      CONTAINER: debian:unstable-arm32-gcc
>> +    HYPERVISOR_ONLY: y
> can you move the setting of HYPERVISOR_ONLY to .arm32-cross-build-tmpl ?

Not really - that's the point I'm trying to make in the commit message.

> I think that makes the most sense because .arm32-cross-build-tmpl is the
> one setting XEN_TARGET_ARCH and also the x86_64 tag.

It's not about x86_64; its about the container.

Whether we can build just Xen, or everything, solely depends on the
contents in debian:unstable-arm32-gcc

If we wanted to, we could update unstable-arm32-gcc's dockerfile to
install the arm32 cross user libs, and drop this HYPERVISOR_ONLY
restriction.

~Andrew
Stefano Stabellini Jan. 4, 2023, 1:36 a.m. UTC | #5
On Wed, 4 Jan 2023, Andrew Cooper wrote:
> On 04/01/2023 1:15 am, Stefano Stabellini wrote:
> > On Fri, 30 Dec 2022, Andrew Cooper wrote:
> >
> >> Whether to build only Xen, or everything, is a property of container,
> >> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
> >>
> >> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
> >> testcases at the point that arm32 get matched with a container that can only
> >> build Xen.
> >>
> >> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
> >>
> >> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >> ---
> >> CC: Doug Goldstein <cardoe@cardoe.com>
> >> CC: Stefano Stabellini <sstabellini@kernel.org>
> >> CC: Anthony PERARD <anthony.perard@citrix.com>
> >> CC: Michal Orzel <michal.orzel@amd.com>
> >> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> >> ---
> >>  automation/gitlab-ci/build.yaml |  2 ++
> >>  automation/scripts/build        | 11 ++++-------
> >>  2 files changed, 6 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> >> index 93d9ff69a9f2..e6a9357de3ef 100644
> >> --- a/automation/gitlab-ci/build.yaml
> >> +++ b/automation/gitlab-ci/build.yaml
> >> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
> >>    extends: .gcc-arm32-cross-build
> >>    variables:
> >>      CONTAINER: debian:unstable-arm32-gcc
> >> +    HYPERVISOR_ONLY: y
> >>  
> >>  debian-unstable-gcc-arm32-debug:
> >>    extends: .gcc-arm32-cross-build-debug
> >>    variables:
> >>      CONTAINER: debian:unstable-arm32-gcc
> >> +    HYPERVISOR_ONLY: y
> > can you move the setting of HYPERVISOR_ONLY to .arm32-cross-build-tmpl ?
> 
> Not really - that's the point I'm trying to make in the commit message.
> 
> > I think that makes the most sense because .arm32-cross-build-tmpl is the
> > one setting XEN_TARGET_ARCH and also the x86_64 tag.
> 
> It's not about x86_64; its about the container.
> 
> Whether we can build just Xen, or everything, solely depends on the
> contents in debian:unstable-arm32-gcc
> 
> If we wanted to, we could update unstable-arm32-gcc's dockerfile to
> install the arm32 cross user libs, and drop this HYPERVISOR_ONLY
> restriction.

If it is a property of the container, shouldn't HYPERVISOR_ONLY be set
every time the debian:unstable-arm32-gcc container is used? Including
debian-unstable-gcc-arm32-randconfig and
debian-unstable-gcc-arm32-debug-randconfig?

I realize that the other 2 jobs are randconfigs so HYPERVISOR_ONLY gets
set anyway. But if HYPERVISOR_ONLY is a property of the specific
container, then I think it would be best to be consistent and set
HYPERVISOR_ONLY everywhere debian:unstable-arm32-gcc is used.

E.g. one day we could just randconfigs to build also the tools with a
simple change to the build script and otherwise we would need to
remember to also add the HYPERVISOR_ONLY tag for the other 2 jobs using
debian:unstable-arm32-gcc.
Andrew Cooper Jan. 4, 2023, 1:41 a.m. UTC | #6
On 04/01/2023 1:36 am, Stefano Stabellini wrote:
> On Wed, 4 Jan 2023, Andrew Cooper wrote:
>> On 04/01/2023 1:15 am, Stefano Stabellini wrote:
>>> On Fri, 30 Dec 2022, Andrew Cooper wrote:
>>>
>>>> Whether to build only Xen, or everything, is a property of container,
>>>> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
>>>>
>>>> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
>>>> testcases at the point that arm32 get matched with a container that can only
>>>> build Xen.
>>>>
>>>> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
>>>>
>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>> ---
>>>> CC: Doug Goldstein <cardoe@cardoe.com>
>>>> CC: Stefano Stabellini <sstabellini@kernel.org>
>>>> CC: Anthony PERARD <anthony.perard@citrix.com>
>>>> CC: Michal Orzel <michal.orzel@amd.com>
>>>> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
>>>> ---
>>>>  automation/gitlab-ci/build.yaml |  2 ++
>>>>  automation/scripts/build        | 11 ++++-------
>>>>  2 files changed, 6 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
>>>> index 93d9ff69a9f2..e6a9357de3ef 100644
>>>> --- a/automation/gitlab-ci/build.yaml
>>>> +++ b/automation/gitlab-ci/build.yaml
>>>> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
>>>>    extends: .gcc-arm32-cross-build
>>>>    variables:
>>>>      CONTAINER: debian:unstable-arm32-gcc
>>>> +    HYPERVISOR_ONLY: y
>>>>  
>>>>  debian-unstable-gcc-arm32-debug:
>>>>    extends: .gcc-arm32-cross-build-debug
>>>>    variables:
>>>>      CONTAINER: debian:unstable-arm32-gcc
>>>> +    HYPERVISOR_ONLY: y
>>> can you move the setting of HYPERVISOR_ONLY to .arm32-cross-build-tmpl ?
>> Not really - that's the point I'm trying to make in the commit message.
>>
>>> I think that makes the most sense because .arm32-cross-build-tmpl is the
>>> one setting XEN_TARGET_ARCH and also the x86_64 tag.
>> It's not about x86_64; its about the container.
>>
>> Whether we can build just Xen, or everything, solely depends on the
>> contents in debian:unstable-arm32-gcc
>>
>> If we wanted to, we could update unstable-arm32-gcc's dockerfile to
>> install the arm32 cross user libs, and drop this HYPERVISOR_ONLY
>> restriction.
> If it is a property of the container, shouldn't HYPERVISOR_ONLY be set
> every time the debian:unstable-arm32-gcc container is used? Including
> debian-unstable-gcc-arm32-randconfig and
> debian-unstable-gcc-arm32-debug-randconfig?
>
> I realize that the other 2 jobs are randconfigs so HYPERVISOR_ONLY gets
> set anyway. But if HYPERVISOR_ONLY is a property of the specific
> container, then I think it would be best to be consistent and set
> HYPERVISOR_ONLY everywhere debian:unstable-arm32-gcc is used.
>
> E.g. one day we could just randconfigs to build also the tools with a
> simple change to the build script and otherwise we would need to
> remember to also add the HYPERVISOR_ONLY tag for the other 2 jobs using
> debian:unstable-arm32-gcc.

Ok, so we want 4 HYPERVISOR_ONLY's in total, one for each instance of
CONTAINER: debian:unstable-arm32-gcc ?

~Andrew
Stefano Stabellini Jan. 4, 2023, 1:48 a.m. UTC | #7
On Wed, 4 Jan 2023, Andrew Cooper wrote:
> On 04/01/2023 1:36 am, Stefano Stabellini wrote:
> > On Wed, 4 Jan 2023, Andrew Cooper wrote:
> >> On 04/01/2023 1:15 am, Stefano Stabellini wrote:
> >>> On Fri, 30 Dec 2022, Andrew Cooper wrote:
> >>>
> >>>> Whether to build only Xen, or everything, is a property of container,
> >>>> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
> >>>>
> >>>> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
> >>>> testcases at the point that arm32 get matched with a container that can only
> >>>> build Xen.
> >>>>
> >>>> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
> >>>>
> >>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >>>> ---
> >>>> CC: Doug Goldstein <cardoe@cardoe.com>
> >>>> CC: Stefano Stabellini <sstabellini@kernel.org>
> >>>> CC: Anthony PERARD <anthony.perard@citrix.com>
> >>>> CC: Michal Orzel <michal.orzel@amd.com>
> >>>> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> >>>> ---
> >>>>  automation/gitlab-ci/build.yaml |  2 ++
> >>>>  automation/scripts/build        | 11 ++++-------
> >>>>  2 files changed, 6 insertions(+), 7 deletions(-)
> >>>>
> >>>> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> >>>> index 93d9ff69a9f2..e6a9357de3ef 100644
> >>>> --- a/automation/gitlab-ci/build.yaml
> >>>> +++ b/automation/gitlab-ci/build.yaml
> >>>> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
> >>>>    extends: .gcc-arm32-cross-build
> >>>>    variables:
> >>>>      CONTAINER: debian:unstable-arm32-gcc
> >>>> +    HYPERVISOR_ONLY: y
> >>>>  
> >>>>  debian-unstable-gcc-arm32-debug:
> >>>>    extends: .gcc-arm32-cross-build-debug
> >>>>    variables:
> >>>>      CONTAINER: debian:unstable-arm32-gcc
> >>>> +    HYPERVISOR_ONLY: y
> >>> can you move the setting of HYPERVISOR_ONLY to .arm32-cross-build-tmpl ?
> >> Not really - that's the point I'm trying to make in the commit message.
> >>
> >>> I think that makes the most sense because .arm32-cross-build-tmpl is the
> >>> one setting XEN_TARGET_ARCH and also the x86_64 tag.
> >> It's not about x86_64; its about the container.
> >>
> >> Whether we can build just Xen, or everything, solely depends on the
> >> contents in debian:unstable-arm32-gcc
> >>
> >> If we wanted to, we could update unstable-arm32-gcc's dockerfile to
> >> install the arm32 cross user libs, and drop this HYPERVISOR_ONLY
> >> restriction.
> > If it is a property of the container, shouldn't HYPERVISOR_ONLY be set
> > every time the debian:unstable-arm32-gcc container is used? Including
> > debian-unstable-gcc-arm32-randconfig and
> > debian-unstable-gcc-arm32-debug-randconfig?
> >
> > I realize that the other 2 jobs are randconfigs so HYPERVISOR_ONLY gets
> > set anyway. But if HYPERVISOR_ONLY is a property of the specific
> > container, then I think it would be best to be consistent and set
> > HYPERVISOR_ONLY everywhere debian:unstable-arm32-gcc is used.
> >
> > E.g. one day we could just randconfigs to build also the tools with a
> > simple change to the build script and otherwise we would need to
> > remember to also add the HYPERVISOR_ONLY tag for the other 2 jobs using
> > debian:unstable-arm32-gcc.
> 
> Ok, so we want 4 HYPERVISOR_ONLY's in total, one for each instance of
> CONTAINER: debian:unstable-arm32-gcc ?

yeah
Andrew Cooper Jan. 4, 2023, 1:51 a.m. UTC | #8
On 04/01/2023 1:48 am, Stefano Stabellini wrote:
> On Wed, 4 Jan 2023, Andrew Cooper wrote:
>> On 04/01/2023 1:36 am, Stefano Stabellini wrote:
>>> On Wed, 4 Jan 2023, Andrew Cooper wrote:
>>>> On 04/01/2023 1:15 am, Stefano Stabellini wrote:
>>>>> On Fri, 30 Dec 2022, Andrew Cooper wrote:
>>>>>
>>>>>> Whether to build only Xen, or everything, is a property of container,
>>>>>> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
>>>>>>
>>>>>> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
>>>>>> testcases at the point that arm32 get matched with a container that can only
>>>>>> build Xen.
>>>>>>
>>>>>> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
>>>>>>
>>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>>>> ---
>>>>>> CC: Doug Goldstein <cardoe@cardoe.com>
>>>>>> CC: Stefano Stabellini <sstabellini@kernel.org>
>>>>>> CC: Anthony PERARD <anthony.perard@citrix.com>
>>>>>> CC: Michal Orzel <michal.orzel@amd.com>
>>>>>> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
>>>>>> ---
>>>>>>  automation/gitlab-ci/build.yaml |  2 ++
>>>>>>  automation/scripts/build        | 11 ++++-------
>>>>>>  2 files changed, 6 insertions(+), 7 deletions(-)
>>>>>>
>>>>>> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
>>>>>> index 93d9ff69a9f2..e6a9357de3ef 100644
>>>>>> --- a/automation/gitlab-ci/build.yaml
>>>>>> +++ b/automation/gitlab-ci/build.yaml
>>>>>> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
>>>>>>    extends: .gcc-arm32-cross-build
>>>>>>    variables:
>>>>>>      CONTAINER: debian:unstable-arm32-gcc
>>>>>> +    HYPERVISOR_ONLY: y
>>>>>>  
>>>>>>  debian-unstable-gcc-arm32-debug:
>>>>>>    extends: .gcc-arm32-cross-build-debug
>>>>>>    variables:
>>>>>>      CONTAINER: debian:unstable-arm32-gcc
>>>>>> +    HYPERVISOR_ONLY: y
>>>>> can you move the setting of HYPERVISOR_ONLY to .arm32-cross-build-tmpl ?
>>>> Not really - that's the point I'm trying to make in the commit message.
>>>>
>>>>> I think that makes the most sense because .arm32-cross-build-tmpl is the
>>>>> one setting XEN_TARGET_ARCH and also the x86_64 tag.
>>>> It's not about x86_64; its about the container.
>>>>
>>>> Whether we can build just Xen, or everything, solely depends on the
>>>> contents in debian:unstable-arm32-gcc
>>>>
>>>> If we wanted to, we could update unstable-arm32-gcc's dockerfile to
>>>> install the arm32 cross user libs, and drop this HYPERVISOR_ONLY
>>>> restriction.
>>> If it is a property of the container, shouldn't HYPERVISOR_ONLY be set
>>> every time the debian:unstable-arm32-gcc container is used? Including
>>> debian-unstable-gcc-arm32-randconfig and
>>> debian-unstable-gcc-arm32-debug-randconfig?
>>>
>>> I realize that the other 2 jobs are randconfigs so HYPERVISOR_ONLY gets
>>> set anyway. But if HYPERVISOR_ONLY is a property of the specific
>>> container, then I think it would be best to be consistent and set
>>> HYPERVISOR_ONLY everywhere debian:unstable-arm32-gcc is used.
>>>
>>> E.g. one day we could just randconfigs to build also the tools with a
>>> simple change to the build script and otherwise we would need to
>>> remember to also add the HYPERVISOR_ONLY tag for the other 2 jobs using
>>> debian:unstable-arm32-gcc.
>> Ok, so we want 4 HYPERVISOR_ONLY's in total, one for each instance of
>> CONTAINER: debian:unstable-arm32-gcc ?
> yeah

Can I take that as an R-by/A-by then?

~Andrew
Stefano Stabellini Jan. 4, 2023, 1:55 a.m. UTC | #9
On Wed, 4 Jan 2023, Andrew Cooper wrote:
> On 04/01/2023 1:48 am, Stefano Stabellini wrote:
> > On Wed, 4 Jan 2023, Andrew Cooper wrote:
> >> On 04/01/2023 1:36 am, Stefano Stabellini wrote:
> >>> On Wed, 4 Jan 2023, Andrew Cooper wrote:
> >>>> On 04/01/2023 1:15 am, Stefano Stabellini wrote:
> >>>>> On Fri, 30 Dec 2022, Andrew Cooper wrote:
> >>>>>
> >>>>>> Whether to build only Xen, or everything, is a property of container,
> >>>>>> toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
> >>>>>>
> >>>>>> Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-*
> >>>>>> testcases at the point that arm32 get matched with a container that can only
> >>>>>> build Xen.
> >>>>>>
> >>>>>> For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication.
> >>>>>>
> >>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >>>>>> ---
> >>>>>> CC: Doug Goldstein <cardoe@cardoe.com>
> >>>>>> CC: Stefano Stabellini <sstabellini@kernel.org>
> >>>>>> CC: Anthony PERARD <anthony.perard@citrix.com>
> >>>>>> CC: Michal Orzel <michal.orzel@amd.com>
> >>>>>> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> >>>>>> ---
> >>>>>>  automation/gitlab-ci/build.yaml |  2 ++
> >>>>>>  automation/scripts/build        | 11 ++++-------
> >>>>>>  2 files changed, 6 insertions(+), 7 deletions(-)
> >>>>>>
> >>>>>> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> >>>>>> index 93d9ff69a9f2..e6a9357de3ef 100644
> >>>>>> --- a/automation/gitlab-ci/build.yaml
> >>>>>> +++ b/automation/gitlab-ci/build.yaml
> >>>>>> @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32:
> >>>>>>    extends: .gcc-arm32-cross-build
> >>>>>>    variables:
> >>>>>>      CONTAINER: debian:unstable-arm32-gcc
> >>>>>> +    HYPERVISOR_ONLY: y
> >>>>>>  
> >>>>>>  debian-unstable-gcc-arm32-debug:
> >>>>>>    extends: .gcc-arm32-cross-build-debug
> >>>>>>    variables:
> >>>>>>      CONTAINER: debian:unstable-arm32-gcc
> >>>>>> +    HYPERVISOR_ONLY: y
> >>>>> can you move the setting of HYPERVISOR_ONLY to .arm32-cross-build-tmpl ?
> >>>> Not really - that's the point I'm trying to make in the commit message.
> >>>>
> >>>>> I think that makes the most sense because .arm32-cross-build-tmpl is the
> >>>>> one setting XEN_TARGET_ARCH and also the x86_64 tag.
> >>>> It's not about x86_64; its about the container.
> >>>>
> >>>> Whether we can build just Xen, or everything, solely depends on the
> >>>> contents in debian:unstable-arm32-gcc
> >>>>
> >>>> If we wanted to, we could update unstable-arm32-gcc's dockerfile to
> >>>> install the arm32 cross user libs, and drop this HYPERVISOR_ONLY
> >>>> restriction.
> >>> If it is a property of the container, shouldn't HYPERVISOR_ONLY be set
> >>> every time the debian:unstable-arm32-gcc container is used? Including
> >>> debian-unstable-gcc-arm32-randconfig and
> >>> debian-unstable-gcc-arm32-debug-randconfig?
> >>>
> >>> I realize that the other 2 jobs are randconfigs so HYPERVISOR_ONLY gets
> >>> set anyway. But if HYPERVISOR_ONLY is a property of the specific
> >>> container, then I think it would be best to be consistent and set
> >>> HYPERVISOR_ONLY everywhere debian:unstable-arm32-gcc is used.
> >>>
> >>> E.g. one day we could just randconfigs to build also the tools with a
> >>> simple change to the build script and otherwise we would need to
> >>> remember to also add the HYPERVISOR_ONLY tag for the other 2 jobs using
> >>> debian:unstable-arm32-gcc.
> >> Ok, so we want 4 HYPERVISOR_ONLY's in total, one for each instance of
> >> CONTAINER: debian:unstable-arm32-gcc ?
> > yeah
> 
> Can I take that as an R-by/A-by then?

yep
diff mbox series

Patch

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 93d9ff69a9f2..e6a9357de3ef 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -516,11 +516,13 @@  debian-unstable-gcc-arm32:
   extends: .gcc-arm32-cross-build
   variables:
     CONTAINER: debian:unstable-arm32-gcc
+    HYPERVISOR_ONLY: y
 
 debian-unstable-gcc-arm32-debug:
   extends: .gcc-arm32-cross-build-debug
   variables:
     CONTAINER: debian:unstable-arm32-gcc
+    HYPERVISOR_ONLY: y
 
 debian-unstable-gcc-arm32-randconfig:
   extends: .gcc-arm32-cross-build
diff --git a/automation/scripts/build b/automation/scripts/build
index f2301d08789d..4c6d1f3b70bc 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -19,7 +19,9 @@  if [[ "${RANDCONFIG}" == "y" ]]; then
     fi
 
     make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
-    hypervisor_only="y"
+
+    # RANDCONFIG implies HYPERVISOR_ONLY
+    HYPERVISOR_ONLY="y"
 else
     echo "CONFIG_DEBUG=${debug}" > xen/.config
 
@@ -34,15 +36,10 @@  fi
 # to exit early -- bash is invoked with -e.
 cp xen/.config xen-config
 
-# arm32 only cross-compiles the hypervisor
-if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
-    hypervisor_only="y"
-fi
-
 # Directory for the artefacts to be dumped into
 mkdir binaries
 
-if [[ "${hypervisor_only}" == "y" ]]; then
+if [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
     # Xen-only build
     make -j$(nproc) xen