mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
CI: Move to Ubuntu 2022.04 "Jammy" for CI base
- 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. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
05f958f8a2
commit
b6d4e0850b
4 changed files with 18 additions and 22 deletions
|
@ -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: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
|
# 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.
|
||||||
|
@ -170,13 +170,11 @@ stages:
|
||||||
vmImage: $(ubuntu_vm)
|
vmImage: $(ubuntu_vm)
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
cat << EOF > build.sh
|
cat << "EOF" > build.sh
|
||||||
set -ex
|
cd $(work_dir)
|
||||||
cd ${WORK_DIR}
|
|
||||||
EOF
|
|
||||||
cat << "EOF" >> build.sh
|
|
||||||
git config --global user.name "Azure Pipelines"
|
git config --global user.name "Azure Pipelines"
|
||||||
git config --global user.email bmeng.cn@gmail.com
|
git config --global user.email bmeng.cn@gmail.com
|
||||||
|
git config --global --add safe.directory $(work_dir)
|
||||||
export USER=azure
|
export USER=azure
|
||||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||||
. /tmp/venv/bin/activate
|
. /tmp/venv/bin/activate
|
||||||
|
@ -185,6 +183,7 @@ stages:
|
||||||
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||||
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
|
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
|
||||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
|
./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/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test
|
||||||
./tools/buildman/buildman -t
|
./tools/buildman/buildman -t
|
||||||
./tools/dtoc/dtoc -t
|
./tools/dtoc/dtoc -t
|
||||||
|
@ -217,7 +216,7 @@ stages:
|
||||||
options: $(container_option)
|
options: $(container_option)
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
cd ${WORK_DIR}
|
git config --global --add safe.directory $(work_dir)
|
||||||
export USER=azure
|
export USER=azure
|
||||||
pip install -r test/py/requirements.txt
|
pip install -r test/py/requirements.txt
|
||||||
pip install asteval pylint==2.12.2 pyopenssl
|
pip install asteval pylint==2.12.2 pyopenssl
|
||||||
|
@ -226,6 +225,7 @@ stages:
|
||||||
echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
||||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
||||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
|
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
|
||||||
|
set -ex
|
||||||
pylint --version
|
pylint --version
|
||||||
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||||
make pylint_err
|
make pylint_err
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Grab our configured image. The source for this is found at:
|
# Grab our configured image. The source for this is found at:
|
||||||
# https://source.denx.de/u-boot/gitlab-ci-runner
|
# 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.
|
# We run some tests in different order, to catch some failures quicker.
|
||||||
stages:
|
stages:
|
||||||
|
@ -199,6 +199,7 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||||
script:
|
script:
|
||||||
- git config --global user.name "GitLab CI Runner";
|
- git config --global user.name "GitLab CI Runner";
|
||||||
git config --global user.email trini@konsulko.com;
|
git config --global user.email trini@konsulko.com;
|
||||||
|
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||||
export USER=gitlab;
|
export USER=gitlab;
|
||||||
virtualenv -p /usr/bin/python3 /tmp/venv;
|
virtualenv -p /usr/bin/python3 /tmp/venv;
|
||||||
. /tmp/venv/bin/activate;
|
. /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 UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl;
|
||||||
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
|
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
|
||||||
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
|
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
|
||||||
|
set +e;
|
||||||
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
||||||
--board sandbox_spl;
|
--board sandbox_spl;
|
||||||
|
set -e;
|
||||||
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
|
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
|
||||||
./tools/buildman/buildman -t;
|
./tools/buildman/buildman -t;
|
||||||
./tools/dtoc/dtoc -t;
|
./tools/dtoc/dtoc -t;
|
||||||
|
@ -224,14 +227,17 @@ Run tests for Nokia RX-51 (aka N900):
|
||||||
Run pylint:
|
Run pylint:
|
||||||
stage: testsuites
|
stage: testsuites
|
||||||
script:
|
script:
|
||||||
|
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
||||||
- pip install -r test/py/requirements.txt
|
- pip install -r test/py/requirements.txt
|
||||||
- pip install asteval pylint==2.12.2 pyopenssl
|
- pip install asteval pylint==2.12.2 pyopenssl
|
||||||
- export PATH=${PATH}:~/.local/bin
|
- export PATH=${PATH}:~/.local/bin
|
||||||
- echo "[MASTER]" >> .pylintrc
|
- echo "[MASTER]" >> .pylintrc
|
||||||
- echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
- echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
||||||
- export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
- export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
||||||
|
- set +e
|
||||||
- ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
- ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
||||||
--board sandbox_spl
|
--board sandbox_spl
|
||||||
|
- set -e
|
||||||
- pylint --version
|
- pylint --version
|
||||||
- export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
|
- export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
|
||||||
- make pylint_err
|
- make pylint_err
|
||||||
|
|
|
@ -12,9 +12,9 @@ pluggy==0.13.0
|
||||||
py==1.10.0
|
py==1.10.0
|
||||||
pycryptodomex==3.9.8
|
pycryptodomex==3.9.8
|
||||||
pyelftools==0.27
|
pyelftools==0.27
|
||||||
pygit2==0.28.2
|
pygit2==1.9.2
|
||||||
pyparsing==2.4.2
|
pyparsing==2.4.2
|
||||||
pytest==5.2.1
|
pytest==6.2.5
|
||||||
python-mimeparse==1.6.0
|
python-mimeparse==1.6.0
|
||||||
python-subunit==1.3.0
|
python-subunit==1.3.0
|
||||||
requests==2.25.1
|
requests==2.25.1
|
||||||
|
|
|
@ -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:focal-20220302
|
FROM ubuntu:jammy-20220801
|
||||||
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"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||||
# Add LLVM repository
|
# Add LLVM repository
|
||||||
RUN apt-get update && apt-get install -y gnupg2 wget xz-utils && rm -rf /var/lib/apt/lists/*
|
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 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
|
# 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
|
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
|
# Make kernels readable for libguestfs tools to work correctly
|
||||||
RUN chmod +r /boot/vmlinu*
|
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
|
# 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 && \
|
RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \
|
||||||
cd /tmp/grub && \
|
cd /tmp/grub && \
|
||||||
|
|
Loading…
Reference in a new issue