Merge pull request #2 from zhsj/travis

add travis to test module build
This commit is contained in:
Simon Fels 2018-06-12 08:44:22 +02:00 committed by GitHub
commit 5635fc41a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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}"
)