From ca3b4fdf8c2bd64e231663c48f4e4aeb0ee47096 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Tue, 28 Jun 2022 14:46:13 +0200
Subject: [PATCH] .oniro-ci,.gitlab-ci.yml: add optional clang jobs

Existing unqualified jobs rely on defaults. Qualified jobs explicitly
configure either clang or gcc and use the appropriate suffix. Qualified
jobs inhabit two new lanes: build-gcc and build-clang, to visually break
from the already long column of "build" jobs.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 .gitlab-ci.yml                       |  82 +++++++++---------
 .oniro-ci/machines-and-flavours.yaml | 125 +++++++++++++++++++++++----
 2 files changed, 150 insertions(+), 57 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 10d41ac7..5ced9570 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,8 @@
 stages:
   - compliance
   - build
+  - build-gcc
+  - build-clang
   - update
   - test
   - report
@@ -108,7 +110,7 @@ bundle-qemu-x86:
   extends: .build-rauc-bundle
   stage: update
   # Depend on the build job to prevent repeating build failures.
-  needs: [linux-qemu-x86]
+  needs: [linux-qemu-x86-gcc]
   variables:
     MACHINE: qemux86
     CI_ONIRO_BUILD_FLAVOUR: linux
@@ -119,7 +121,7 @@ bundle-qemu-x86_64:
   extends: .build-rauc-bundle
   stage: update
   # Depend on the build job to prevent repeating build failures.
-  needs: [linux-qemu-x86_64]
+  needs: [linux-qemu-x86_64-gcc]
   variables:
     MACHINE: qemux86-64
     CI_ONIRO_BUILD_FLAVOUR: linux
@@ -130,7 +132,7 @@ bundle-raspberrypi4-64:
   extends: .build-rauc-bundle
   stage: update
   # Depend on the build job to prevent repeating build failures.
-  needs: [linux-raspberrypi4-64]
+  needs: [linux-raspberrypi4-64-gcc]
   variables:
     MACHINE: raspberrypi4-64
     CI_ONIRO_BUILD_FLAVOUR: linux
@@ -141,7 +143,7 @@ bundle-seco-intel-b68:
   extends: .build-rauc-bundle
   stage: update
   # Depend on the build job to prevent repeating build failures.
-  needs: [linux-seco-intel-b68]
+  needs: [linux-seco-intel-b68-gcc]
   variables:
     MACHINE: seco-intel-b68
     CI_ONIRO_BUILD_FLAVOUR: linux
@@ -215,132 +217,132 @@ publish-seco-intel-b68:
 ## Submit jobs to LAVA
 ##
 lava-qemu-x86:
-  needs: [linux-qemu-x86]
+  needs: [linux-qemu-x86-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: qemux86
-    CI_BUILD_JOB_NAME: linux-qemu-x86
+    CI_BUILD_JOB_NAME: linux-qemu-x86-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-qemu-x86_64:
-  needs: [linux-qemu-x86_64]
+  needs: [linux-qemu-x86_64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: qemux86-64
-    CI_BUILD_JOB_NAME: linux-qemu-x86_64
+    CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-raspberrypi4-64:
-  needs: [linux-raspberrypi4-64]
+  needs: [linux-raspberrypi4-64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: raspberrypi4-64
-    CI_BUILD_JOB_NAME: linux-raspberrypi4-64
+    CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/raspberrypi4-64.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-seco-intel-b68:
-  needs: [linux-seco-intel-b68]
+  needs: [linux-seco-intel-b68-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: seco-intel-b68
-    CI_BUILD_JOB_NAME: linux-seco-intel-b68
+    CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-intel-b68.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-seco-c61:
-  needs: [linux-seco-imx8mm-c61-4gb]
+  needs: [linux-seco-imx8mm-c61-4gb-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: seco-imx8mm-c61-4gb
-    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb
+    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-qemu-x86-ltp:
-  needs: [linux-qemu-x86]
+  needs: [linux-qemu-x86-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: qemux86
-    CI_BUILD_JOB_NAME: linux-qemu-x86
+    CI_BUILD_JOB_NAME: linux-qemu-x86-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86-ltp.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-qemu-x86_64-ltp:
-  needs: [linux-qemu-x86_64]
+  needs: [linux-qemu-x86_64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: qemux86-64
-    CI_BUILD_JOB_NAME: linux-qemu-x86_64
+    CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64-ltp.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-raspberrypi4-64-ltp:
-  needs: [linux-raspberrypi4-64]
+  needs: [linux-raspberrypi4-64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: raspberrypi4-64
-    CI_BUILD_JOB_NAME: linux-raspberrypi4-64
+    CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/raspberrypi4-64-ltp.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-seco-intel-b68-ltp:
-  needs: [linux-seco-intel-b68]
+  needs: [linux-seco-intel-b68-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: seco-intel-b68
-    CI_BUILD_JOB_NAME: linux-seco-intel-b68
+    CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-intel-b68-ltp.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-seco-c61-ltp:
-  needs: [linux-seco-imx8mm-c61-4gb]
+  needs: [linux-seco-imx8mm-c61-4gb-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: seco-imx8mm-c61-4gb
-    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb
+    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-ltp.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-qemu-x86_64-kselftest:
-  needs: [linux-qemu-x86_64]
+  needs: [linux-qemu-x86_64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: qemux86-64
-    CI_BUILD_JOB_NAME: linux-qemu-x86_64
+    CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64-kselftest.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-raspberrypi4-64-kselftest:
-  needs: [linux-raspberrypi4-64]
+  needs: [linux-raspberrypi4-64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: raspberrypi4-64
-    CI_BUILD_JOB_NAME: linux-raspberrypi4-64
+    CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/raspberrypi4-64-kselftest.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-seco-c61-kselftest:
-  needs: [linux-seco-imx8mm-c61-4gb]
+  needs: [linux-seco-imx8mm-c61-4gb-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: seco-imx8mm-c61-4gb
-    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb
+    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-kselftest.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
@@ -355,52 +357,52 @@ lava-zephyr-96b-nitrogen-twister:
     CI_REPORT_JOB_NAME: lava-report
 
 lava-qemu-x86-perf:
-  needs: [linux-qemu-x86]
+  needs: [linux-qemu-x86-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: qemux86
-    CI_BUILD_JOB_NAME: linux-qemu-x86
+    CI_BUILD_JOB_NAME: linux-qemu-x86-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86-perf.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-qemu-x86_64-perf:
-  needs: [linux-qemu-x86_64]
+  needs: [linux-qemu-x86_64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: qemux86-64
-    CI_BUILD_JOB_NAME: linux-qemu-x86_64
+    CI_BUILD_JOB_NAME: linux-qemu-x86_64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/qemu-x86_64-perf.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-raspberrypi4-64-perf:
-  needs: [linux-raspberrypi4-64]
+  needs: [linux-raspberrypi4-64-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: raspberrypi4-64
-    CI_BUILD_JOB_NAME: linux-raspberrypi4-64
+    CI_BUILD_JOB_NAME: linux-raspberrypi4-64-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/raspberrypi4-64-perf.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-seco-intel-b68-perf:
-  needs: [linux-seco-intel-b68]
+  needs: [linux-seco-intel-b68-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: seco-intel-b68
-    CI_BUILD_JOB_NAME: linux-seco-intel-b68
+    CI_BUILD_JOB_NAME: linux-seco-intel-b68-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-intel-b68-perf.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
 lava-seco-c61-perf:
-  needs: [linux-seco-imx8mm-c61-4gb]
+  needs: [linux-seco-imx8mm-c61-4gb-gcc]
   stage: test
   extends: .lava-test
   variables:
     MACHINE: seco-imx8mm-c61-4gb
-    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb
+    CI_BUILD_JOB_NAME: linux-seco-imx8mm-c61-4gb-gcc
     CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/seco-c61-perf.yaml"
     CI_REPORT_JOB_NAME: lava-report
 
diff --git a/.oniro-ci/machines-and-flavours.yaml b/.oniro-ci/machines-and-flavours.yaml
index 3f544b5c..50e1c649 100644
--- a/.oniro-ci/machines-and-flavours.yaml
+++ b/.oniro-ci/machines-and-flavours.yaml
@@ -6,7 +6,30 @@
 
 # The following jobs are documented in docs/ci/machines-and-flavours.rst
 
-linux-qemu-x86:
+.toolchain-gcc:
+  stage: build-gcc
+  dependencies: []
+  needs: []
+  variables:
+    CI_ONIRO_BB_LOCAL_CONF_TOOLCHAIN: "gcc"
+    CI_ONIRO_BB_LOCAL_CONF_RUNTIME: "gnu"
+
+.toolchain-clang:
+  stage: build-clang
+  dependencies: []
+  needs: []
+  variables:
+    CI_ONIRO_BB_LOCAL_CONF_TOOLCHAIN: "clang"
+    CI_ONIRO_BB_LOCAL_CONF_RUNTIME: "llvm"
+  rules:
+    # Clang builds will most often than not fail, so allow them to fail until
+    # the situation improves dramatically so that the policy can be re-visited.
+    # Clang builds are also expensive, so only present the user with an option
+    # to start the build, but do not commence the build automatically.
+    - when: manual
+      allow_failure: true
+
+.linux-qemu-x86:
   extends: .build-wic-image
   variables:
     MACHINE: qemux86
@@ -20,8 +43,12 @@ linux-qemu-x86:
     # tainted build intermediate files, downloads or published artifacts.
     CI_ONIRO_BB_LOCAL_CONF_BB_GENERATE_MIRROR_TARBALLS: 1
     CI_ONIRO_JOB_ARTIFACTS: "*.wic.* *.bmap ovmf.qcow2"
+linux-qemu-x86-gcc:
+ extends: [.linux-qemu-x86, .toolchain-gcc]
+linux-qemu-x86-clang:
+ extends: [.linux-qemu-x86, .toolchain-clang]
 
-linux-qemu-x86_64:
+.linux-qemu-x86_64:
   extends: .build-wic-image
   variables:
     MACHINE: qemux86-64
@@ -31,30 +58,46 @@ linux-qemu-x86_64:
     CI_ONIRO_BUILD_CACHE: "pub"
     CI_ONIRO_BB_LOCAL_CONF_BB_GENERATE_MIRROR_TARBALLS: 1
     CI_ONIRO_JOB_ARTIFACTS: "*.wic.* *.bmap ovmf.qcow2"
+linux-qemu-x86_64-gcc:
+  extends: [.linux-qemu-x86_64, .toolchain-gcc]
+linux-qemu-x86_64-clang:
+  extends: [.linux-qemu-x86_64, .toolchain-clang]
 
-linux-seco-intel-b68:
+.linux-seco-intel-b68:
   extends: .build-wic-image
   variables:
     CI_ONIRO_BUILD_FLAVOUR: linux
     CI_ONIRO_RECIPE_NAME: oniro-image-base-tests
     MACHINE: seco-intel-b68
+linux-seco-intel-b68-gcc:
+  extends: [.linux-seco-intel-b68, .toolchain-gcc]
+linux-seco-intel-b68-clang:
+  extends: [.linux-seco-intel-b68, .toolchain-clang]
 
-linux-seco-intel-b68-extra:
+.linux-seco-intel-b68-extra:
   extends: .build-linux
   variables:
     CI_ONIRO_BUILD_FLAVOUR: linux
     CI_ONIRO_BITBAKE_TARGETS: oniro-image-extra-tests
     MACHINE: seco-intel-b68
+linux-seco-intel-b68-extra-gcc:
+  extends: [.linux-seco-intel-b68-extra, .toolchain-gcc]
+linux-seco-intel-b68-extra-clang:
+  extends: [.linux-seco-intel-b68-extra, .toolchain-clang]
 
-linux-seco-imx8mm-c61-2gb:
+.linux-seco-imx8mm-c61-2gb:
   extends: .build-linux-matrix
   variables:
     MACHINE: seco-imx8mm-c61-2gb
     # This platform requires proprietary resources to boot.
     # See build-generic.yaml for explanation of CI_ONIRO_BB_LOCAL_CONF_ variables.
     CI_ONIRO_BB_LOCAL_CONF_ACCEPT_FSL_EULA: 1
+linux-seco-imx8mm-c61-2gb-gcc:
+  extends: [.linux-seco-imx8mm-c61-2gb, .toolchain-gcc]
+linux-seco-imx8mm-c61-2gb-clang:
+  extends: [.linux-seco-imx8mm-c61-2gb, .toolchain-clang]
 
-linux-seco-imx8mm-c61-4gb:
+.linux-seco-imx8mm-c61-4gb:
   extends: .build-wic-image
   variables:
     CI_ONIRO_BUILD_FLAVOUR: linux
@@ -64,8 +107,12 @@ linux-seco-imx8mm-c61-4gb:
     # See build-generic.yaml for explanation of CI_ONIRO_BB_LOCAL_CONF_ variables.
     CI_ONIRO_BB_LOCAL_CONF_ACCEPT_FSL_EULA: 1
     CI_ONIRO_JOB_ARTIFACTS: "*.wic.* *.bmap flash.bin-seco-imx8mm-c61*"
+linux-seco-imx8mm-c61-4gb-gcc:
+  extends: [.linux-seco-imx8mm-c61-4gb, .toolchain-gcc]
+linux-seco-imx8mm-c61-4gb-clang:
+  extends: [.linux-seco-imx8mm-c61-4gb, .toolchain-clang]
 
-linux-seco-imx8mm-c61-4gb-extra:
+.linux-seco-imx8mm-c61-4gb-extra:
   extends: .build-linux
   variables:
     CI_ONIRO_BUILD_FLAVOUR: linux
@@ -74,15 +121,23 @@ linux-seco-imx8mm-c61-4gb-extra:
     # This platform requires proprietary resources to boot.
     # See build-generic.yaml for explanation of CI_ONIRO_BB_LOCAL_CONF_ variables.
     CI_ONIRO_BB_LOCAL_CONF_ACCEPT_FSL_EULA: 1
+linux-seco-imx8mm-c61-4gb-extra-gcc:
+  extends: [.linux-seco-imx8mm-c61-4gb-extra, .toolchain-gcc]
+linux-seco-imx8mm-c61-4gb-extra-clang:
+  extends: [.linux-seco-imx8mm-c61-4gb-extra, .toolchain-clang]
 
-linux-raspberrypi4-64:
+.linux-raspberrypi4-64:
   extends: .build-wic-image
   variables:
     MACHINE: raspberrypi4-64
     CI_ONIRO_BUILD_FLAVOUR: linux
     CI_ONIRO_RECIPE_NAME: oniro-image-base-tests
+linux-raspberrypi4-64-gcc:
+  extends: [.linux-raspberrypi4-64, .toolchain-gcc]
+linux-raspberrypi4-64-clang:
+  extends: [.linux-raspberrypi4-64, .toolchain-clang]
 
-zephyr-qemu-x86:
+.zephyr-qemu-x86:
   extends: .build-zephyr-image
   variables:
     MACHINE: qemu-x86
@@ -92,8 +147,12 @@ zephyr-qemu-x86:
     CI_ONIRO_RECIPE_NAME: zephyr-philosophers
     CI_ONIRO_BUILD_FLAVOUR: zephyr
     CI_ONIRO_INSTANCE_SIZE: s3.large.2
+zephyr-qemu-x86-gcc:
+  extends: [.zephyr-qemu-x86, .toolchain-gcc]
+zephyr-qemu-x86-clang:
+  extends: [.zephyr-qemu-x86, .toolchain-clang]
 
-zephyr-qemu-cortex-m3:
+.zephyr-qemu-cortex-m3:
   extends: .build-zephyr-image
   variables:
     MACHINE: qemu-cortex-m3
@@ -103,24 +162,36 @@ zephyr-qemu-cortex-m3:
     CI_ONIRO_RECIPE_NAME: zephyr-philosophers
     CI_ONIRO_BUILD_FLAVOUR: zephyr
     CI_ONIRO_INSTANCE_SIZE: s3.large.2
+zephyr-qemu-cortex-m3-gcc:
+  extends: [.zephyr-qemu-cortex-m3, .toolchain-gcc]
+zephyr-qemu-cortex-m3-clang:
+  extends: [.zephyr-qemu-cortex-m3, .toolchain-clang]
 
-zephyr-96b-nitrogen:
+.zephyr-96b-nitrogen:
   extends: .build-zephyr-image
   variables:
     MACHINE: 96b-nitrogen
     CI_ONIRO_RECIPE_NAME: zephyr-philosophers
     CI_ONIRO_BUILD_FLAVOUR: zephyr
     CI_ONIRO_INSTANCE_SIZE: s3.large.2
+zephyr-96b-nitrogen-gcc:
+  extends: [.zephyr-96b-nitrogen, .toolchain-gcc]
+zephyr-96b-nitrogen-clang:
+  extends: [.zephyr-96b-nitrogen, .toolchain-clang]
 
-zephyr-96b-nitrogen-tests:
+.zephyr-96b-nitrogen-tests:
   extends: .build-zephyr-image
   variables:
     MACHINE: 96b-nitrogen
     CI_ONIRO_RECIPE_NAME: zephyr-kernel-test-all
     CI_ONIRO_BUILD_FLAVOUR: zephyr
     CI_ONIRO_INSTANCE_SIZE: s3.large.2
+zephyr-96b-nitrogen-tests-gcc:
+  extends: [.zephyr-96b-nitrogen-tests, .toolchain-gcc]
+zephyr-96b-nitrogen-tests-clang:
+  extends: [.zephyr-96b-nitrogen-tests, .toolchain-clang]
 
-zephyr-96b-nitrogen-twister:
+.zephyr-96b-nitrogen-twister:
   extends: .build-image
   variables:
     MACHINE: 96b-nitrogen
@@ -128,26 +199,46 @@ zephyr-96b-nitrogen-twister:
     CI_ONIRO_BUILD_FLAVOUR: zephyr
     CI_ONIRO_INSTANCE_SIZE: s3.large.2
     CI_ONIRO_JOB_ARTIFACTS: "twister*.tar.bz2"
+zephyr-96b-nitrogen-twister-gcc:
+  extends: [.zephyr-96b-nitrogen-twister, .toolchain-gcc]
+zephyr-96b-nitrogen-twister-clang:
+  extends: [.zephyr-96b-nitrogen-twister, .toolchain-clang]
 
-zephyr-96b-avenger:
+.zephyr-96b-avenger:
   extends: .build-zephyr
   variables:
     MACHINE: 96b-avenger96
+zephyr-96b-avenger-gcc:
+  extends: [.zephyr-96b-avenger, .toolchain-gcc]
+zephyr-96b-avenger-clang:
+  extends: [.zephyr-96b-avenger, .toolchain-clang]
 
-zephyr-nrf52840dk-nrf52840:
+.zephyr-nrf52840dk-nrf52840:
   extends: .build-zephyr
   variables:
     MACHINE: nrf52840dk-nrf52840
+zephyr-nrf52840dk-nrf52840-gcc:
+  extends: [.zephyr-nrf52840dk-nrf52840, .toolchain-gcc]
+zephyr-nrf52840dk-nrf52840-clang:
+  extends: [.zephyr-nrf52840dk-nrf52840, .toolchain-clang]
 
-zephyr-arduino-nano-33-ble:
+.zephyr-arduino-nano-33-ble:
   extends: .build-zephyr
   variables:
     MACHINE: arduino-nano-33-ble
+zephyr-arduino-nano-33-ble-gcc:
+  extends: [.zephyr-arduino-nano-33-ble, .toolchain-gcc]
+zephyr-arduino-nano-33-ble-clang:
+  extends: [.zephyr-arduino-nano-33-ble, .toolchain-clang]
 
-freertos-armv5:
+.freertos-armv5:
   extends: .build-freertos
   variables:
     MACHINE: qemuarmv5
     # See the note on linux-qemu-x86.
     CI_ONIRO_BUILD_CACHE: "pub"
     CI_ONIRO_BB_LOCAL_CONF_BB_GENERATE_MIRROR_TARBALLS: 1
+freertos-armv5-gcc:
+  extends: [.freertos-armv5-gcc, .toolchain-gcc]
+freertos-armv5-clang:
+  extends: [.freertos-armv5-gcc, .toolchain-clang]
-- 
GitLab