-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (29 loc) · 1.36 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
language: c
compiler: gcc
env:
- KERNEL="linux-4.5"
- KERNEL="linux-3.17"
- KERNEL="linux-3.7"
- KERNEL="linux-2.6.38"
- KERNEL="linux-2.6.36"
- KERNEL="linux-2.6.30"
- KERNEL="linux-4.6" # Conditional 4.5
- KERNEL="linux-4.1" # Conditional 3.17
- KERNEL="linux-3.19" # Conditional 3.17
- KERNEL="linux-3.18" # Conditional 3.17
- KERNEL="linux-3.3" # Conditional 2.6.38
- KERNEL="linux-2.6.35" # Conditional 2.6.30
addons:
apt:
packages:
- bc
install:
- export KERNELDIR=${HOME}/kernel && echo ${KERNELDIR}
- export SERIES=$(case ${KERNEL} in linux-4.*) echo v4.x;; linux-3.*) echo v3.x;; linux-2.6.*) echo v2.6;; esac) && echo ${SERIES}
- export URL=https://cdn.kernel.org/pub/linux/kernel/${SERIES}/${KERNEL}.tar.xz && echo ${URL}
- mkdir ${KERNELDIR}
- curl ${URL} | tar xJC ${KERNELDIR}
- if [[ ! -f ${KERNELDIR}/${KERNEL}/include/linux/compiler-gcc5.h ]]; then echo '#include <linux/compiler-gcc4.h>' > ${KERNELDIR}/${KERNEL}/include/linux/compiler-gcc5.h; fi
- make -C ${KERNELDIR}/${KERNEL} defconfig prepare modules_prepare
script:
- ./autogen.sh --with-kernel=${KERNELDIR}/${KERNEL} && make EXTRA_CFLAGS="-Werror -Wno-type-limits -Wno-unused-function -isystem ${KERNELDIR}/${KERNEL}/arch/x86/include -isystem ${KERNELDIR}/${KERNEL}/arch/x86/include/uapi -isystem ${KERNELDIR}/${KERNEL}/include/linux"