add travis to test module build

Signed-off-by: Shengjing Zhu <i@zhsj.me>
This commit is contained in:
Shengjing Zhu 2018-06-09 15:35:18 +08:00
parent c807ff7648
commit ad88288e8a
3 changed files with 67 additions and 6 deletions

View File

@ -1,9 +1,36 @@
language: cpp
language: c
os: linux
sudo: required
sudo: false
services:
- docker
addons:
apt:
packages:
- bison
- flex
- libelf-dev
- dpkg-dev
- debhelper
- dkms
- fakeroot
env:
- KVER=4.4
- KVER=4.8
- KVER=4.9
- KVER=4.13
- KVER=4.14
- KVER=4.15
- KVER=4.16
- KVER=4.17
- KVER=master
matrix:
allow_failures:
- env: KVER=master
include:
- script:
- dpkg-buildpackage -us -uc
env: KVER="Debian Package Building"
script:
- scripts/build-with-docker.sh
- ./scripts/build-against-kernel.sh ${KVER}

View File

@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/anbox/anbox-modules.svg?branch=master)](https://travis-ci.org/anbox/anbox)
[![Build Status](https://travis-ci.org/anbox/anbox-modules.svg?branch=master)](https://travis-ci.org/anbox/anbox-modules)
# Anbox Kernel Modules

34
scripts/build-against-kernel.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
set -ex
KVER=${1:-master}
src_dir="../linux-${KVER}"
if [ "${KVER}" = "master" ]; then
archive=master.tar.gz
else
archive="v${KVER}.tar.gz"
fi
if [ ! -d "${src_dir}" ]; then
wget -O - "https://github.com/torvalds/linux/archive/${archive}" | tar -C ../ -xz
fi
(
cd "$src_dir" || exit 1
make allmodconfig
make prepare
make scripts
)
(
cd ashmem || exit 1
make KERNEL_SRC="../${src_dir}"
)
(
cd binder || exit 1
make KERNEL_SRC="../${src_dir}"
)