Merge branch '2023-03-21-assorted-CI-updates' into next

- Assorted improvements to our GitLab and Azure infrastructure.
This commit is contained in:
Tom Rini 2023-03-22 10:35:58 -04:00
commit 12340b122b
3 changed files with 21 additions and 14 deletions

View file

@ -2,7 +2,7 @@ variables:
windows_vm: windows-2019 windows_vm: windows-2019
ubuntu_vm: ubuntu-22.04 ubuntu_vm: ubuntu-22.04
macos_vm: macOS-12 macos_vm: macOS-12
ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230126-17Feb2023 ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230308-21Mar2023
# Add '-u 0' options for Azure pipelines, otherwise we get "permission # Add '-u 0' options for Azure pipelines, otherwise we get "permission
# denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
# since our $(ci_runner_image) user is not root. # since our $(ci_runner_image) user is not root.
@ -426,10 +426,11 @@ stages:
virtualenv -p /usr/bin/python3 /tmp/venv virtualenv -p /usr/bin/python3 /tmp/venv
. /tmp/venv/bin/activate . /tmp/venv/bin/activate
pip install -r test/py/requirements.txt pip install -r test/py/requirements.txt
pip install pytest-azurepipelines
export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
# "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR"; ./test/py/test.py -ra -o cache_dir="$UBOOT_TRAVIS_BUILD_DIR"/.pytest_cache --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR" --report-dir "$UBOOT_TRAVIS_BUILD_DIR";
# the below corresponds to .gitlab-ci.yml "after_script" # the below corresponds to .gitlab-ci.yml "after_script"
rm -rf /tmp/uboot-test-hooks /tmp/venv rm -rf /tmp/uboot-test-hooks /tmp/venv
EOF EOF

View file

@ -1,8 +1,16 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
variables:
DEFAULT_TAG: ""
MIRROR_DOCKER: docker.io
default:
tags:
- ${DEFAULT_TAG}
# Grab our configured image. The source for this is found # Grab our configured image. The source for this is found
# in the u-boot tree at tools/docker/Dockerfile # in the u-boot tree at tools/docker/Dockerfile
image: trini/u-boot-gitlab-ci-runner:jammy-20230126-17Feb2023 image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20230308-21Mar2023
# We run some tests in different order, to catch some failures quicker. # We run some tests in different order, to catch some failures quicker.
stages: stages:
@ -30,6 +38,7 @@ stages:
fi fi
after_script: after_script:
- cp -v /tmp/${TEST_PY_BD}/*.{html,css} .
- rm -rf /tmp/uboot-test-hooks /tmp/venv - rm -rf /tmp/uboot-test-hooks /tmp/venv
script: script:
# If we've been asked to use clang only do one configuration. # If we've been asked to use clang only do one configuration.
@ -76,10 +85,12 @@ stages:
./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID}
${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
--build-dir "$UBOOT_TRAVIS_BUILD_DIR" --build-dir "$UBOOT_TRAVIS_BUILD_DIR"
# It seems that the files in /tmp go away, so copy out what we need artifacts:
- if [[ "${TEST_PY_BD}" == "coreboot" ]]; then when: always
cp -v /tmp/coreboot/*.{html,css} .; paths:
fi - "*.html"
- "*.css"
expire_in: 1 week
build all 32bit ARM platforms: build all 32bit ARM platforms:
stage: world build stage: world build
@ -476,9 +487,4 @@ coreboot test.py:
TEST_PY_BD: "coreboot" TEST_PY_BD: "coreboot"
TEST_PY_TEST_SPEC: "not sleep" TEST_PY_TEST_SPEC: "not sleep"
TEST_PY_ID: "--id qemu" TEST_PY_ID: "--id qemu"
artifacts:
paths:
- "*.html"
- "*.css"
expire_in: 1 week
<<: *buildman_and_testpy_dfn <<: *buildman_and_testpy_dfn

View file

@ -2,7 +2,7 @@
# This Dockerfile is used to build an image containing basic stuff to be used # This Dockerfile is used to build an image containing basic stuff to be used
# to build U-Boot and run our test suites. # to build U-Boot and run our test suites.
FROM ubuntu:jammy-20230126 FROM ubuntu:jammy-20230308
MAINTAINER Tom Rini <trini@konsulko.com> MAINTAINER Tom Rini <trini@konsulko.com>
LABEL Description=" This image is for building U-Boot inside a container" LABEL Description=" This image is for building U-Boot inside a container"
@ -182,7 +182,7 @@ RUN git clone https://gitlab.com/qemu-project/qemu.git /tmp/qemu && \
git config user.email u-boot@denx.de && \ git config user.email u-boot@denx.de && \
# manually apply the bug fix for QEMU 6.1.0 Xilinx Zynq UART emulation codes # manually apply the bug fix for QEMU 6.1.0 Xilinx Zynq UART emulation codes
wget -O - http://patchwork.ozlabs.org/project/qemu-devel/patch/20210823020813.25192-2-bmeng.cn@gmail.com/mbox/ | git am && \ wget -O - http://patchwork.ozlabs.org/project/qemu-devel/patch/20210823020813.25192-2-bmeng.cn@gmail.com/mbox/ | git am && \
./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \ ./configure --prefix=/opt/qemu --target-list="aarch64-softmmu,arm-softmmu,i386-softmmu,m68k-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,ppc-softmmu,riscv32-softmmu,riscv64-softmmu,sh4-softmmu,x86_64-softmmu,xtensa-softmmu" && \
make -j$(nproc) all install && \ make -j$(nproc) all install && \
rm -rf /tmp/qemu rm -rf /tmp/qemu