Message ID | 20201207112353.3814480-4-philmd@redhat.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | gitlab-ci: Add accelerator-specific Linux jobs | expand |
On 07/12/2020 12.23, Philippe Mathieu-Daudé wrote: > Introduce a job template to cross-build accelerator specific > jobs (enable a specific accelerator, disabling the others). > > The specific accelerator is selected by the $ACCEL environment > variable (default to KVM). > > Extra options such disabling other accelerators are passed > via the $ACCEL_CONFIGURE_OPTS environment variable. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > .gitlab-ci.d/crossbuilds.yml | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml > index 099949aaef3..d8685ade376 100644 > --- a/.gitlab-ci.d/crossbuilds.yml > +++ b/.gitlab-ci.d/crossbuilds.yml > @@ -13,6 +13,23 @@ > xtensa-softmmu" > - make -j$(expr $(nproc) + 1) all check-build > > +# Job to cross-build specific accelerators. > +# > +# Set the $ACCEL variable to select the specific accelerator (default to > +# KVM), and set extra options (such disabling other accelerators) via the > +# $ACCEL_CONFIGURE_OPTS variable. > +.cross_accel_build_job: > + stage: build > + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest > + timeout: 30m > + script: > + - mkdir build > + - cd build > + - PKG_CONFIG_PATH=$PKG_CONFIG_PATH > + ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-tools > + --enable-${ACCEL:-kvm} --target-list="$TARGETS" $ACCEL_CONFIGURE_OPTS > + - make -j$(expr $(nproc) + 1) all check-build > + > .cross_user_build_job: > stage: build > image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest I wonder whether we could also simply use the .cross_user_build_job - e.g. by adding a $EXTRA_CONFIGURE_OPTS variable in the "../configure ..." line so that the accel-jobs could use that for their --enable... and --disable... settings? Anyway, I've got no strong opinion on that one, and I'm also fine if we add this new template, so: Reviewed-by: Thomas Huth <thuth@redhat.com>
On 12/7/20 12:37 PM, Thomas Huth wrote: > On 07/12/2020 12.23, Philippe Mathieu-Daudé wrote: >> Introduce a job template to cross-build accelerator specific >> jobs (enable a specific accelerator, disabling the others). >> >> The specific accelerator is selected by the $ACCEL environment >> variable (default to KVM). >> >> Extra options such disabling other accelerators are passed >> via the $ACCEL_CONFIGURE_OPTS environment variable. >> >> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> >> --- >> .gitlab-ci.d/crossbuilds.yml | 17 +++++++++++++++++ >> 1 file changed, 17 insertions(+) >> >> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml >> index 099949aaef3..d8685ade376 100644 >> --- a/.gitlab-ci.d/crossbuilds.yml >> +++ b/.gitlab-ci.d/crossbuilds.yml >> @@ -13,6 +13,23 @@ >> xtensa-softmmu" >> - make -j$(expr $(nproc) + 1) all check-build >> >> +# Job to cross-build specific accelerators. >> +# >> +# Set the $ACCEL variable to select the specific accelerator (default to >> +# KVM), and set extra options (such disabling other accelerators) via the >> +# $ACCEL_CONFIGURE_OPTS variable. >> +.cross_accel_build_job: >> + stage: build >> + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest >> + timeout: 30m >> + script: >> + - mkdir build >> + - cd build >> + - PKG_CONFIG_PATH=$PKG_CONFIG_PATH >> + ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-tools >> + --enable-${ACCEL:-kvm} --target-list="$TARGETS" $ACCEL_CONFIGURE_OPTS >> + - make -j$(expr $(nproc) + 1) all check-build >> + >> .cross_user_build_job: >> stage: build >> image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest > > I wonder whether we could also simply use the .cross_user_build_job - e.g. > by adding a $EXTRA_CONFIGURE_OPTS variable in the "../configure ..." line so > that the accel-jobs could use that for their --enable... and --disable... > settings? Well cross_user_build_job build tools (I'm not sure that desired). > Anyway, I've got no strong opinion on that one, and I'm also fine if we add > this new template, so: > > Reviewed-by: Thomas Huth <thuth@redhat.com> Thanks, we can improve on top.
diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 099949aaef3..d8685ade376 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -13,6 +13,23 @@ xtensa-softmmu" - make -j$(expr $(nproc) + 1) all check-build +# Job to cross-build specific accelerators. +# +# Set the $ACCEL variable to select the specific accelerator (default to +# KVM), and set extra options (such disabling other accelerators) via the +# $ACCEL_CONFIGURE_OPTS variable. +.cross_accel_build_job: + stage: build + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest + timeout: 30m + script: + - mkdir build + - cd build + - PKG_CONFIG_PATH=$PKG_CONFIG_PATH + ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-tools + --enable-${ACCEL:-kvm} --target-list="$TARGETS" $ACCEL_CONFIGURE_OPTS + - make -j$(expr $(nproc) + 1) all check-build + .cross_user_build_job: stage: build image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
Introduce a job template to cross-build accelerator specific jobs (enable a specific accelerator, disabling the others). The specific accelerator is selected by the $ACCEL environment variable (default to KVM). Extra options such disabling other accelerators are passed via the $ACCEL_CONFIGURE_OPTS environment variable. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- .gitlab-ci.d/crossbuilds.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)