diff --git a/.oniro-ci/build-generic.yaml b/.oniro-ci/build-generic.yaml index fe7d431ecea5a1013c05c695f7fc89a343680e30..bc79cda5c415bd0051c68e905e9380a935f8997b 100644 --- a/.oniro-ci/build-generic.yaml +++ b/.oniro-ci/build-generic.yaml @@ -162,6 +162,17 @@ | sed -e 's/^CI_ONIRO_BB_LOCAL_CONF_plus_equals_//g' -e 's/"/\\"/g' -e 's/=/ += "/g' -e 's/$/"/g' \ | sort \ | tee -a conf/local.conf ) + # Variables in the form of '^CI_ONIRO_BB_BBLAYERS_CONF_plus_equals_attr' are + # converted to 'attr += "value"' and appended to bblayers.conf + # this is useful if layer has to be added but bitbake add-layer command cannot be used + # (for example this layer's class is inherited via local.conf already) + - | + ( set +o pipefail; + env \ + | grep -E '^CI_ONIRO_BB_BBLAYERS_CONF_plus_equals_[A-Z_0-9]+=' \ + | sed -e 's/^CI_ONIRO_BB_BBLAYERS_CONF_plus_equals_//g' -e 's/"/\\"/g' -e 's/=/ += "/g' -e 's/$/"/g' \ + | sort \ + | tee -a conf/bblayers.conf ) # Sanity check: disallow using public build cache with a specific setting # in local.conf. The list of settings may grow over time. @@ -275,6 +286,10 @@ done ) fi + # Compress and copy artifacts of do_abicheck task (if any) + if test -n "$CI_ONIRO_ABICHECK_TOPDIR" && test -d "$BITBAKE_TMPDIR"/../"$CI_ONIRO_ABICHECK_TOPDIR"; then + tar -cJf "$CI_PROJECT_DIR"/artifacts/abicheck-"$CI_COMMIT_SHA".tar.xz "$BITBAKE_TMPDIR"/../"$CI_ONIRO_ABICHECK_TOPDIR"/*/*/binaryaudit + fi set +x artifacts: paths: @@ -399,6 +414,14 @@ .build: extends: .build-recipe +.check-abi: + variables: + CI_ONIRO_BB_LOCAL_CONF_plus_equals_INHERIT: abicheck + CI_ONIRO_BB_LOCAL_CONF_BINARY_AUDIT_WARN_ONLY: "1" + CI_ONIRO_MANIFEST_NAME: manifests/ci.xml + CI_ONIRO_BB_BBLAYERS_CONF_plus_equals_BBLAYERS: "../meta-binaryaudit" + CI_ONIRO_ABICHECK_TOPDIR: "./buildhistory/packages" + # This job is documented in docs/ci/hidden-jobs/build-docs.rst .build-docs: interruptible: true diff --git a/.oniro-ci/machines-and-flavours.yaml b/.oniro-ci/machines-and-flavours.yaml index 3ca312aa0340399b16c0247221c0633c50474274..ed59249c1613af9219dc13a11e51c050b3d7bbb1 100644 --- a/.oniro-ci/machines-and-flavours.yaml +++ b/.oniro-ci/machines-and-flavours.yaml @@ -32,7 +32,7 @@ allow_failure: true .linux-qemu-x86: - extends: .build-wic-image + extends: [.build-wic-image, .check-abi] variables: MACHINE: qemux86 CI_ONIRO_BUILD_FLAVOUR: linux @@ -51,7 +51,7 @@ linux-qemu-x86-clang: extends: [.linux-qemu-x86, .toolchain-clang] .linux-qemu-x86_64: - extends: .build-wic-image + extends: [.build-wic-image, .check-abi] variables: MACHINE: qemux86-64 CI_ONIRO_BUILD_FLAVOUR: linux @@ -129,7 +129,7 @@ linux-seco-imx8mm-c61-4gb-extra-clang: extends: [.linux-seco-imx8mm-c61-4gb-extra, .toolchain-clang, .broken] .linux-raspberrypi4-64: - extends: .build-wic-image + extends: [.build-wic-image, .check-abi] variables: MACHINE: raspberrypi4-64 CI_ONIRO_BUILD_FLAVOUR: linux diff --git a/manifests/ci.xml b/manifests/ci.xml new file mode 100644 index 0000000000000000000000000000000000000000..c8b059b05b26468f17467f3caad7ecf9e00f0efc --- /dev/null +++ b/manifests/ci.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +SPDX-License-Identifier: Apache-2.0 +SPDX-FileCopyrightText: Huawei Inc. +--> +<manifest> + <include name="manifests/default.xml" /> + <project name="oniro-core/meta-binaryaudit" remote="eclipse" revision="oniro/kirkstone" path="meta-binaryaudit" /> +</manifest>