From a13878907b806395129e7358a34a148551a3cfb7 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Fri, 22 Feb 2019 17:01:06 +0100 Subject: [PATCH] ci: travis: keep only code rule checks The Travis build keeps timing out apparently due to a reduced download speed compared with some time ago. It is not rare for the build to fail in the initial "repo sync" phase with the error message: No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself. Allowing more verbosity from "repo sync" could possibly avoid this particular error, but then the second issue is that total build time reaches 50 minutes very frequently which is the limit for Open Source projects. Since we have IBART to run xtest on HiKey, we can loose the test on QEMU. Therefore, this commit keeps only the code rule checks in the Travis script (checkpatch.pl and pycodestyle). Signed-off-by: Jerome Forissier Reviewed-by: Joakim Bech --- .travis.yml | 82 +++++------------------------------------------------ 1 file changed, 7 insertions(+), 75 deletions(-) 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