blob: 64f68e4e025fce6e1e223ac6cabe80072dbf4427 [file] [log] [blame]
Pascal Brand260fa3f2014-10-08 08:18:53 +02001# One may have a look at http://docs.travis-ci.com/user/installing-dependencies/
2
Jerome Forissier8353e242014-11-26 16:57:07 +01003language: c
4
Pascal Brand260fa3f2014-10-08 08:18:53 +02005notifications:
6 - email: true
7
Jerome Forissier8a37b102015-07-30 10:42:56 +02008sudo: false
9
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010010cache:
11 ccache: true
12 directories:
13 - $HOME/downloads
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020014
Jens Wiklander517d41f2016-02-29 15:02:13 +010015git:
16 depth: 1000000
17
Pascal Brand260fa3f2014-10-08 08:18:53 +020018before_install:
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020019 # Install the cross compilers
Joakim Bech0806ea92016-04-26 10:03:03 +020020 - 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
21 - tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
22 - export PATH=${PWD}/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin:${PATH}
Jerome Forissier8353e242014-11-26 16:57:07 +010023 - arm-linux-gnueabihf-gcc --version
Jerome Forissier3492bda2016-06-14 11:02:31 +020024 - 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
Joakim Bech0806ea92016-04-26 10:03:03 +020025 - tar xf gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz
26 - export PATH=${PWD}/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin:${PATH}
Jens Wiklanderc7c09e22015-04-29 09:32:34 +020027 - aarch64-linux-gnu-gcc --version
Pascal Brand260fa3f2014-10-08 08:18:53 +020028
Pascal Brand260fa3f2014-10-08 08:18:53 +020029before_script:
Pascal Brand1b10abf2014-10-20 13:24:54 +020030 # Store the home repository
31 - export MYHOME=$PWD
32
Pascal Brand7d657272014-11-03 12:49:01 +010033 # Download checkpatch.pl
34 - export DST_KERNEL=$PWD/linux && mkdir -p $DST_KERNEL/scripts && cd $DST_KERNEL/scripts
35 - wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl && chmod a+x checkpatch.pl
Pascal Brand1b10abf2014-10-20 13:24:54 +020036 - wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt
37 - cd $MYHOME
38
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010039 - export DL_DIR=$HOME/downloads
40 - 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 }
41 - function download() { _download "$1" "" ; }
42
Jerome Forissier59e43052016-02-05 14:52:00 +010043 # Travis assigns 2 CPU cores to the container-based environment, so -j3 is
44 # a good concurrency level
45 # https://docs.travis-ci.com/user/ci-environment/
46 - export make="make -j3 -s"
47
Jerome Forissierc6e09842016-08-25 13:37:45 +020048 # Download and build Git to be used by the checkpatch step
49 # The Travis container-based infrastructure runs Ubuntu 12.04 (Precise) which
50 # comes with git 1.8.5.6. The path exclusion syntax ':(exclude)' used below
51 # requires a more recent version.
52 - cd $HOME
53 - _download https://github.com/git/git/archive/v2.9.3.tar.gz git-2.9.3.tar.gz
54 - tar xf $DL_DIR/git-2.9.3.tar.gz
55 - $make -C git-2.9.3 CC="ccache gcc" NO_CURL=1
56
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020057 # Tools required for QEMU tests
58 # 'apt-get install' cannot be used in the new container-based infrastructure
59 # (which is the only allowing caching), so we just build from sources
60 # bc is used during kernel configuration
61 - cd $HOME
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010062 - download http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
63 - tar xf $DL_DIR/bc-1.06.tar.gz
Jerome Forissier59e43052016-02-05 14:52:00 +010064 - (cd bc-1.06 && CC="ccache gcc" ./configure --quiet && $make)
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020065 - export PATH=${HOME}/bc-1.06/bc:$PATH
66 # Tcl/Expect
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010067 - download http://prdownloads.sourceforge.net/tcl/tcl8.6.4-src.tar.gz
68 - tar xf $DL_DIR/tcl8.6.4-src.tar.gz
Jerome Forissier59e43052016-02-05 14:52:00 +010069 - (cd tcl8.6.4/unix && ./configure --quiet --prefix=${HOME}/inst CC="ccache gcc" && $make install)
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010070 - _download http://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz/download expect5.45.tar.gz
71 - tar xf $DL_DIR/expect5.45.tar.gz
Jerome Forissier59e43052016-02-05 14:52:00 +010072 - (cd expect5.45 && ./configure --quiet --with-tcl=${HOME}/inst/lib --prefix=${HOME}/inst CC="ccache gcc" && $make expect && $make install)
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020073 - export PATH=$HOME/inst/bin:$PATH
74 # pycrypto 2.6.1 or later has Crypto.Signature, 2.4.1 does not. It is needed to sign the test TAs.
75 - pip install --upgrade --user pycrypto
Jens Wiklander875f9da2016-05-31 09:05:36 +020076 - pip install --upgrade --user wand
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020077 # Clone repositories for the QEMU test environment
78 - mkdir $HOME/bin
79 - (cd $HOME/bin && wget https://storage.googleapis.com/git-repo-downloads/repo && chmod +x repo)
80 - export PATH=$HOME/bin:$PATH
81 - mkdir $HOME/optee_repo
Jerome Forissieradedf962016-03-11 15:12:27 +070082 - (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)
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020083 - (cd $HOME/optee_repo/qemu && git submodule update --init dtc)
84 - (cd $HOME/optee_repo && mv optee_os optee_os_old && ln -s $MYHOME optee_os)
85 - cd $MYHOME
Jens Wiklander517d41f2016-02-29 15:02:13 +010086 - git fetch https://github.com/OP-TEE/optee_os --tags
Jerome Forissier68510792015-11-06 16:55:57 +010087 - unset CC
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020088
Jerome Forissier0bbd70a2016-08-17 14:57:05 +020089 # checkpatch.pl will ignore the following paths
90 - CHECKPATCH_IGNORE=$(echo core/lib/lib{fdt,tomcrypt} lib/lib{png,utils,zlib})
Jerome Forissierc6e09842016-08-25 13:37:45 +020091 - _CP_EXCL=$(for p in $CHECKPATCH_IGNORE; do echo ":(exclude)$p" ; done)
Jerome Forissiere04653b2016-08-26 10:40:06 +020092 - function checkpatch() { echo "Checking commit $1"; $HOME/git-2.9.3/git format-patch -1 $1 --stdout -- . $_CP_EXCL | $DST_KERNEL/scripts/checkpatch.pl --ignore FILE_PATH_CHANGES --ignore GERRIT_CHANGE_ID --no-tree -; }
Jerome Forissier0bbd70a2016-08-17 14:57:05 +020093
Pascal Brand260fa3f2014-10-08 08:18:53 +020094# Several compilation options are checked
95script:
Jerome Forissiere04653b2016-08-26 10:40:06 +020096 # Run checkpatch.pl on:
97 # - the tip of the branch if we're not in a pull request
98 # - each commit in the development branch that's not in the target branch otherwise
99 - 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
Pascal Brand1b10abf2014-10-20 13:24:54 +0200100
Pascal Brand260fa3f2014-10-08 08:18:53 +0200101 # Orly2
Jerome Forissierfe973982016-08-23 11:28:01 +0200102 - $make PLATFORM=stm
Jerome Forissier59e43052016-02-05 14:52:00 +0100103 - $make PLATFORM=stm PLATFORM_FLAVOR=orly2
104 - $make PLATFORM=stm-orly2 CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
Joakim Bech76859b22016-06-13 09:23:51 +0200105 - $make PLATFORM=stm-orly2 CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
Pascal Brand260fa3f2014-10-08 08:18:53 +0200106
107 # Cannes
Jerome Forissier59e43052016-02-05 14:52:00 +0100108 - $make PLATFORM=stm-cannes
109 - $make PLATFORM=stm-cannes CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
Joakim Bech76859b22016-06-13 09:23:51 +0200110 - $make PLATFORM=stm-cannes CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
Pascal Brand260fa3f2014-10-08 08:18:53 +0200111
112 # FVP
Jerome Forissier59e43052016-02-05 14:52:00 +0100113 - $make PLATFORM=vexpress-fvp CFG_ARM32_core=y
Jens Wiklander96240b72016-07-20 10:19:58 +0200114 - $make PLATFORM=vexpress-fvp CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1 CFG_TZC400=y
115 - $make PLATFORM=vexpress-fvp CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0 CFG_TZC400=y
Jerome Forissier59e43052016-02-05 14:52:00 +0100116 - $make PLATFORM=vexpress-fvp CFG_ARM64_core=y
Jens Wiklander96240b72016-07-20 10:19:58 +0200117 - $make PLATFORM=vexpress-fvp CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1 CFG_TZC400=y
118 - $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
Jens Wiklanderc7c09e22015-04-29 09:32:34 +0200119
120 # Juno
Jerome Forissier59e43052016-02-05 14:52:00 +0100121 - $make PLATFORM=vexpress-juno
122 - $make PLATFORM=vexpress-juno CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
Joakim Bech76859b22016-06-13 09:23:51 +0200123 - $make PLATFORM=vexpress-juno CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
Jerome Forissier59e43052016-02-05 14:52:00 +0100124 - $make PLATFORM=vexpress-juno CFG_ARM64_core=y
125 - $make PLATFORM=vexpress-juno CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
Joakim Bech76859b22016-06-13 09:23:51 +0200126 - $make PLATFORM=vexpress-juno CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
Pascal Brand260fa3f2014-10-08 08:18:53 +0200127
Jerome Forissier59e43052016-02-05 14:52:00 +0100128 # QEMU-virt (PLATFORM=vexpress-qemu_virt)
129 - $make
Etienne Carriere41912942016-08-16 16:51:20 +0200130 - $make CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
131 - $make CFG_TEE_CORE_LOG_LEVEL=3 DEBUG=1
132 - $make CFG_TEE_CORE_LOG_LEVEL=2 DEBUG=1
133 - $make CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=y DEBUG=1
134 - $make CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_CORE_DEBUG=n DEBUG=0
135 - $make CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=y DEBUG=1
136 - $make CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n DEBUG=0
137 - $make CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_CORE_DEBUG=n CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
Jerome Forissier820e8e42016-08-30 11:27:09 +0200138 - $make CFG_TEE_CORE_MALLOC_DEBUG=y
Jerome Forissier59e43052016-02-05 14:52:00 +0100139 - $make CFG_CRYPTO=n
Pascal Brand25e68972016-05-16 09:03:24 +0200140 - $make CFG_CRYPTO_{AES,DES}=n CFG_ENC_FS=n
141 - $make CFG_CRYPTO_{DSA,RSA,DH}=n CFG_ENC_FS=n
142 - $make CFG_CRYPTO_{DSA,RSA,DH,ECC}=n CFG_ENC_FS=n
143 - $make CFG_CRYPTO_{H,C,CBC_}MAC=n CFG_ENC_FS=n
144 - $make CFG_CRYPTO_{G,C}CM=n CFG_ENC_FS=n
145 - $make CFG_CRYPTO_{MD5,SHA{1,224,256,384,512}}=n CFG_ENC_FS=n
146 - $make CFG_CRYPTO=n CFG_CRYPTO_ECC=y CFG_ENC_FS=n
Jerome Forissier59e43052016-02-05 14:52:00 +0100147 - $make CFG_WITH_PAGER=y
Jens Wiklanderaf626382016-04-07 16:03:00 +0200148 - $make CFG_WITH_PAGER=y CFG_TEE_CORE_DEBUG=y
Jens Wiklandere5287212016-04-05 16:31:07 +0200149 - $make CFG_WITH_PAGER=y CFG_WITH_LPAE=y
150 - $make CFG_WITH_LPAE=y
Jerome Forissier59e43052016-02-05 14:52:00 +0100151 - $make CFG_ENC_FS=n
152 - $make CFG_ENC_FS=y CFG_FS_BLOCK_CACHE=y
153 - $make CFG_ENC_FS=n CFG_FS_BLOCK_CACHE=y
154 - $make CFG_WITH_STATS=y
155 - $make CFG_RPMB_FS=y
156 - $make CFG_RPMB_FS=y CFG_ENC_FS=n
157 - $make CFG_RPMB_FS=y CFG_ENC_FS=n CFG_RPMB_TESTKEY=y
Jerome Forissierb44708c2016-04-18 09:35:34 +0200158 - $make CFG_REE_FS=n CFG_RPMB_FS=y
Jens Wiklanderfa7dd5c2016-03-14 16:07:47 +0100159 - $make CFG_WITH_USER_TA=n CFG_CRYPTO=n CFG_ENC_FS=n CFG_SE_API=n CFG_PCSC_PASSTHRU_READER_DRV=n
Jens Wiklandere5287212016-04-05 16:31:07 +0200160 - $make CFG_SMALL_PAGE_USER_TA=n
Jerome Forissierf246b852016-07-18 15:07:57 +0200161 - $make CFG_SQL_FS=y
Etienne Carriere41912942016-08-16 16:51:20 +0200162 - $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
163 - $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
sunnyd2844832015-01-13 09:42:30 +0800164
Jens Wiklander422e54f2016-01-13 14:38:09 +0100165 # QEMU-ARMv8A
166 - $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y
167
sunnyd2844832015-01-13 09:42:30 +0800168 # SUNXI(Allwinner A80)
Jerome Forissier59e43052016-02-05 14:52:00 +0100169 - $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
Joakim Bech76859b22016-06-13 09:23:51 +0200170 - $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=0 CFG_TEE_TA_LOG_LEVEL=0 DEBUG=0
Jerome Forissierd70e78c2015-04-21 15:42:36 +0200171
172 # HiKey board (HiSilicon Kirin 620)
Jerome Forissier59e43052016-02-05 14:52:00 +0100173 - $make PLATFORM=hikey
174 - $make PLATFORM=hikey CFG_ARM64_core=y
175 - $make PLATFORM=hikey CFG_ARM64_core=y CFG_TEE_TA_LOG_LEVEL=4 DEBUG=1
James Kung44bd24c2015-04-08 15:47:09 +0800176
177 # Mediatek mt8173 EVB
Jerome Forissier59e43052016-02-05 14:52:00 +0100178 - $make PLATFORM=mediatek-mt8173 CFG_ARM64_core=y
Harinarayan Bhatta9b5060c2015-09-07 13:13:32 +0530179
Peng Fan8c4a5a92015-10-16 15:17:59 +0800180 # i.MX6UL 14X14 EVK
Jerome Forissier59e43052016-02-05 14:52:00 +0100181 - $make PLATFORM=imx-mx6ulevk
Peng Fan8c4a5a92015-10-16 15:17:59 +0800182
Harinarayan Bhatta9b5060c2015-09-07 13:13:32 +0530183 # Texas Instruments dra7xx
Jerome Forissier59e43052016-02-05 14:52:00 +0100184 - $make PLATFORM=ti-dra7xx
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +0200185
Aijun Sun1537d622016-06-03 21:23:31 +0800186 # Spreadtrum sc9860
187 - $make PLATFORM=sprd-sc9860
188 - $make PLATFORM=sprd-sc9860 CFG_ARM64_core=y
189
Sumit Garg85278132015-10-12 13:49:10 -0400190 # FSL ls1021a
Jerome Forissier59e43052016-02-05 14:52:00 +0100191 - $make PLATFORM=ls-ls1021atwr
192 - $make PLATFORM=ls-ls1021aqds
Sumit Garg85278132015-10-12 13:49:10 -0400193
Soren Brinkmanne719f292016-05-28 11:17:42 -0700194 # Xilinx ZynqMP
195 - $make PLATFORM=zynqmp-zcu102
196 - $make PLATFORM=zynqmp-zcu102 CFG_ARM64_core=y
197
Jerome Forissier66d2f372016-08-03 17:05:52 +0200198 # HiSilicon D02
199 - $make PLATFORM=d02
200 - $make PLATFORM=d02 CFG_ARM64_core=y
201
Volodymyr Babchukca39b112016-08-25 14:57:32 +0300202 # Renesas RCAR H3
203 - $make PLATFORM=rcar
204 - $make PLATFORM=rcar CFG_ARM64_core=y
205
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +0200206 # Run regression tests (xtest in QEMU)
Jerome Forissier59e43052016-02-05 14:52:00 +0100207 - (cd ${HOME}/optee_repo/build && $make check CROSS_COMPILE="ccache arm-linux-gnueabihf-" AARCH32_CROSS_COMPILE=arm-linux-gnueabihf- DUMP_LOGS_ON_ERROR=1)