forked from OP-TEE/optee_os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (29 loc) · 1.45 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: c
notifications:
- email: true
git:
depth: false
before_install:
- sudo apt-get -y install codespell
before_script:
- export OPTEE_OS=$PWD
# Download checkpatch.pl
- 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
- export PATH=$KERNEL/scripts/:$PATH
- cd $OPTEE_OS
- source scripts/checkpatch_inc.sh
# Install pycodestyle
- pip install --upgrade --user pycodestyle
script:
# 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