blob: f9fdaf00063aedb0953d17262cd56ebd12fa6166 [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
Jerome Forissierb6d564d2015-05-11 08:25:48 +020020 - wget http://releases.linaro.org/15.02/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf.tar.xz
21 - tar xf gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf.tar.xz
22 - export PATH=${PWD}/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin:${PATH}
Jerome Forissier8353e242014-11-26 16:57:07 +010023 - arm-linux-gnueabihf-gcc --version
Jerome Forissierb6d564d2015-05-11 08:25:48 +020024 - wget http://releases.linaro.org/15.02/components/toolchain/binaries/aarch64-linux-gnu/gcc-linaro-4.9-2015.02-3-x86_64_aarch64-linux-gnu.tar.xz
25 - tar xf gcc-linaro-4.9-2015.02-3-x86_64_aarch64-linux-gnu.tar.xz
26 - export PATH=${PWD}/gcc-linaro-4.9-2015.02-3-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 Forissierfcb0c8c2015-09-01 13:46:26 +020048 # Tools required for QEMU tests
49 # 'apt-get install' cannot be used in the new container-based infrastructure
50 # (which is the only allowing caching), so we just build from sources
51 # bc is used during kernel configuration
52 - cd $HOME
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010053 - download http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
54 - tar xf $DL_DIR/bc-1.06.tar.gz
Jerome Forissier59e43052016-02-05 14:52:00 +010055 - (cd bc-1.06 && CC="ccache gcc" ./configure --quiet && $make)
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020056 - export PATH=${HOME}/bc-1.06/bc:$PATH
57 # Tcl/Expect
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010058 - download http://prdownloads.sourceforge.net/tcl/tcl8.6.4-src.tar.gz
59 - tar xf $DL_DIR/tcl8.6.4-src.tar.gz
Jerome Forissier59e43052016-02-05 14:52:00 +010060 - (cd tcl8.6.4/unix && ./configure --quiet --prefix=${HOME}/inst CC="ccache gcc" && $make install)
Jerome Forissiere4c7a6a2016-01-25 14:50:55 +010061 - _download http://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz/download expect5.45.tar.gz
62 - tar xf $DL_DIR/expect5.45.tar.gz
Jerome Forissier59e43052016-02-05 14:52:00 +010063 - (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 +020064 - export PATH=$HOME/inst/bin:$PATH
65 # pycrypto 2.6.1 or later has Crypto.Signature, 2.4.1 does not. It is needed to sign the test TAs.
66 - pip install --upgrade --user pycrypto
67 # Clone repositories for the QEMU test environment
68 - mkdir $HOME/bin
69 - (cd $HOME/bin && wget https://storage.googleapis.com/git-repo-downloads/repo && chmod +x repo)
70 - export PATH=$HOME/bin:$PATH
71 - mkdir $HOME/optee_repo
72 - (cd $HOME/optee_repo && repo init -u https://github.com/OP-TEE/manifest.git </dev/null && repo sync --no-clone-bundle --no-tags --quiet -j 2)
73 - (cd $HOME/optee_repo/qemu && git submodule update --init dtc)
74 - (cd $HOME/optee_repo && mv optee_os optee_os_old && ln -s $MYHOME optee_os)
75 - cd $MYHOME
Jens Wiklander517d41f2016-02-29 15:02:13 +010076 - git fetch https://github.com/OP-TEE/optee_os --tags
Jerome Forissier68510792015-11-06 16:55:57 +010077 - unset CC
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +020078
Pascal Brand260fa3f2014-10-08 08:18:53 +020079# Several compilation options are checked
80script:
Pascal Brand1b10abf2014-10-20 13:24:54 +020081 # Run checkpatch.pl
Pascal Brandeae89212014-12-01 08:46:09 +010082 - git format-patch -1 --stdout | $DST_KERNEL/scripts/checkpatch.pl --ignore FILE_PATH_CHANGES --ignore GERRIT_CHANGE_ID --no-tree -
Pascal Brand1b10abf2014-10-20 13:24:54 +020083
Pascal Brand260fa3f2014-10-08 08:18:53 +020084 # Orly2
Jerome Forissier59e43052016-02-05 14:52:00 +010085 - $make PLATFORM=stm PLATFORM_FLAVOR=orly2
86 - $make PLATFORM=stm-orly2 CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
87 - $make PLATFORM=stm-orly2 CFG_TEE_CORE_LOG_LEVEL=0 DEBUG=0
Pascal Brand260fa3f2014-10-08 08:18:53 +020088
89 # Cannes
Jerome Forissier59e43052016-02-05 14:52:00 +010090 - $make PLATFORM=stm-cannes
91 - $make PLATFORM=stm-cannes CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
92 - $make PLATFORM=stm-cannes CFG_TEE_CORE_LOG_LEVEL=0
Pascal Brand260fa3f2014-10-08 08:18:53 +020093
94 # FVP
Jerome Forissier59e43052016-02-05 14:52:00 +010095 - $make PLATFORM=vexpress-fvp CFG_ARM32_core=y
96 - $make PLATFORM=vexpress-fvp CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
97 - $make PLATFORM=vexpress-fvp CFG_TEE_CORE_LOG_LEVEL=0
98 - $make PLATFORM=vexpress-fvp CFG_ARM64_core=y
99 - $make PLATFORM=vexpress-fvp CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
100 - $make PLATFORM=vexpress-fvp CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=0
Jens Wiklanderc7c09e22015-04-29 09:32:34 +0200101
102 # Juno
Jerome Forissier59e43052016-02-05 14:52:00 +0100103 - $make PLATFORM=vexpress-juno
104 - $make PLATFORM=vexpress-juno CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
105 - $make PLATFORM=vexpress-juno CFG_TEE_CORE_LOG_LEVEL=0
106 - $make PLATFORM=vexpress-juno CFG_ARM64_core=y
107 - $make PLATFORM=vexpress-juno CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
108 - $make PLATFORM=vexpress-juno CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=0
Pascal Brand260fa3f2014-10-08 08:18:53 +0200109
Jerome Forissier59e43052016-02-05 14:52:00 +0100110 # QEMU-virt (PLATFORM=vexpress-qemu_virt)
111 - $make
112 - $make CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
113 - $make CFG_TEE_CORE_LOG_LEVEL=0
114 - $make CFG_CRYPTO=n
115 - $make CFG_CRYPTO_{AES,DES}=n
116 - $make CFG_CRYPTO_{DSA,RSA,DH}=n
117 - $make CFG_CRYPTO_{DSA,RSA,DH,ECC}=n
118 - $make CFG_CRYPTO_{H,C,CBC_}MAC=n
119 - $make CFG_CRYPTO_{G,C}CM=n
120 - $make CFG_CRYPTO_{MD5,SHA{1,224,256,384,512}}=n
121 - $make CFG_WITH_PAGER=y
122 - $make CFG_ENC_FS=n
123 - $make CFG_ENC_FS=y CFG_FS_BLOCK_CACHE=y
124 - $make CFG_ENC_FS=n CFG_FS_BLOCK_CACHE=y
125 - $make CFG_WITH_STATS=y
126 - $make CFG_RPMB_FS=y
127 - $make CFG_RPMB_FS=y CFG_ENC_FS=n
128 - $make CFG_RPMB_FS=y CFG_ENC_FS=n CFG_RPMB_TESTKEY=y
sunnyd2844832015-01-13 09:42:30 +0800129
Jens Wiklander422e54f2016-01-13 14:38:09 +0100130 # QEMU-ARMv8A
131 - $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y
132
sunnyd2844832015-01-13 09:42:30 +0800133 # SUNXI(Allwinner A80)
Jerome Forissier59e43052016-02-05 14:52:00 +0100134 - $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1
135 - $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=0
Jerome Forissierd70e78c2015-04-21 15:42:36 +0200136
137 # HiKey board (HiSilicon Kirin 620)
Jerome Forissier59e43052016-02-05 14:52:00 +0100138 - $make PLATFORM=hikey
139 - $make PLATFORM=hikey CFG_ARM64_core=y
140 - $make PLATFORM=hikey CFG_ARM64_core=y CFG_TEE_TA_LOG_LEVEL=4 DEBUG=1
James Kung44bd24c2015-04-08 15:47:09 +0800141
142 # Mediatek mt8173 EVB
Jerome Forissier59e43052016-02-05 14:52:00 +0100143 - $make PLATFORM=mediatek-mt8173 CFG_ARM64_core=y
Harinarayan Bhatta9b5060c2015-09-07 13:13:32 +0530144
Peng Fan8c4a5a92015-10-16 15:17:59 +0800145 # i.MX6UL 14X14 EVK
Jerome Forissier59e43052016-02-05 14:52:00 +0100146 - $make PLATFORM=imx-mx6ulevk
Peng Fan8c4a5a92015-10-16 15:17:59 +0800147
Harinarayan Bhatta9b5060c2015-09-07 13:13:32 +0530148 # Texas Instruments dra7xx
Jerome Forissier59e43052016-02-05 14:52:00 +0100149 - $make PLATFORM=ti-dra7xx
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +0200150
Sumit Garg85278132015-10-12 13:49:10 -0400151 # FSL ls1021a
Jerome Forissier59e43052016-02-05 14:52:00 +0100152 - $make PLATFORM=ls-ls1021atwr
153 - $make PLATFORM=ls-ls1021aqds
Sumit Garg85278132015-10-12 13:49:10 -0400154
Jerome Forissierfcb0c8c2015-09-01 13:46:26 +0200155 # Run regression tests (xtest in QEMU)
Jerome Forissier59e43052016-02-05 14:52:00 +0100156 - (cd ${HOME}/optee_repo/build && $make check CROSS_COMPILE="ccache arm-linux-gnueabihf-" AARCH32_CROSS_COMPILE=arm-linux-gnueabihf- DUMP_LOGS_ON_ERROR=1)