CI: Azure: Merge PowerPC jobs in to one
PATCH 1/3 CI: Azure: Merge PowerPC jobs in to one
At this point given the number of PowerPC platforms we have, a single job to build them all fits within the time limit we have in Azure.
---
This reduces the overall build time marginally due to freeing up some parallel build slots. However, it needs the DM_ETH series to be applied first as that removes a handful of PowerPC platforms and when we do them all at once we're very close to the maximum run time limit.
--- .azure-pipelines.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
.azure-pipelines.yml +2 -14
@@ -514,20 +514,8 @@ stages: BUILDMAN: "m68k" mips: BUILDMAN: "mips" - non_fsl_ppc: - BUILDMAN: "powerpc -x freescale" - mpc85xx_freescale: - BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x bsc91*" - t208xrdb_corenet_ds: - BUILDMAN: "t208xrdb corenet_ds" - fsl_ppc: - BUILDMAN: "mpc83xx&freescale" - t102x: - BUILDMAN: "t102*" - p1_p2_rdb_pc: - BUILDMAN: "p1_p2_rdb_pc" - p1010rdb_bsc91: - BUILDMAN: "p1010rdb bsc91" + powerpc: + BUILDMAN: "powerpc" siemens: BUILDMAN: "siemens" tegra:
Signature · 1 line
2.25.1
PATCH 2/3 CI: Azure: Further condense jobs
We have a maximum of 10 parallel build jobs, and each job must complete in less than 60 minutes. The overall run time must also be less than 6 hours. Condense a number of jobs so that we have less potential bottlenecks in terms of waiting for a parallel slot to open up for a job to be run.
--- .azure-pipelines.yml | 125 +++++++++++++------------------------------ 1 file changed, 37 insertions(+), 88 deletions(-)
.azure-pipelines.yml +37 -88
@@ -437,107 +437,56 @@ stages: pool: vmImage: $(ubuntu_vm) strategy: - # Use almost the same target division in .travis.yml, only merged - # 3 small build jobs (arc/microblaze/xtensa) into one. + # We need some special sandbox builds to test specific cases. + # Then we try and maximize the 10 parallel jobs we can have at once that + # also must not take more than 60 minutes total to complete. matrix: - arc_microblaze_xtensa: - BUILDMAN: "arc microblaze xtensa" - arm11_arm7_arm920t_arm946es: - BUILDMAN: "arm11 arm7 arm920t arm946es" - arm926ejs: - BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,omap" - at91_non_armv7: - BUILDMAN: "at91 -x armv7" - at91_non_arm926ejs: - BUILDMAN: "at91 -x arm926ejs" - boundary_engicam_toradex: - BUILDMAN: "boundary engicam toradex" - arm_bcm: - BUILDMAN: "bcm -x mips" - nxp_arm32: - BUILDMAN: "freescale -x powerpc,m68k,aarch64,ls101,ls102,ls104,ls108,ls20,lx216" - nxp_ls101x: - BUILDMAN: "freescale&ls101" - nxp_ls102x: - BUILDMAN: "freescale&ls102" - nxp_ls104x: - BUILDMAN: "freescale&ls104" - nxp_ls108x: - BUILDMAN: "freescale&ls108" - nxp_ls20xx: - BUILDMAN: "freescale&ls20" - nxp_lx216x: - BUILDMAN: "freescale&lx216" - imx6: - BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex" - imx: - BUILDMAN: "mx -x mx6,freescale,technexion,toradex" - imx8: - BUILDMAN: "imx8" - keystone2_keystone3: - BUILDMAN: "k2 k3" sandbox_asan: BUILDMAN: "sandbox" OVERRIDE: "-a ASAN" sandbox_clang_asan: BUILDMAN: "sandbox" OVERRIDE: "-O clang-13 -a ASAN" - samsung_socfpga: - BUILDMAN: "samsung socfpga" - sun4i: - BUILDMAN: "sun4i" - sun5i: - BUILDMAN: "sun5i" - sun6i: - BUILDMAN: "sun6i" - sun7i: - BUILDMAN: "sun7i" - sun8i_32bit: - BUILDMAN: "sun8i&armv7" - sun8i_64bit: - BUILDMAN: "sun8i&aarch64" - sun9i: - BUILDMAN: "sun9i" - sun50i: - BUILDMAN: "sun50i" - arm_catch_all: - BUILDMAN: "arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,renesas,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,rk,toradex,socfpga,k2,k3,zynq" + arc_microblaze_mips_m68k_riscv_xtensa: + BUILDMAN: "arc microblaze mips m68k riscv xtensa" + arm11_arm7_arm920t_arm926ejs_arm946es: + BUILDMAN: "arm11 arm7 arm920t arm946es arm926ejs -x mx,siemens,at91,kirkwood,omap" + at91: + BUILDMAN: "at91" + boundary_bcm_engicam_toradex_technexion: + BUILDMAN: "boundary bcm engicam toradex technexion" + nxp_arm32: + BUILDMAN: "freescale -x powerpc,m68k,aarch64,ls1,ls2,lx2" + layerscape_ls1xxx: + BUILDMAN: "ls1" + layerscape_ls2xxx_lx2xxx: + BUILDMAN: "ls2 lx2" + imx8: + BUILDMAN: "imx8" + imx_catchall: + BUILDMAN: "mx -x boundary,engicam,freescale,technexion,toradex" + am33xx_keystone2_keystone3_no_siemens: + BUILDMAN: "am33xx k2 k3 -x siemens" + samsung_siemens_socfpga: + BUILDMAN: "samsung siemens socfpga" + sun4i_sun5i_sun6i_sun7i: + BUILDMAN: "sun4i sun5i sun6i sun7i" + sun8i_sun9i_sun50i: + BUILDMAN: "sun8i sun9i sun50i" sandbox_x86: BUILDMAN: "sandbox x86" - technexion: - BUILDMAN: "technexion" - kirkwood: - BUILDMAN: "kirkwood" - mvebu: - BUILDMAN: "mvebu" - m68k: - BUILDMAN: "m68k" - mips: - BUILDMAN: "mips" + kirkwood_mvebu_renesas: + BUILDMAN: "kirkwood mvebu renesas" powerpc: BUILDMAN: "powerpc" - siemens: - BUILDMAN: "siemens" - tegra: - BUILDMAN: "tegra -x toradex" - am33xx_no_siemens: - BUILDMAN: "am33xx -x siemens" - omap: - BUILDMAN: "omap" - uniphier: - BUILDMAN: "uniphier" - aarch64_catch_all: - BUILDMAN: "aarch64 -x bcm,imx8,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq" rockchip: BUILDMAN: "rk" - renesas: - BUILDMAN: "renesas" - zynq: - BUILDMAN: "zynq&armv7" - zynqmp_versal: - BUILDMAN: "versal|zynqmp&aarch64" - riscv: - BUILDMAN: "riscv" + omap_versal_zynq: + BUILDMAN: "omap versal zynq" + arm_catch_all: + BUILDMAN: "arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,renesas,siemens,mx,samsung,sunxi,am33xx,omap,rk,toradex,socfpga,k2,k3,zynq" + aarch64_catch_all: + BUILDMAN: "aarch64 -x bcm,imx8,k3,ls1,ls2,lx2,mvebu,renesas,sunxi,samsung,socfpga,rk,versal,zynq" steps: - script: | cat << EOF > build.sh
Signature · 1 line
2.25.1
Re: [PATCH 2/3] CI: Azure: Further condense jobs
Quoted 7 lines · Tom Rini
We have a maximum of 10 parallel build jobs, and each job must complete in less than 60 minutes. The overall run time must also be less than 6 hours. Condense a number of jobs so that we have less potential bottlenecks in terms of waiting for a parallel slot to open up for a job to be run.
Quoted 5 lines
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 125 +++++++++++++------------------------------ 1 file changed, 37 insertions(+), 88 deletions(-)
Re: [PATCH 2/3] CI: Azure: Further condense jobs
In reply to Tom RiniQuoted 8 lines · Tom Rini
We have a maximum of 10 parallel build jobs, and each job must complete in less than 60 minutes. The overall run time must also be less than 6 hours. Condense a number of jobs so that we have less potential bottlenecks in terms of waiting for a parallel slot to open up for a job to be run.
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Further testing of this patch under different Azure load lead to a lot more jobs taking too long. It's possible that a v2 of this that omits the layerscape parts and the sunxi parts would still work.
Signature · 1 line
Tom
PATCH 3/3 CI: Move to Ubuntu 2022.04 "Jammy" for CI base
In reply to Tom Rini- We now have a new enough sbsigntools in the distro, stop building.
- Use the 20220801 tag for Jammy.
- Move to pygit2 1.9.2 (current version) as the old one doesn't build on "Jammy".
- Add the working directory to the list of safe directories for git.
- Move to pytest 6.2.5 to address other issues.
- This move exposed a number of minor issues in the existing scripts we used within CI to perform the jobs themselves. The most notable changes here involve using 'set +e / set -e' to enforce when we should or should not make non-zero buildman status be a fatal error.
--- .azure-pipelines.yml | 14 +++++++------- .gitlab-ci.yml | 8 +++++++- test/py/requirements.txt | 4 ++-- tools/docker/Dockerfile | 14 ++------------ 4 files changed, 18 insertions(+), 22 deletions(-)
.azure-pipelines.yml +7 -7
@@ -2,7 +2,7 @@ variables: windows_vm: windows-2019 ubuntu_vm: ubuntu-22.04 macos_vm: macOS-12 - ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20220302-15Mar2022 + ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20220801-09Aug2022 # Add '-u 0' options for Azure pipelines, otherwise we get "permission # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", # since our $(ci_runner_image) user is not root.
@@ -170,13 +170,11 @@ stages: vmImage: $(ubuntu_vm) steps: - script: | - cat << EOF > build.sh - set -ex - cd ${WORK_DIR} - EOF - cat << "EOF" >> build.sh + cat << "EOF" > build.sh + cd $(work_dir) git config --global user.name "Azure Pipelines" git config --global user.email [email protected] + git config --global --add safe.directory $(work_dir) export USER=azure virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate
@@ -185,6 +183,7 @@ stages: export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH} ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl + set -ex ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test ./tools/buildman/buildman -t ./tools/dtoc/dtoc -t
@@ -217,7 +216,7 @@ stages: options: $(container_option) steps: - script: | - cd ${WORK_DIR} + git config --global --add safe.directory $(work_dir) export USER=azure pip install -r test/py/requirements.txt pip install asteval pylint==2.12.2 pyopenssl
@@ -226,6 +225,7 @@ stages: echo "load-plugins=pylint.extensions.docparams" >> .pylintrc export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl + set -ex pylint --version export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt make pylint_err
.gitlab-ci.yml +7 -1
@@ -2,7 +2,7 @@ # Grab our configured image. The source for this is found at: # https://source.denx.de/u-boot/gitlab-ci-runner -image: trini/u-boot-gitlab-ci-runner:focal-20220302-15Mar2022 +image: trini/u-boot-gitlab-ci-runner:jammy-20220801-09Aug2022 # We run some tests in different order, to catch some failures quicker. stages:
@@ -199,6 +199,7 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: script: - git config --global user.name "GitLab CI Runner"; git config --global user.email [email protected]; + git config --global --add safe.directory "${CI_PROJECT_DIR}"; export USER=gitlab; virtualenv -p /usr/bin/python3 /tmp/venv; . /tmp/venv/bin/activate;
@@ -206,8 +207,10 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl; export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"; export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"; + set +e; ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl; + set -e; ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test; ./tools/buildman/buildman -t; ./tools/dtoc/dtoc -t;
@@ -224,14 +227,17 @@ Run tests for Nokia RX-51 (aka N900): Run pylint: stage: testsuites script: + - git config --global --add safe.directory "${CI_PROJECT_DIR}" - pip install -r test/py/requirements.txt - pip install asteval pylint==2.12.2 pyopenssl - export PATH=${PATH}:~/.local/bin - echo "[MASTER]" >> .pylintrc - echo "load-plugins=pylint.extensions.docparams" >> .pylintrc - export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl + - set +e - ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl + - set -e - pylint --version - export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt" - make pylint_err
test/py/requirements.txt +2 -2
@@ -12,9 +12,9 @@ pluggy==0.13.0 py==1.10.0 pycryptodomex==3.9.8 pyelftools==0.27 -pygit2==0.28.2 +pygit2==1.9.2 pyparsing==2.4.2 -pytest==5.2.1 +pytest==6.2.5 python-mimeparse==1.6.0 python-subunit==1.3.0 requests==2.25.1
tools/docker/Dockerfile +2 -12
@@ -2,7 +2,7 @@ # This Dockerfile is used to build an image containing basic stuff to be used # to build U-Boot and run our test suites. -FROM ubuntu:focal-20220302 +FROM ubuntu:jammy-20220801 MAINTAINER Tom Rini <[email protected]> LABEL Description=" This image is for building U-Boot inside a container"
@@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive # Add LLVM repository RUN apt-get update && apt-get install -y gnupg2 wget xz-utils && rm -rf /var/lib/apt/lists/* RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - -RUN echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main | tee /etc/apt/sources.list.d/llvm.list +RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-13 main | tee /etc/apt/sources.list.d/llvm.list # Manually install the kernel.org "Crosstool" based toolchains for gcc-11.1.0 RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ
@@ -117,16 +117,6 @@ RUN apt-get update && apt-get install -y \ # Make kernels readable for libguestfs tools to work correctly RUN chmod +r /boot/vmlinu* -# Manually install a new enough version of sbsigntools (must be v0.9.4 or later) -RUN git clone https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git /tmp/sbsigntools && \ - cd /tmp/sbsigntools && \ - git checkout -b latest v0.9.4 && \ - ./autogen.sh && \ - ./configure && \ - make && \ - make install && \ - rm -rf /tmp/sbsigntools - # Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ cd /tmp/grub && \
Signature · 1 line
2.25.1
Re: [PATCH 3/3] CI: Move to Ubuntu 2022.04 "Jammy" for CI base
Quoted 12 lines · Tom Rini
- We now have a new enough sbsigntools in the distro, stop building.
- Use the 20220801 tag for Jammy.
- Move to pygit2 1.9.2 (current version) as the old one doesn't build on "Jammy".
- Add the working directory to the list of safe directories for git.
- Move to pytest 6.2.5 to address other issues.
- This move exposed a number of minor issues in the existing scripts we used within CI to perform the jobs themselves. The most notable changes here involve using 'set +e / set -e' to enforce when we should or should not make non-zero buildman status be a fatal error.
Quoted 8 lines
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 14 +++++++------- .gitlab-ci.yml | 8 +++++++- test/py/requirements.txt | 4 ++-- tools/docker/Dockerfile | 14 ++------------ 4 files changed, 18 insertions(+), 22 deletions(-)
Re: [PATCH 3/3] CI: Move to Ubuntu 2022.04 "Jammy" for CI base
In reply to Tom RiniQuoted 11 lines · Tom Rini
- We now have a new enough sbsigntools in the distro, stop building.
- Use the 20220801 tag for Jammy.
- Move to pygit2 1.9.2 (current version) as the old one doesn't build on "Jammy".
- Add the working directory to the list of safe directories for git.
- Move to pytest 6.2.5 to address other issues.
- This move exposed a number of minor issues in the existing scripts we used within CI to perform the jobs themselves. The most notable changes here involve using 'set +e / set -e' to enforce when we should or should not make non-zero buildman status be a fatal error.
Quoted 2 lines
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom
Quoted 5 lines · Tom Rini
At this point given the number of PowerPC platforms we have, a single job to build them all fits within the time limit we have in Azure.
Signed-off-by Tom Rini <[email protected]>
Quoted 8 lines
---
This reduces the overall build time marginally due to freeing up some parallel build slots. However, it needs theDM_ETHseries to be applied first as that removes a handful of PowerPC platforms and when we do them all at once we're very close to the maximum run time limit.--- .azure-pipelines.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
Quoted 31 lines
.azure-pipelines.yml +2
-15@@ -514,20 +514,8 @@ stages: BUILDMAN: "m68k" mips: BUILDMAN: "mips" - non_fsl_ppc: - BUILDMAN: "powerpc -x freescale" - mpc85xx_freescale: - BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x bsc91*" - t208xrdb_corenet_ds: - BUILDMAN: "t208xrdb corenet_ds" - fsl_ppc: - BUILDMAN: "mpc83xx&freescale" - t102x: - BUILDMAN: "t102*" - p1_p2_rdb_pc: - BUILDMAN: "p1_p2_rdb_pc" - p1010rdb_bsc91: - BUILDMAN: "p1010rdb bsc91" + powerpc: + BUILDMAN: "powerpc" siemens: BUILDMAN: "siemens" tegra: --2.25.1
Quoted 5 lines · Tom Rini
At this point given the number of PowerPC platforms we have, a single job to build them all fits within the time limit we have in Azure.
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom