From 1ad7df2bbecf91ec27c275873bb37f72a4f24d99 Mon Sep 17 00:00:00 2001 From: Davide Gardenal <davide.gardenal@huawei.com> Date: Tue, 12 Jul 2022 09:22:43 +0200 Subject: [PATCH] CI: cleanup zephyr jobs The parent of all zephyr jobs is now unified to enable easier extensibility later on. Update documentation. Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com> --- .oniro-ci/build-generic.yaml | 20 +++----------------- .oniro-ci/machines-and-flavours.yaml | 21 ++++----------------- docs/ci/hidden-jobs/build-zephyr-image.rst | 8 +++++--- docs/ci/hidden-jobs/build-zephyr.rst | 17 ----------------- docs/ci/hidden-jobs/index.rst | 1 - 5 files changed, 12 insertions(+), 55 deletions(-) delete mode 100644 docs/ci/hidden-jobs/build-zephyr.rst diff --git a/.oniro-ci/build-generic.yaml b/.oniro-ci/build-generic.yaml index 86834456..bb7631d2 100644 --- a/.oniro-ci/build-generic.yaml +++ b/.oniro-ci/build-generic.yaml @@ -223,23 +223,6 @@ matrix: - CI_ONIRO_BITBAKE_TARGETS: ["oniro-image-base-tests", "oniro-image-extra-tests"] -# This job is documented in docs/ci/hidden-jobs/build-zephyr.rst -.build-zephyr: - extends: .bitbake-workspace - variables: - CI_ONIRO_BUILD_FLAVOUR: zephyr - CI_ONIRO_BITBAKE_TARGETS: "zephyr-philosophers" - CI_ONIRO_INSTANCE_SIZE: s3.large.2 - script: - - test -n "$CI_ONIRO_BITBAKE_TARGETS" || ( - echo "nothing to build - CI_ONIRO_BITBAKE_TARGETS is empty" - && exit 1 ) - - !reference [.bitbake-workspace, script] - - | - for target in $CI_ONIRO_BITBAKE_TARGETS; do - time bitbake "$target" - done - # This job is documented in docs/ci/hidden-jobs/build-freertos.rst .build-freertos: extends: .bitbake-workspace @@ -399,6 +382,9 @@ .build-zephyr-image: extends: .build-image variables: + CI_ONIRO_BUILD_FLAVOUR: zephyr + CI_ONIRO_RECIPE_NAME: zephyr-philosophers + CI_ONIRO_INSTANCE_SIZE: s3.large.2 CI_ONIRO_JOB_ARTIFACTS: "*.elf *.bin" script: - !reference [.build-image, script] diff --git a/.oniro-ci/machines-and-flavours.yaml b/.oniro-ci/machines-and-flavours.yaml index 19addc37..3ca312aa 100644 --- a/.oniro-ci/machines-and-flavours.yaml +++ b/.oniro-ci/machines-and-flavours.yaml @@ -146,9 +146,6 @@ linux-raspberrypi4-64-clang: # See the note on linux-qemu-x86. CI_ONIRO_BUILD_CACHE: "pub" CI_ONIRO_BB_LOCAL_CONF_BB_GENERATE_MIRROR_TARBALLS: 1 - 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: @@ -161,9 +158,6 @@ zephyr-qemu-x86-clang: # See the note on linux-qemu-x86. CI_ONIRO_BUILD_CACHE: "pub" CI_ONIRO_BB_LOCAL_CONF_BB_GENERATE_MIRROR_TARBALLS: 1 - 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: @@ -173,9 +167,6 @@ zephyr-qemu-cortex-m3-clang: 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: @@ -186,20 +177,16 @@ zephyr-96b-nitrogen-clang: 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, .broken] .zephyr-96b-nitrogen-twister: - extends: .build-image + extends: .build-zephyr-image variables: MACHINE: 96b-nitrogen CI_ONIRO_RECIPE_NAME: zephyr-kernel-test-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] @@ -207,7 +194,7 @@ zephyr-96b-nitrogen-twister-clang: extends: [.zephyr-96b-nitrogen-twister, .toolchain-clang, .broken] .zephyr-96b-avenger: - extends: .build-zephyr + extends: .build-zephyr-image variables: MACHINE: 96b-avenger96 zephyr-96b-avenger-gcc: @@ -216,7 +203,7 @@ zephyr-96b-avenger-clang: extends: [.zephyr-96b-avenger, .toolchain-clang, .broken] .zephyr-nrf52840dk-nrf52840: - extends: .build-zephyr + extends: .build-zephyr-image variables: MACHINE: nrf52840dk-nrf52840 zephyr-nrf52840dk-nrf52840-gcc: @@ -225,7 +212,7 @@ zephyr-nrf52840dk-nrf52840-clang: extends: [.zephyr-nrf52840dk-nrf52840, .toolchain-clang, .broken] .zephyr-arduino-nano-33-ble: - extends: .build-zephyr + extends: .build-zephyr-image variables: MACHINE: arduino-nano-33-ble zephyr-arduino-nano-33-ble-gcc: diff --git a/docs/ci/hidden-jobs/build-zephyr-image.rst b/docs/ci/hidden-jobs/build-zephyr-image.rst index 2d1b41b9..87450921 100644 --- a/docs/ci/hidden-jobs/build-zephyr-image.rst +++ b/docs/ci/hidden-jobs/build-zephyr-image.rst @@ -6,10 +6,12 @@ .build-zephyr-image =================== -The ``.build-zephyr-image`` job extends the :doc:`build-image` job to collect only +The ``.build-zephyr-image`` job extends the :doc:`build-image` job to collect, by default the `*.bin` and `*.elf` files and remove all the other files that would -normally be collected by the artifact system. It is recommended for Zephyr -builds which produce bin and elf images. +normally be collected by the artifact system. The file types of the artifacts can be overridden. +This sets by default ``CI_ONIRO_BUILD_FLAVOUR`` to ``zephyr`` and ``CI_ONIRO_RECIPE_NAME`` +to ``zephyr-philosophers``, the latter can be overridden to change the recipe builded by bitbake. +It is used by all Zephyr builds. Usage Guide =========== diff --git a/docs/ci/hidden-jobs/build-zephyr.rst b/docs/ci/hidden-jobs/build-zephyr.rst deleted file mode 100644 index 70c25eb1..00000000 --- a/docs/ci/hidden-jobs/build-zephyr.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. SPDX-FileCopyrightText: Huawei Inc. -.. -.. SPDX-License-Identifier: CC-BY-4.0 - -============= -.build-zephyr -============= - -The ``.build-zephyr`` job extends the :doc:`bitbake-workspace` job. It sets -``CI_ONIRO_BUILD_FLAVOUR`` to ``zephyr`` and builds the bitbake targets (e.g. -images) as defined by ``CI_ONIRO_BITBAKE_TARGETS`` (defaults included). - -Usage Guide -=========== - -This job is not intended for direct use. Instead it serves as a base for all -the Zephyr-specific :doc:`../machines-and-flavours`. diff --git a/docs/ci/hidden-jobs/index.rst b/docs/ci/hidden-jobs/index.rst index 9248b2d5..39ba17d6 100644 --- a/docs/ci/hidden-jobs/index.rst +++ b/docs/ci/hidden-jobs/index.rst @@ -18,7 +18,6 @@ implementation details. bitbake-workspace build-linux build-linux-matrix - build-zephyr build-freertos build-recipe build-image -- GitLab