| variables: |
| windows_vm: windows-2019 |
| ubuntu_vm: ubuntu-22.04 |
| macos_vm: macOS-12 |
| ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230624-20Jul2023 |
| # 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. |
| container_option: -u 0 |
| work_dir: /u |
| |
| stages: |
| - stage: testsuites |
| jobs: |
| - job: utils |
| displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites' |
| pool: |
| vmImage: $(ubuntu_vm) |
| steps: |
| - script: | |
| 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 |
| pip install -r test/py/requirements.txt |
| pip install -r tools/buildman/requirements.txt |
| export UBOOT_TRAVIS_BUILD_DIR=/tmp/tools-only |
| 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 tools-only |
| set -ex |
| ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test |
| ./tools/buildman/buildman -t |
| ./tools/dtoc/dtoc -t |
| ./tools/patman/patman test |
| make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig |
| EOF |
| cat build.sh |
| # We cannot use "container" like other jobs above, as buildman |
| # seems to hang forever with pre-configured "container" environment |
| docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh |
| |
| - job: pylint |
| displayName: Check for any pylint regressions |
| pool: |
| vmImage: $(ubuntu_vm) |
| container: |
| image: $(ci_runner_image) |
| options: $(container_option) |
| steps: |
| - script: | |
| git config --global --add safe.directory $(work_dir) |
| export USER=azure |
| pip install -r test/py/requirements.txt |
| pip install -r tools/buildman/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/tools-only |
| ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board tools-only |
| set -ex |
| pylint --version |
| export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt |
| make pylint_err |