blob: a94a399bce05560494bacdcadf545ae24ec664a5 [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
Paul Sokolovskyd3902d92023-08-11 19:56:31 +030014 triggers:
15 - timed: 'H H(20-23) * * 3,7'
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030016 parameters:
17 - string:
18 name: 'FILTER_GROUP'
19 default: "misra"
20 description: |
21 Filter to a group of configurations as recognised by configs.py
22 - string:
23 name: 'CODE_REPO'
24 default: 'https://git.trustedfirmware.org/TF-M/trusted-firmware-m'
25 - string:
26 name: 'CI_SCRIPTS_REPO'
27 default: 'https://git.trustedfirmware.org/ci/tf-m-ci-scripts'
28 - string:
29 name: 'CI_SCRIPTS_BRANCH'
30 default: 'master'
31 - string:
32 name: 'GERRIT_REFSPEC'
Xinyu Zhang8450cc92023-09-21 16:46:13 +080033 default: 'refs/heads/main'
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030034 description: |
Xinyu Zhang8450cc92023-09-21 16:46:13 +080035 For use when triggering with specified tag or master 'refs/heads/main' or 'refs/tags/TF-Mv1.0'.
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030036 - string:
37 name: 'GERRIT_BRANCH'
Xinyu Zhang8450cc92023-09-21 16:46:13 +080038 default: 'main'
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030039 description: |
40 TF-M branch.
41 - string:
42 name: 'GERRIT_HOST'
43 description: |
44 No need to change.
45 - string:
46 name: 'GERRIT_CHANGE_NUMBER'
47 description: |
48 No need to change.
49 - string:
50 name: 'GERRIT_PATCHSET_REVISION'
51 description: |
52 No need to change.
53 - string:
54 name: 'MBEDTLS_VERSION'
Paul Sokolovskyfb7a76b2023-08-17 21:10:45 +030055 default: ''
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030056 description: |
57 Specify which MBEDTLS version to use
58 refs/heads/<branch_name> : Pick up latest HEAD on branch
59 TAG_NAME : Pick up a tagged version
60 full commit hash : Pick up a specific commit
61 - string:
62 name: 'MBEDTLS_URL'
63 default: 'https://git.trustedfirmware.org/mirror/mbed-tls.git'
64 - string:
65 name: 'QCBOR_URL'
66 default: 'https://github.com/laurencelundblade/QCBOR.git'
67 - string:
68 name: 'QCBOR_VERSION'
Paul Sokolovsky027c3102023-08-18 13:38:27 +030069 default: ''
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030070 description: |
71 Specify which QCBOR version to use
72 refs/heads/<branch_name> : Pick up latest HEAD on branch
73 TAG_NAME : Pick up a tagged version
74 full commit hash : Pick up a specific commit
75 - string:
76 name: 'MCUBOOT_REFSPEC'
Paul Sokolovsky027c3102023-08-18 13:38:27 +030077 default: ''
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030078 description: |
79 Specify which MCUboot version to use
80 refs/heads/<branch_name> : Pick up latest HEAD on branch
81 TAG_NAME : Pick up a tagged version
82 full commit hash : Pick up a specific commit
83 - string:
84 name: 'MCUBOOT_URL'
85 default: 'https://git.trustedfirmware.org/mirror/mcuboot.git'
86 - string:
87 name: 'TFM_TESTS_URL'
88 default: 'https://git.trustedfirmware.org/TF-M/tf-m-tests.git'
89 - string:
90 name: 'TFM_TESTS_REFSPEC'
Paul Sokolovsky027c3102023-08-18 13:38:27 +030091 default: ''
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030092 - string:
93 name: 'PSA_ARCH_TESTS_URL'
94 default: 'https://git.trustedfirmware.org/mirror/psa-arch-tests.git'
95 - string:
96 name: 'PSA_ARCH_TESTS_VERSION'
Paul Sokolovsky027c3102023-08-18 13:38:27 +030097 default: ''
Paul Sokolovskyff61bf22023-08-10 17:10:59 +030098 - string:
99 name: SHARE_FOLDER
Paul Sokolovsky44971fa2023-08-11 14:15:56 +0300100 default: '/tmp'
101 description: 'Folder for initial cloning of repositories'
Paul Sokolovskyff61bf22023-08-10 17:10:59 +0300102 - string:
103 name: 'BUILD_TARGET'
104 default: ''
105 description: |
106 Override build target (for debugging)
107 - string:
108 name: 'BUILD_JOBS'
109 default: '16'
110 description: |
111 --jobs to pass to make, etc.
112 wrappers:
113 - timestamps
114 - timeout:
115 timeout: 2400
116 fail: true
117 builders:
118 - shell: |
119 #!/bin/bash -ex
120 git clone -b $CI_SCRIPTS_BRANCH $CI_SCRIPTS_REPO tf-m-ci-scripts
121 git clone -b master https://git.trustedfirmware.org/ci/tf-ci-scripts.git tf-ci-scripts
122 tf-m-ci-scripts/clone.sh
123
124 export ECLAIR_CONFIG_DIR=$PWD/tf-m-ci-scripts/eclair
125 . tf-ci-scripts/eclair/utils.sh
126 . tf-m-ci-scripts/eclair/utils_tfm.sh
127
128 export CROSS_COMPILE="arm-none-eabi-"
129 export CC_ALIASES="${CROSS_COMPILE}gcc"
130 export CXX_ALIASES="${CROSS_COMPILE}g++"
131 export LD_ALIASES="${CROSS_COMPILE}ld"
132 export AR_ALIASES="${CROSS_COMPILE}ar"
133 export AS_ALIASES="${CROSS_COMPILE}as"
134 export FILEMANIP_ALIASES="cp mv ${CROSS_COMPILE}objcopy"
135
136 # Detach license for initial eclair_env invocation. We then extend it on
137 # each config build iteration.
138 detachLicense 600
139
140 # Toolchain path must be already set before calling eclair_env, can't set it inside it.
141 # And to set toolchain path, we need a CONFIG_NAME
142 CONFIG_NAME=$(python3 tf-m-ci-scripts/configs.py -g $FILTER_GROUP | head -1)
143 eclair_tfm_set_toolchain_path
144
145 export ECLAIR_ANALYSIS=ECLAIR
146 eclair_prepare
147 eclair_analyze tf-m-ci-scripts/run-eclair-builds.sh
148 eclair_make_ecd
149 eclair_make_reports
150 tf-ci-scripts/eclair/analyze_index_html.sh
151
152 publishers:
153 - archive:
154 artifacts: ECLAIR/**, index.html
155 latest-only: false
156 allow-empty: true
Paul Sokolovsky40dfb482023-08-11 19:47:25 +0300157 - email:
158 recipients: 'paul.sokolovsky@linaro.org'