Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8336AC43334 for ; Thu, 21 Jul 2022 02:27:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 63AAD8118A; Thu, 21 Jul 2022 04:27:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="GoVoKPSH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 461138209F; Thu, 21 Jul 2022 04:27:17 +0200 (CEST) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B59A780E94 for ; Thu, 21 Jul 2022 04:27:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x831.google.com with SMTP id y9so383837qtv.5 for ; Wed, 20 Jul 2022 19:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=p47zeaORC5+Da1q15L8OsuSOULEk0y1CJY9hyGqFF8U=; b=GoVoKPSHXDM9tCl51JIr0REZvbvQRtrLIKwwYfTYcth+Dwe/fGeicgmKCG8pnGE7gw gPIAGenWFwrUDAgJojYdpCwkl3KMXOEnGfX+bDDKZvtF9obG9pY2xmI+tK+vVyvo5/er Fo4DGZaEdUi5SQgijvgUQPETkiZ6pGrHH2UnU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=p47zeaORC5+Da1q15L8OsuSOULEk0y1CJY9hyGqFF8U=; b=PPR46vGbRL1u50wAV5fFzl/c6klDuAptIrXEekVGCb2AMDZfKeNxXHVWwx3+wc+Q7f 36gVgHdX/a2DhOQBmulAeN5Ik7OJYrZRGy+EJF0fDqrDJbe9mZxXFoiEDWnAE7Y7jkdo 2TYEXiuJC4x4GrJXGsoDfDBXwdx9/RKLCKBTH7ygUr0/vdqlUpY0CL5MGfJRodd5z+/h lI7DaUUfMzoLKAB94K175evggI1ryqemMO15GbBzYmDPd/nLeRiUa6mFpWATwOytSEfu cPyIEWrKZ6zqeDj3iO912H+EE+cmwUB7xQDlAveH5oC5cU8xirf6qjZrCSAo/dIYgjSf 0TkQ== X-Gm-Message-State: AJIora9w9ZbLsIxik3yKzPIDv8b0HGO4t0pVOASKF1amb8ZTT37pcweW 3+DvIQ51uAtUQHtT12x3wkmHA+ASuvOkDQ== X-Google-Smtp-Source: AGRyM1t6g2kMdZcYZebEiEM5oontqmh0Yu/6mRAwKn3iV18MqjrajcTHzQsd1RNSn9iWZVlh0+1Yig== X-Received: by 2002:ac8:5c96:0:b0:31e:c39f:3d63 with SMTP id r22-20020ac85c96000000b0031ec39f3d63mr31853120qta.552.1658370431923; Wed, 20 Jul 2022 19:27:11 -0700 (PDT) Received: from bill-the-cat.lan (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id u20-20020ac858d4000000b00304f3e320f2sm608425qta.4.2022.07.20.19.27.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 19:27:11 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [RFCv1] CI: Move to Ubuntu 2022.04 "Jammy" for CI base Date: Wed, 20 Jul 2022 22:27:10 -0400 Message-Id: <20220721022710.2121589-1-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean - We now have a new enough sbsigntools in the distro, stop building. - Use the 20220531 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. - Adjust where we have "exit on error" set in some scripts due to pylibfdt needing to be updated for python distutils deprecation. - Move to pytest 6.2.5 to address other issues. - Cleanup Azure logic a little bit. Signed-off-by: Tom Rini --- Note that in both CI cases, pylint and binman, etc, test jobs both fail and need further investigation. --- .azure-pipelines.yml | 12 ++++++------ .gitlab-ci.yml | 10 ++++++++-- test/py/requirements.txt | 4 ++-- tools/docker/Dockerfile | 14 ++------------ 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index bc2b437bd999..f57ae92a200d 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -2,7 +2,7 @@ variables: windows_vm: windows-2019 ubuntu_vm: ubuntu-18.04 macos_vm: macOS-10.15 - ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20220302-15Mar2022 + ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20220531-13Jul2022 # 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. @@ -171,12 +171,10 @@ stages: steps: - script: | cat << EOF > build.sh - set -ex - cd ${WORK_DIR} - EOF - cat << "EOF" >> build.sh + cd $(work_dir) git config --global user.name "Azure Pipelines" git config --global user.email bmeng.cn@gmail.com + 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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9cd41750791..5082ad7599c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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-20220531-13Jul2022 # We run some tests in different order, to catch some failures quicker. stages: @@ -199,15 +199,18 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: script: - git config --global user.name "GitLab CI Runner"; git config --global user.email trini@konsulko.com; + git config --global --add safe.directory "${CI_PROJECT_DIR}"; export USER=gitlab; virtualenv -p /usr/bin/python3 /tmp/venv; . /tmp/venv/bin/activate; pip install -r test/py/requirements.txt; + set +e 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}"; ./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 - - ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w + - 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 diff --git a/test/py/requirements.txt b/test/py/requirements.txt index 2d0fcc965cf7..ead92ed8b48c 100644 --- a/test/py/requirements.txt +++ b/test/py/requirements.txt @@ -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 diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index bbdc6557c2a2..0359aafd20c1 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -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-20220531 MAINTAINER Tom Rini 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 && \ -- 2.25.1