- job: | |
name: tf-m-eclair-daily | |
node: docker-tf-m-eclair | |
project-type: freestyle | |
concurrent: true | |
disabled: false | |
defaults: global | |
Description: | | |
ECLAIR (MISRA) analysis for Trusted Firmware M | |
properties: | |
- build-discarder: | |
days-to-keep: 60 | |
artifact-num-to-keep: 40 | |
triggers: | |
- timed: 'H H(20-23) * * 3,7' | |
parameters: | |
- string: | |
name: 'FILTER_GROUP' | |
default: "misra" | |
description: | | |
Filter to a group of configurations as recognised by configs.py | |
- string: | |
name: 'CODE_REPO' | |
default: 'https://git.trustedfirmware.org/TF-M/trusted-firmware-m' | |
- string: | |
name: 'CI_SCRIPTS_REPO' | |
default: 'https://git.trustedfirmware.org/ci/tf-m-ci-scripts' | |
- string: | |
name: 'CI_SCRIPTS_BRANCH' | |
default: 'master' | |
- string: | |
name: 'GERRIT_REFSPEC' | |
default: 'refs/heads/main' | |
description: | | |
For use when triggering with specified tag or master 'refs/heads/main' or 'refs/tags/TF-Mv1.0'. | |
- string: | |
name: 'GERRIT_BRANCH' | |
default: 'main' | |
description: | | |
TF-M branch. | |
- string: | |
name: 'GERRIT_HOST' | |
description: | | |
No need to change. | |
- string: | |
name: 'GERRIT_CHANGE_NUMBER' | |
description: | | |
No need to change. | |
- string: | |
name: 'GERRIT_PATCHSET_REVISION' | |
description: | | |
No need to change. | |
- string: | |
name: 'MBEDTLS_VERSION' | |
default: '' | |
description: | | |
Specify which MBEDTLS version to use | |
refs/heads/<branch_name> : Pick up latest HEAD on branch | |
TAG_NAME : Pick up a tagged version | |
full commit hash : Pick up a specific commit | |
- string: | |
name: 'MBEDTLS_URL' | |
default: 'https://git.trustedfirmware.org/mirror/mbed-tls.git' | |
- string: | |
name: 'QCBOR_URL' | |
default: 'https://github.com/laurencelundblade/QCBOR.git' | |
- string: | |
name: 'QCBOR_VERSION' | |
default: '' | |
description: | | |
Specify which QCBOR version to use | |
refs/heads/<branch_name> : Pick up latest HEAD on branch | |
TAG_NAME : Pick up a tagged version | |
full commit hash : Pick up a specific commit | |
- string: | |
name: 'MCUBOOT_REFSPEC' | |
default: '' | |
description: | | |
Specify which MCUboot version to use | |
refs/heads/<branch_name> : Pick up latest HEAD on branch | |
TAG_NAME : Pick up a tagged version | |
full commit hash : Pick up a specific commit | |
- string: | |
name: 'MCUBOOT_URL' | |
default: 'https://git.trustedfirmware.org/mirror/mcuboot.git' | |
- string: | |
name: 'TFM_TESTS_URL' | |
default: 'https://git.trustedfirmware.org/TF-M/tf-m-tests.git' | |
- string: | |
name: 'TFM_TESTS_REFSPEC' | |
default: '' | |
- string: | |
name: 'PSA_ARCH_TESTS_URL' | |
default: 'https://git.trustedfirmware.org/mirror/psa-arch-tests.git' | |
- string: | |
name: 'PSA_ARCH_TESTS_VERSION' | |
default: '' | |
- string: | |
name: SHARE_FOLDER | |
default: '/tmp' | |
description: 'Folder for initial cloning of repositories' | |
- string: | |
name: 'BUILD_TARGET' | |
default: '' | |
description: | | |
Override build target (for debugging) | |
- string: | |
name: 'BUILD_JOBS' | |
default: '16' | |
description: | | |
--jobs to pass to make, etc. | |
wrappers: | |
- timestamps | |
- timeout: | |
timeout: 2400 | |
fail: true | |
builders: | |
- shell: | | |
#!/bin/bash -ex | |
git clone -b $CI_SCRIPTS_BRANCH $CI_SCRIPTS_REPO tf-m-ci-scripts | |
git clone -b master https://git.trustedfirmware.org/ci/tf-ci-scripts.git tf-ci-scripts | |
tf-m-ci-scripts/clone.sh | |
export ECLAIR_CONFIG_DIR=$PWD/tf-m-ci-scripts/eclair | |
. tf-ci-scripts/eclair/utils.sh | |
. tf-m-ci-scripts/eclair/utils_tfm.sh | |
export CROSS_COMPILE="arm-none-eabi-" | |
export CC_ALIASES="${CROSS_COMPILE}gcc" | |
export CXX_ALIASES="${CROSS_COMPILE}g++" | |
export LD_ALIASES="${CROSS_COMPILE}ld" | |
export AR_ALIASES="${CROSS_COMPILE}ar" | |
export AS_ALIASES="${CROSS_COMPILE}as" | |
export FILEMANIP_ALIASES="cp mv ${CROSS_COMPILE}objcopy" | |
# Detach license for initial eclair_env invocation. We then extend it on | |
# each config build iteration. | |
detachLicense 600 | |
# Toolchain path must be already set before calling eclair_env, can't set it inside it. | |
# And to set toolchain path, we need a CONFIG_NAME | |
CONFIG_NAME=$(python3 tf-m-ci-scripts/configs.py -g $FILTER_GROUP | head -1) | |
eclair_tfm_set_toolchain_path | |
export ECLAIR_ANALYSIS=ECLAIR | |
eclair_prepare | |
eclair_analyze tf-m-ci-scripts/run-eclair-builds.sh | |
eclair_make_ecd | |
eclair_make_reports | |
tf-ci-scripts/eclair/analyze_index_html.sh | |
publishers: | |
- archive: | |
artifacts: ECLAIR/**, index.html | |
latest-only: false | |
allow-empty: true | |
- email: | |
recipients: 'paul.sokolovsky@linaro.org' |