forked from msm8916-mainline/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.sh
executable file
·31 lines (27 loc) · 858 Bytes
/
.drone.sh
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
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
set -eux
case "$1" in
build)
export ARCH="$2"
export CROSS_COMPILE="$3-"
nproc && grep Mem /proc/meminfo && df -hT .
apk add build-base bison findutils flex gmp-dev mpc1-dev mpfr-dev openssl-dev perl "gcc-$3"
# Workaround problem with faccessat2() on Drone CI
wget https://gist.githubusercontent.com/TravMurav/36c83efbc188115aa9b0fc7f4afba63e/raw/faccessat.c -P /opt
gcc -O2 -shared -o /opt/faccessat.so /opt/faccessat.c
export LD_PRELOAD=/opt/faccessat.so
make msm8916_defconfig
make KCFLAGS="-Wall -Werror" -j$(nproc)
;;
check)
apk add git perl
git format-patch origin/$DRONE_TARGET_BRANCH
scripts/checkpatch.pl --strict --color=always *.patch || :
! scripts/checkpatch.pl --strict --color=always --terse --show-types *.patch \
| grep -Ff .drone-checkpatch.txt
;;
*)
exit 1
;;
esac