forked from OP-TEE/optee_os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
239 lines (203 loc) · 10.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# One may have a look at http://docs.travis-ci.com/user/installing-dependencies/
language: c
notifications:
- email: true
sudo: false
cache:
ccache: true
directories:
- $HOME/downloads
git:
depth: 1000000
before_install:
# Install the cross compilers
- wget http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
- tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
- export PATH=${PWD}/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin:${PATH}
- arm-linux-gnueabihf-gcc --version
- wget http://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/aarch64-linux-gnu/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz
- tar xf gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz
- export PATH=${PWD}/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin:${PATH}
- aarch64-linux-gnu-gcc --version
before_script:
# Store the home repository
- export MYHOME=$PWD
# Download checkpatch.pl
- export DST_KERNEL=$PWD/linux && mkdir -p $DST_KERNEL/scripts && cd $DST_KERNEL/scripts
- wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl && chmod a+x checkpatch.pl
- wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt
- echo "invalid.struct.name" >const_structs.checkpatch
- cd $MYHOME
- export DL_DIR=$HOME/downloads
- function _download() { url="$1"; f="${2:-$(basename $url)}"; if [ ! -e $DL_DIR/$f ] ; then mkdir -p $DL_DIR ; wget $url -O $DL_DIR/$f ; fi }
- function download() { _download "$1" "" ; }
# Travis assigns 2 CPU cores to the container-based environment, so -j3 is
# a good concurrency level
# https://docs.travis-ci.com/user/ci-environment/
- export make="make -j3 -s"
# Download and build Git to be used by the checkpatch step
# The Travis container-based infrastructure runs Ubuntu 12.04 (Precise) which
# comes with git 1.8.5.6. The path exclusion syntax ':(exclude)' used below
# requires a more recent version.
- cd $HOME
- _download https://github.com/git/git/archive/v2.9.3.tar.gz git-2.9.3.tar.gz
- tar xf $DL_DIR/git-2.9.3.tar.gz
- $make -C git-2.9.3 CC="ccache gcc" NO_CURL=1
# Tools required for QEMU tests
# 'apt-get install' cannot be used in the new container-based infrastructure
# (which is the only allowing caching), so we just build from sources
# bc is used during kernel configuration
- cd $HOME
- download http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
- tar xf $DL_DIR/bc-1.06.tar.gz
- (cd bc-1.06 && CC="ccache gcc" ./configure --quiet && $make)
- export PATH=${HOME}/bc-1.06/bc:$PATH
# Tcl/Expect
- download http://prdownloads.sourceforge.net/tcl/tcl8.6.4-src.tar.gz
- tar xf $DL_DIR/tcl8.6.4-src.tar.gz
- (cd tcl8.6.4/unix && ./configure --quiet --prefix=${HOME}/inst CC="ccache gcc" && $make install)
- _download http://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz/download expect5.45.tar.gz
- tar xf $DL_DIR/expect5.45.tar.gz
- (cd expect5.45 && ./configure --quiet --with-tcl=${HOME}/inst/lib --prefix=${HOME}/inst CC="ccache gcc" && $make expect && $make install)
- export PATH=$HOME/inst/bin:$PATH
# pycrypto 2.6.1 or later has Crypto.Signature, 2.4.1 does not. It is needed to sign the test TAs.
- pip install --upgrade --user pycrypto
- pip install --upgrade --user wand
# Clone repositories for the QEMU test environment
- mkdir $HOME/bin
- (cd $HOME/bin && wget https://storage.googleapis.com/git-repo-downloads/repo && chmod +x repo)
- export PATH=$HOME/bin:$PATH
- mkdir $HOME/optee_repo
- (cd $HOME/optee_repo && repo init -u https://github.com/OP-TEE/manifest.git -m travis.xml </dev/null && repo sync --no-clone-bundle --no-tags --quiet -j 2)
- (cd $HOME/optee_repo/qemu && git submodule update --init dtc)
- (cd $HOME/optee_repo && mv optee_os optee_os_old && ln -s $MYHOME optee_os)
- cd $MYHOME
- git fetch https://github.com/OP-TEE/optee_os --tags
- unset CC
- export PATH=$HOME/git-2.9.3/:$DST_KERNEL/scripts/:$PATH
- source ${HOME}/optee_repo/optee_os/scripts/checkpatch_inc.sh
# Several compilation options are checked
script:
- if [ "${COVERITY_SCAN_BRANCH}" == 1 ]; then
echo "Skip script for Coverity";
travis_terminate 0;
fi
# Run checkpatch.pl on:
# - the tip of the branch if we're not in a pull request
# - each commit in the development branch that's not in the target branch otherwise
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then checkpatch HEAD; else for c in $(git rev-list HEAD^1..HEAD^2); do checkpatch $c || failed=1; done; [ -z "$failed" ]; fi
# If we have a pull request with more than 1 commit, also check the squashed commits
# Useful to check if fix-up commits do indeed solve previous checkpatch errors
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then if [ "$(git rev-list --count HEAD^1..HEAD^2)" -gt 1 ]; then checkdiff $(git rev-parse HEAD^1) $(git rev-parse HEAD^2); fi; fi
# b2260
- $make PLATFORM=stm-b2260
- $make PLATFORM=stm-b2260 CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
- $make PLATFORM=stm-b2260 CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
# Cannes
- $make PLATFORM=stm-cannes
- $make PLATFORM=stm-cannes CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
- $make PLATFORM=stm-cannes CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
# FVP
- $make PLATFORM=vexpress-fvp CFG_ARM32_core=y
- $make PLATFORM=vexpress-fvp CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1 CFG_TZC400=y
- $make PLATFORM=vexpress-fvp CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0 CFG_TZC400=y
- $make PLATFORM=vexpress-fvp CFG_ARM64_core=y
- $make PLATFORM=vexpress-fvp CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1 CFG_TZC400=y
- $make PLATFORM=vexpress-fvp CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0 CFG_TZC400=y
# Juno
- $make PLATFORM=vexpress-juno
- $make PLATFORM=vexpress-juno CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
- $make PLATFORM=vexpress-juno CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
- $make PLATFORM=vexpress-juno CFG_ARM64_core=y
- $make PLATFORM=vexpress-juno CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
- $make PLATFORM=vexpress-juno CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
# QEMU-virt (PLATFORM=vexpress-qemu_virt)
- $make
- $make CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
- $make CFG_TEE_CORE_LOG_LEVEL=3 DEBUG=1
- $make CFG_TEE_CORE_LOG_LEVEL=2 DEBUG=1
- $make CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=y DEBUG=1
- $make CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=n DEBUG=0
- $make CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=y DEBUG=1
- $make CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n DEBUG=0
- $make CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
- $make CFG_TEE_CORE_MALLOC_DEBUG=y
- $make CFG_CORE_SANITIZE_UNDEFINED=y
- $make CFG_CORE_SANITIZE_KADDRESS=y
- $make CFG_CRYPTO=n
- $make CFG_CRYPTO_{AES,DES}=n
- $make CFG_CRYPTO_{DSA,RSA,DH}=n
- $make CFG_CRYPTO_{DSA,RSA,DH,ECC}=n
- $make CFG_CRYPTO_{H,C,CBC_}MAC=n
- $make CFG_CRYPTO_{G,C}CM=n
- $make CFG_CRYPTO_{MD5,SHA{1,224,256,384,512}}=n
- $make CFG_CRYPTO=n CFG_CRYPTO_ECC=y
- $make CFG_WITH_PAGER=y
- $make CFG_WITH_PAGER=y CFG_TEE_CORE_DEBUG=y
- $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y
- $make CFG_WITH_LPAE=y
- $make CFG_WITH_STATS=y
- $make CFG_RPMB_FS=y
- $make CFG_RPMB_FS=y CFG_RPMB_TESTKEY=y
- $make CFG_REE_FS=n CFG_RPMB_FS=y
- $make CFG_WITH_USER_TA=n CFG_CRYPTO=n CFG_SE_API=n CFG_PCSC_PASSTHRU_READER_DRV=n
- $make CFG_SMALL_PAGE_USER_TA=n
- $make CFG_SQL_FS=y
- $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_SQL_FS=y CFG_DT=y CFG_PS2MOUSE=y CFG_PL050=y CFG_PL111=y CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=y DEBUG=1
- $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y CFG_RPMB_FS=y CFG_SQL_FS=y CFG_DT=y CFG_PS2MOUSE=y CFG_PL050=y CFG_PL111=y CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n DEBUG=0
- $make CFG_BUILT_IN_ARGS=y CFG_PAGEABLE_ADDR=0 CFG_NS_ENTRY_ADDR=0 CFG_DT_ADDR=0 CFG_DT=y
- $make CFG_TA_GPROF_SUPPORT=y CFG_ULIBS_GPROF=y
# QEMU-ARMv8A
- $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y
- $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y CFG_RPMB_FS=y CFG_SQL_FS=y
- $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y CFG_TA_GPROF_SUPPORT=y CFG_ULIBS_GPROF=y
# SUNXI(Allwinner A80)
- $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
- $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
# HiKey board (HiSilicon Kirin 620)
- $make PLATFORM=hikey
- $make PLATFORM=hikey CFG_ARM64_core=y
- $make PLATFORM=hikey CFG_ARM64_core=y CFG_TEE_TA_LOG_LEVEL=4 DEBUG=1
# Mediatek mt8173 EVB
- $make PLATFORM=mediatek-mt8173 CFG_ARM64_core=y
# i.MX6UL 14X14 EVK
- $make PLATFORM=imx-mx6ulevk ARCH=arm CFG_PAGEABLE_ADDR=0 CFG_NS_ENTRY_ADDR=0x80800000 CFG_DT_ADDR=0x83000000 CFG_DT=y DEBUG=y CFG_TEE_CORE_LOG_LEVEL=4
# i.MX6Quad SABRE
- $make PLATFORM=imx-mx6qsabrelite
- $make PLATFORM=imx-mx6qsabresd
# Texas Instruments dra7xx
- $make PLATFORM=ti-dra7xx
# Spreadtrum sc9860
- $make PLATFORM=sprd-sc9860
- $make PLATFORM=sprd-sc9860 CFG_ARM64_core=y
# FSL ls1021a
- $make PLATFORM=ls-ls1021atwr
- $make PLATFORM=ls-ls1021aqds
# Xilinx Zynq7000 ZC702
- $make PLATFORM=zynq7k-zc702
# Xilinx ZynqMP
- $make PLATFORM=zynqmp-zcu102
- $make PLATFORM=zynqmp-zcu102 CFG_ARM64_core=y
# HiSilicon D02
- $make PLATFORM=d02
- $make PLATFORM=d02 CFG_ARM64_core=y
# Renesas RCAR H3
- $make PLATFORM=rcar
- $make PLATFORM=rcar CFG_ARM64_core=y
# Raspberry Pi 3
- $make PLATFORM=rpi3
- $make PLATFORM=rpi3 CFG_ARM64_core=y
# Run regression tests (xtest in QEMU)
- (cd ${HOME}/optee_repo/build && $make check CROSS_COMPILE="ccache arm-linux-gnueabihf-" AARCH32_CROSS_COMPILE=arm-linux-gnueabihf- CFG_TEE_CORE_DEBUG=y DUMP_LOGS_ON_ERROR=1)
env:
global:
secure: "k30FG3hL6dQywtvMeEjSM0FQ7A0r+AQriUkGSFv7bmwD3EX2H17tJsfZt/h3dj+Pj6lQPdhVg3YO6O6pksJLqBLyz86bN15JEik0e1zftZplzK00oT89eoQr+qgqyrbs6CZBRvS98EAneCNbvgJto9sIPJs0SGu0u31Pr06bTAg="
addons:
coverity_scan:
project:
name: "OP-TEE/optee_os"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "cov-configure --comptype gcc --compiler arm-linux-gnueabihf-gcc --template"
build_command: "make"
branch_pattern: coverity_scan