diff --git a/.travis.yml b/.travis.yml index f3314a5..54d9974 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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} diff --git a/README.md b/README.md index 00edcb0..066ffc3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/scripts/build-against-kernel.sh b/scripts/build-against-kernel.sh new file mode 100755 index 0000000..6445484 --- /dev/null +++ b/scripts/build-against-kernel.sh @@ -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}" +)