forked from OP-TEE/optee_client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
44 lines (36 loc) · 1.84 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
38
39
40
41
42
43
44
# One may have a look at http://docs.travis-ci.com/user/installing-dependencies/
language: c
notifications:
- email: true
git:
depth: false
before_script:
- export OPTEE_CLIENT=$PWD
# 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_CLIENT
- source scripts/checkpatch_inc.sh
# Install the cross-compiler
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
- arm-linux-gnueabihf-gcc --version
# Travis does 'export CC=gcc'. Unset CC so that ./flags.mk properly
# defines the cross-compiler to the default value: $(CROSS_COMPILE)gcc.
- unset CC
# Several compilation options are checked
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
- make clean all
- CFG_TEE_CLIENT_LOG_LEVEL=0 make clean all
- CFG_TEE_CLIENT_LOG_LEVEL=5 make clean all