diff --git a/.travis.yml b/.travis.yml index d553ed76e1f..1a2faef0d99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,76 +1,27 @@ -# 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_script: - - df -h - # Store the home repository - - export MYHOME=$PWD + - export OPTEE_OS=$PWD # Download checkpatch.pl - - export DST_KERNEL=$PWD/linux && mkdir -p $DST_KERNEL/scripts && cd $DST_KERNEL/scripts + - export KERNEL=$HOME/linux && mkdir -p $KERNEL/scripts && cd $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" + - export PATH=$KERNEL/scripts/:$PATH + - cd $OPTEE_OS + - source scripts/checkpatch_inc.sh - # 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 - # Expect - - _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 --prefix=$HOME/inst --exec-prefix=$HOME/inst CC="ccache gcc" && make && $make install) && rm -rf expect5.45 - # Create a wrapper script, so that expect finds its shared library, without setting LD_LIBRARY_PATH globally (buildroot doesn't like it) - - mv $HOME/inst/bin/expect $HOME/inst/bin/expect.bin && printf '#!/bin/bash\nexport LD_LIBRARY_PATH=$HOME/inst/lib/expect5.45\n$HOME/inst/bin/expect.bin $*' >$HOME/inst/bin/expect && chmod +x $HOME/inst/bin/expect - - 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 + # Install pycodestyle - pip install --upgrade --user pycodestyle - # Clone repositories for the QEMU test environment - - mkdir -p $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