blob: 0437b653ad0db3ec4ba4bebc059e0c61649c9c51 [file] [log] [blame]
Paul Sokolovskyff61bf22023-08-10 17:10:59 +03001- job:
2 name: tf-m-eclair-daily
3 node: docker-tf-m-eclair
4 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
8 Description: |
9 ECLAIR (MISRA) analysis for Trusted Firmware M
10 properties:
11 - build-discarder:
12 days-to-keep: 60
13 artifact-num-to-keep: 40
14 parameters:
15 - string:
16 name: 'FILTER_GROUP'
17 default: "misra"
18 description: |
19 Filter to a group of configurations as recognised by configs.py
20 - string:
21 name: 'CODE_REPO'
22 default: 'https://git.trustedfirmware.org/TF-M/trusted-firmware-m'
23 - string:
24 name: 'CI_SCRIPTS_REPO'
25 default: 'https://git.trustedfirmware.org/ci/tf-m-ci-scripts'
26 - string:
27 name: 'CI_SCRIPTS_BRANCH'
28 default: 'master'
29 - string:
30 name: 'GERRIT_REFSPEC'
31 default: 'refs/heads/master'
32 description: |
33 For use when triggering with specified tag or master 'refs/heads/master' or 'refs/tags/TF-Mv1.0'.
34 - string:
35 name: 'GERRIT_BRANCH'
36 default: 'master'
37 description: |
38 TF-M branch.
39 - string:
40 name: 'GERRIT_HOST'
41 description: |
42 No need to change.
43 - string:
44 name: 'GERRIT_CHANGE_NUMBER'
45 description: |
46 No need to change.
47 - string:
48 name: 'GERRIT_PATCHSET_REVISION'
49 description: |
50 No need to change.
51 - string:
52 name: 'MBEDTLS_VERSION'
53 default: 'mbedtls-3.4.0'
54 description: |
55 Specify which MBEDTLS version to use
56 refs/heads/<branch_name> : Pick up latest HEAD on branch
57 TAG_NAME : Pick up a tagged version
58 full commit hash : Pick up a specific commit
59 - string:
60 name: 'MBEDTLS_URL'
61 default: 'https://git.trustedfirmware.org/mirror/mbed-tls.git'
62 - string:
63 name: 'QCBOR_URL'
64 default: 'https://github.com/laurencelundblade/QCBOR.git'
65 - string:
66 name: 'QCBOR_VERSION'
67 default: '92d3f89030baff4af7be8396c563e6c8ef263622'
68 description: |
69 Specify which QCBOR version to use
70 refs/heads/<branch_name> : Pick up latest HEAD on branch
71 TAG_NAME : Pick up a tagged version
72 full commit hash : Pick up a specific commit
73 - string:
74 name: 'MCUBOOT_REFSPEC'
75 default: 'v1.10.0'
76 description: |
77 Specify which MCUboot version to use
78 refs/heads/<branch_name> : Pick up latest HEAD on branch
79 TAG_NAME : Pick up a tagged version
80 full commit hash : Pick up a specific commit
81 - string:
82 name: 'MCUBOOT_URL'
83 default: 'https://git.trustedfirmware.org/mirror/mcuboot.git'
84 - string:
85 name: 'TFM_TESTS_URL'
86 default: 'https://git.trustedfirmware.org/TF-M/tf-m-tests.git'
87 - string:
88 name: 'TFM_TESTS_REFSPEC'
89 default: 'refs/heads/master'
90 - string:
91 name: 'PSA_ARCH_TESTS_URL'
92 default: 'https://git.trustedfirmware.org/mirror/psa-arch-tests.git'
93 - string:
94 name: 'PSA_ARCH_TESTS_VERSION'
95 default: '5c5792080f0975775bbdddcd9722da446dce550b'
96 - string:
97 name: SHARE_FOLDER
Paul Sokolovsky44971fa2023-08-11 14:15:56 +030098 default: '/tmp'
99 description: 'Folder for initial cloning of repositories'
Paul Sokolovskyff61bf22023-08-10 17:10:59 +0300100 - string:
101 name: 'BUILD_TARGET'
102 default: ''
103 description: |
104 Override build target (for debugging)
105 - string:
106 name: 'BUILD_JOBS'
107 default: '16'
108 description: |
109 --jobs to pass to make, etc.
110 wrappers:
111 - timestamps
112 - timeout:
113 timeout: 2400
114 fail: true
115 builders:
116 - shell: |
117 #!/bin/bash -ex
118 git clone -b $CI_SCRIPTS_BRANCH $CI_SCRIPTS_REPO tf-m-ci-scripts
119 git clone -b master https://git.trustedfirmware.org/ci/tf-ci-scripts.git tf-ci-scripts
120 tf-m-ci-scripts/clone.sh
121
122 export ECLAIR_CONFIG_DIR=$PWD/tf-m-ci-scripts/eclair
123 . tf-ci-scripts/eclair/utils.sh
124 . tf-m-ci-scripts/eclair/utils_tfm.sh
125
126 export CROSS_COMPILE="arm-none-eabi-"
127 export CC_ALIASES="${CROSS_COMPILE}gcc"
128 export CXX_ALIASES="${CROSS_COMPILE}g++"
129 export LD_ALIASES="${CROSS_COMPILE}ld"
130 export AR_ALIASES="${CROSS_COMPILE}ar"
131 export AS_ALIASES="${CROSS_COMPILE}as"
132 export FILEMANIP_ALIASES="cp mv ${CROSS_COMPILE}objcopy"
133
134 # Detach license for initial eclair_env invocation. We then extend it on
135 # each config build iteration.
136 detachLicense 600
137
138 # Toolchain path must be already set before calling eclair_env, can't set it inside it.
139 # And to set toolchain path, we need a CONFIG_NAME
140 CONFIG_NAME=$(python3 tf-m-ci-scripts/configs.py -g $FILTER_GROUP | head -1)
141 eclair_tfm_set_toolchain_path
142
143 export ECLAIR_ANALYSIS=ECLAIR
144 eclair_prepare
145 eclair_analyze tf-m-ci-scripts/run-eclair-builds.sh
146 eclair_make_ecd
147 eclair_make_reports
148 tf-ci-scripts/eclair/analyze_index_html.sh
149
150 publishers:
151 - archive:
152 artifacts: ECLAIR/**, index.html
153 latest-only: false
154 allow-empty: true
Paul Sokolovsky40dfb482023-08-11 19:47:25 +0300155 - email:
156 recipients: 'paul.sokolovsky@linaro.org'