| language: c |
| |
| # Ubuntu Focal (20.04) |
| # Please check the path to the codespell dictionary below if you change this |
| dist: focal |
| |
| notifications: |
| - email: true |
| |
| git: |
| depth: false |
| |
| before_install: |
| - sudo apt-get -y install codespell |
| - sudo mkdir -p /usr/share/codespell && sudo ln -s /usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt /usr/share/codespell/dictionary.txt |
| - sudo apt-get -y install python3-pip |
| - sudo apt-get -y install python3-setuptools |
| - sudo apt-get -y install python3-wheel |
| - sudo apt-get -y install python3-crypto |
| - sudo apt-get -y install python3-pyelftools |
| - sudo apt-get -y install python3-serial |
| - sudo apt-get -y install python3-wand |
| - 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 |
| - tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz |
| - export PATH=${PWD}/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin:${PATH} |
| - arm-linux-gnueabihf-gcc --version |
| |
| before_script: |
| - export OPTEE_OS=$PWD |
| |
| # Do NOT upgrade pip. It will cause the pycryptodome install to fail! |
| #- pip3 install --upgrade pip |
| |
| # apt-get is unable to find pycryptodome in Ubuntu 16 (xenial) |
| # but using pip works |
| - pip3 install --upgrade --user pycryptodome |
| |
| # Download checkpatch.pl |
| - export KERNEL=$HOME/linux && mkdir -p $KERNEL/scripts && cd $KERNEL/scripts |
| - wget https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/plain/scripts/checkpatch.pl && chmod a+x checkpatch.pl |
| - wget https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/plain/scripts/spelling.txt |
| - echo "invalid.struct.name" >const_structs.checkpatch |
| - export PATH=$KERNEL/scripts/:$PATH |
| - cd $OPTEE_OS |
| - source scripts/checkpatch_inc.sh |
| |
| # Install pycodestyle |
| - pip3 install --upgrade --user pycodestyle |
| |
| script: |
| - if [ "${COVERITY_SCAN_BRANCH}" == 1 ]; then |
| echo "Skip script for Coverity"; |
| travis_terminate 0; |
| fi |
| |
| # Run checkpatch.pl on: |
| # - the tip of the branch if we're not in a pull request |
| # - each commit in the development branch that's not in the target branch otherwise |
| - 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 |
| # If we have a pull request with more than 1 commit, also check the squashed commits |
| # Useful to check if fix-up commits do indeed solve previous checkpatch errors |
| - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then if [ "$(git rev-list --count HEAD^1..HEAD^2)" -gt 1 ]; then checkdiff $(git rev-parse HEAD^1) $(git rev-parse HEAD^2); fi; fi |
| |
| # Check Python style |
| - pycodestyle scripts/*.py core/arch/arm/plat-stm32mp1/scripts/stm32image.py |
| |
| env: |
| global: |
| # COVERITY_SCAN_TOKEN |
| secure: "k30FG3hL6dQywtvMeEjSM0FQ7A0r+AQriUkGSFv7bmwD3EX2H17tJsfZt/h3dj+Pj6lQPdhVg3YO6O6pksJLqBLyz86bN15JEik0e1zftZplzK00oT89eoQr+qgqyrbs6CZBRvS98EAneCNbvgJto9sIPJs0SGu0u31Pr06bTAg=" |
| |
| addons: |
| coverity_scan: |
| project: |
| name: "OP-TEE/optee_os" |
| description: "Build submitted via Travis CI" |
| notification_email: jens.wiklander@linaro.org |
| build_command_prepend: "cov-configure --comptype gcc --compiler arm-linux-gnueabihf-gcc --template" |
| build_command: "make" |
| branch_pattern: coverity_scan |