forked from OP-TEE/optee_os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (33 loc) · 1.75 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
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
before_script:
- export OPTEE_OS=$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_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