Pascal Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 1 | # One may have a look at http://docs.travis-ci.com/user/installing-dependencies/ |
| 2 | |
Jerome Forissier | 8353e24 | 2014-11-26 16:57:07 +0100 | [diff] [blame] | 3 | language: c |
| 4 | |
Pascal Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 5 | notifications: |
| 6 | - email: true |
| 7 | |
Jerome Forissier | 8a37b10 | 2015-07-30 10:42:56 +0200 | [diff] [blame] | 8 | sudo: false |
| 9 | |
Jerome Forissier | e4c7a6a | 2016-01-25 14:50:55 +0100 | [diff] [blame] | 10 | cache: |
| 11 | ccache: true |
| 12 | directories: |
| 13 | - $HOME/downloads |
Jerome Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 14 | |
Jens Wiklander | 517d41f | 2016-02-29 15:02:13 +0100 | [diff] [blame^] | 15 | git: |
| 16 | depth: 1000000 |
| 17 | |
Pascal Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 18 | before_install: |
Jerome Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 19 | # Install the cross compilers |
Jerome Forissier | b6d564d | 2015-05-11 08:25:48 +0200 | [diff] [blame] | 20 | - 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 Forissier | 8353e24 | 2014-11-26 16:57:07 +0100 | [diff] [blame] | 23 | - arm-linux-gnueabihf-gcc --version |
Jerome Forissier | b6d564d | 2015-05-11 08:25:48 +0200 | [diff] [blame] | 24 | - 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 Wiklander | c7c09e2 | 2015-04-29 09:32:34 +0200 | [diff] [blame] | 27 | - aarch64-linux-gnu-gcc --version |
Pascal Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 28 | |
Pascal Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 29 | before_script: |
Pascal Brand | 1b10abf | 2014-10-20 13:24:54 +0200 | [diff] [blame] | 30 | # Store the home repository |
| 31 | - export MYHOME=$PWD |
| 32 | |
Pascal Brand | 7d65727 | 2014-11-03 12:49:01 +0100 | [diff] [blame] | 33 | # 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 Brand | 1b10abf | 2014-10-20 13:24:54 +0200 | [diff] [blame] | 36 | - wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt |
| 37 | - cd $MYHOME |
| 38 | |
Jerome Forissier | e4c7a6a | 2016-01-25 14:50:55 +0100 | [diff] [blame] | 39 | - 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 Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 43 | # 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 Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 48 | # 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 Forissier | e4c7a6a | 2016-01-25 14:50:55 +0100 | [diff] [blame] | 53 | - download http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz |
| 54 | - tar xf $DL_DIR/bc-1.06.tar.gz |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 55 | - (cd bc-1.06 && CC="ccache gcc" ./configure --quiet && $make) |
Jerome Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 56 | - export PATH=${HOME}/bc-1.06/bc:$PATH |
| 57 | # Tcl/Expect |
Jerome Forissier | e4c7a6a | 2016-01-25 14:50:55 +0100 | [diff] [blame] | 58 | - download http://prdownloads.sourceforge.net/tcl/tcl8.6.4-src.tar.gz |
| 59 | - tar xf $DL_DIR/tcl8.6.4-src.tar.gz |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 60 | - (cd tcl8.6.4/unix && ./configure --quiet --prefix=${HOME}/inst CC="ccache gcc" && $make install) |
Jerome Forissier | e4c7a6a | 2016-01-25 14:50:55 +0100 | [diff] [blame] | 61 | - _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 Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 63 | - (cd expect5.45 && ./configure --quiet --with-tcl=${HOME}/inst/lib --prefix=${HOME}/inst CC="ccache gcc" && $make expect && $make install) |
Jerome Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 64 | - 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 Wiklander | 517d41f | 2016-02-29 15:02:13 +0100 | [diff] [blame^] | 76 | - git fetch https://github.com/OP-TEE/optee_os --tags |
Jerome Forissier | 6851079 | 2015-11-06 16:55:57 +0100 | [diff] [blame] | 77 | - unset CC |
Jerome Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 78 | |
Pascal Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 79 | # Several compilation options are checked |
| 80 | script: |
Pascal Brand | 1b10abf | 2014-10-20 13:24:54 +0200 | [diff] [blame] | 81 | # Run checkpatch.pl |
Pascal Brand | eae8921 | 2014-12-01 08:46:09 +0100 | [diff] [blame] | 82 | - git format-patch -1 --stdout | $DST_KERNEL/scripts/checkpatch.pl --ignore FILE_PATH_CHANGES --ignore GERRIT_CHANGE_ID --no-tree - |
Pascal Brand | 1b10abf | 2014-10-20 13:24:54 +0200 | [diff] [blame] | 83 | |
Pascal Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 84 | # Orly2 |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 85 | - $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 Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 88 | |
| 89 | # Cannes |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 90 | - $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 Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 93 | |
| 94 | # FVP |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 95 | - $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 Wiklander | c7c09e2 | 2015-04-29 09:32:34 +0200 | [diff] [blame] | 101 | |
| 102 | # Juno |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 103 | - $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 Brand | 260fa3f | 2014-10-08 08:18:53 +0200 | [diff] [blame] | 109 | |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 110 | # 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 |
sunny | d284483 | 2015-01-13 09:42:30 +0800 | [diff] [blame] | 129 | |
Jens Wiklander | 422e54f | 2016-01-13 14:38:09 +0100 | [diff] [blame] | 130 | # QEMU-ARMv8A |
| 131 | - $make PLATFORM=vexpress-qemu_armv8a CFG_ARM64_core=y |
| 132 | |
sunny | d284483 | 2015-01-13 09:42:30 +0800 | [diff] [blame] | 133 | # SUNXI(Allwinner A80) |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 134 | - $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=4 DEBUG=1 |
| 135 | - $make PLATFORM=sunxi CFG_TEE_CORE_LOG_LEVEL=0 |
Jerome Forissier | d70e78c | 2015-04-21 15:42:36 +0200 | [diff] [blame] | 136 | |
| 137 | # HiKey board (HiSilicon Kirin 620) |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 138 | - $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 Kung | 44bd24c | 2015-04-08 15:47:09 +0800 | [diff] [blame] | 141 | |
| 142 | # Mediatek mt8173 EVB |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 143 | - $make PLATFORM=mediatek-mt8173 CFG_ARM64_core=y |
Harinarayan Bhatta | 9b5060c | 2015-09-07 13:13:32 +0530 | [diff] [blame] | 144 | |
Peng Fan | 8c4a5a9 | 2015-10-16 15:17:59 +0800 | [diff] [blame] | 145 | # i.MX6UL 14X14 EVK |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 146 | - $make PLATFORM=imx-mx6ulevk |
Peng Fan | 8c4a5a9 | 2015-10-16 15:17:59 +0800 | [diff] [blame] | 147 | |
Harinarayan Bhatta | 9b5060c | 2015-09-07 13:13:32 +0530 | [diff] [blame] | 148 | # Texas Instruments dra7xx |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 149 | - $make PLATFORM=ti-dra7xx |
Jerome Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 150 | |
Sumit Garg | 8527813 | 2015-10-12 13:49:10 -0400 | [diff] [blame] | 151 | # FSL ls1021a |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 152 | - $make PLATFORM=ls-ls1021atwr |
| 153 | - $make PLATFORM=ls-ls1021aqds |
Sumit Garg | 8527813 | 2015-10-12 13:49:10 -0400 | [diff] [blame] | 154 | |
Jerome Forissier | fcb0c8c | 2015-09-01 13:46:26 +0200 | [diff] [blame] | 155 | # Run regression tests (xtest in QEMU) |
Jerome Forissier | 59e4305 | 2016-02-05 14:52:00 +0100 | [diff] [blame] | 156 | - (cd ${HOME}/optee_repo/build && $make check CROSS_COMPILE="ccache arm-linux-gnueabihf-" AARCH32_CROSS_COMPILE=arm-linux-gnueabihf- DUMP_LOGS_ON_ERROR=1) |