Skip to contentSkip to conversation

automation: Switch yocto-qemux86-64 job to run on x86

PATCH In review Michal Orzel 2 participants 2 messages Feb 6, 2024 – Feb 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 automation: Switch yocto-qemux86-64 job to run on x86

At the moment, all Yocto jobs run on Arm64 runners. To address CI capacity issues, move yocto-qemux86-64 job to x86. Reflect the change in the makefile generating Yocto docker files and fix CONTAINER name definition that incorrectly expects YOCTO_HOST variable to be set for x86 container as well, which does not have a platform name appended.

---
I built and pushed a new container to registry.
Pipeline:
https://gitlab.com/xen-project/people/morzel/xen-orzelmichal/-/pipelines/1166227598

---
 automation/build/yocto/yocto.inc |  6 ++++--
 automation/gitlab-ci/build.yaml  | 10 +++-------
 2 files changed, 7 insertions(+), 9 deletions(-)
automation/build/yocto/yocto.inc +4 -2
index e4328ec7f378..2f3b1a5b2a34 100644
@@ -18,11 +18,13 @@ YOCTO_TARGETS = qemuarm64 qemuarm qemux86-64
 YOCTO_ARCHS = amd64 arm64v8
 
 # Architecture we want to use in gitlab CI (depends on runners arch).
-CI_ARCH = arm64v8
+CI_ARCH-qemuarm64 = arm64v8
+CI_ARCH-qemuarm = arm64v8
+CI_ARCH-qemux86-64 = amd64
 
 define GEN_DOCKER
 # Make all is generating architecture we use in the CI.
-ifeq ($(CI_ARCH),$(3))
+ifeq ($(CI_ARCH-$(2)),$(3))
 CONTAINERS += yocto/$(1)-$(2)$(4)
 else
 CONTAINERS_EXTRA += yocto/$(1)-$(2)$(4)
automation/gitlab-ci/build.yaml +3 -7
index 32af30ccedc9..6d2cb18b8883 100644
@@ -213,7 +213,7 @@
     - ./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}
+    CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}${YOCTO_HOST}
   artifacts:
     paths:
       - 'logs/*'
@@ -224,16 +224,12 @@
 .yocto-test-arm64:
   extends: .yocto-test
   variables:
-    YOCTO_HOST: arm64v8
+    YOCTO_HOST: -arm64v8
   tags:
     - arm64
 
-# This is not used by any test job as we only run Yocto on arm based machines.
-# Keep it here so that someone having x86 hardware can easily add jobs.
 .yocto-test-x86-64:
   extends: .yocto-test
-  variables:
-    YOCTO_HOST: amd64
   tags:
     - x86_64
 
@@ -576,7 +572,7 @@ yocto-qemuarm:
     YOCTO_OUTPUT: --copy-output
 
 yocto-qemux86-64:
-  extends: .yocto-test-arm64
+  extends: .yocto-test-x86-64
   variables:
     YOCTO_BOARD: qemux86-64
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Michal Orzel

At the moment, all Yocto jobs run on Arm64 runners. To address CI capacity issues, move yocto-qemux86-64 job to x86. Reflect the change in the makefile generating Yocto docker files and fix CONTAINER name definition that incorrectly expects YOCTO_HOST variable to be set for x86 container as well, which does not have a platform name appended.

Quoted 72 lines

---
I built and pushed a new container to registry.
Pipeline:
https://gitlab.com/xen-project/people/morzel/xen-orzelmichal/-/pipelines/1166227598

---
 automation/build/yocto/yocto.inc |  6 ++++--
 automation/gitlab-ci/build.yaml  | 10 +++-------
 2 files changed, 7 insertions(+), 9 deletions(-)
automation/build/yocto/yocto.inc +4 -2
index e4328ec7f378..2f3b1a5b2a34 100644
@@ -18,11 +18,13 @@ YOCTO_TARGETS = qemuarm64 qemuarm qemux86-64
 YOCTO_ARCHS = amd64 arm64v8
 
 # Architecture we want to use in gitlab CI (depends on runners arch).
-CI_ARCH = arm64v8
+CI_ARCH-qemuarm64 = arm64v8
+CI_ARCH-qemuarm = arm64v8
+CI_ARCH-qemux86-64 = amd64
 
 define GEN_DOCKER
 # Make all is generating architecture we use in the CI.
-ifeq ($(CI_ARCH),$(3))
+ifeq ($(CI_ARCH-$(2)),$(3))
 CONTAINERS += yocto/$(1)-$(2)$(4)
 else
 CONTAINERS_EXTRA += yocto/$(1)-$(2)$(4)
automation/gitlab-ci/build.yaml +3 -7
index 32af30ccedc9..6d2cb18b8883 100644
@@ -213,7 +213,7 @@
     - ./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}
+    CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}${YOCTO_HOST}
   artifacts:
     paths:
       - 'logs/*'
@@ -224,16 +224,12 @@
 .yocto-test-arm64:
   extends: .yocto-test
   variables:
-    YOCTO_HOST: arm64v8
+    YOCTO_HOST: -arm64v8
   tags:
     - arm64
 
-# This is not used by any test job as we only run Yocto on arm based machines.
-# Keep it here so that someone having x86 hardware can easily add jobs.
 .yocto-test-x86-64:
   extends: .yocto-test
-  variables:
-    YOCTO_HOST: amd64
   tags:
     - x86_64
 
@@ -576,7 +572,7 @@ yocto-qemuarm:
     YOCTO_OUTPUT: --copy-output
 
 yocto-qemux86-64:
-  extends: .yocto-test-arm64
+  extends: .yocto-test-x86-64
   variables:
     YOCTO_BOARD: qemux86-64
 
Signature · 1 line
2.25.1