mirror of
https://github.com/choff/anbox-modules.git
synced 2025-01-18 13:05:44 +08:00
scripts: add travis build support
This commit is contained in:
parent
f3d77d660c
commit
f55cccbe65
9
.travis.yml
Normal file
9
.travis.yml
Normal file
@ -0,0 +1,9 @@
|
||||
language: cpp
|
||||
os: linux
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- scripts/build-with-docker.sh
|
3
scripts/build-with-docker.sh
Executable file
3
scripts/build-with-docker.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
docker pull ubuntu:16.04
|
||||
docker run -i -t -v $PWD:/anbox ubuntu:16.04 /anbox/scripts/clean-build.sh
|
29
scripts/clean-build.sh
Executable file
29
scripts/clean-build.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
apt-get update -qq
|
||||
apt-get install -qq -y \
|
||||
build-essential \
|
||||
debhelper \
|
||||
git
|
||||
|
||||
apt-get clean
|
||||
|
||||
cd /anbox
|
||||
|
||||
cleanup() {
|
||||
# In cases where anbox comes directly from a checked out Android
|
||||
# build environment we miss some symlinks which are present on
|
||||
# the host and don't have a valid git repository in that case.
|
||||
if [ -d .git ] ; then
|
||||
git clean -fdx .
|
||||
git reset --hard
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup
|
||||
|
||||
apt-get install -y build-essential curl devscripts gdebi-core dkms dh-systemd
|
||||
apt-get install -y $(gdebi --quiet --apt-line ./debian/control)
|
||||
debuild -us -uc
|
Loading…
Reference in New Issue
Block a user