[PATCH phosphor-host-ipmid] travis: Add Travis CI building

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Nov 24 01:20:24 AEDT 2015


From: Joel Stanley <joel at jms.id.au>

Builds on Ubuntu 15.10 under docker.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 .build.sh   | 20 ++++++++++++++++++++
 .travis.yml |  9 +++++++++
 2 files changed, 29 insertions(+)
 create mode 100755 .build.sh
 create mode 100644 .travis.yml

diff --git a/.build.sh b/.build.sh
new file mode 100755
index 0000000..97e97bb
--- /dev/null
+++ b/.build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+Dockerfile=$(cat << EOF
+FROM ubuntu:15.10
+RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get upgrade -yy
+RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -yy make g++ gcc libsystemd-dev libc6-dev pkg-config
+RUN groupadd -g ${GROUPS} ${USER} && useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
+USER ${USER}
+ENV HOME ${HOME}
+RUN /bin/bash
+EOF
+)
+
+docker pull ubuntu:15.10
+docker build -t temp - <<< "${Dockerfile}"
+
+gcc --version
+
+docker run --cap-add=sys_admin --net=host --rm=true --user="${USER}" \
+ -w "${PWD}" -v "${HOME}":"${HOME}" -t temp make
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..d8d6c1d
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,9 @@
+language: c
+
+sudo: required
+
+services:
+    - docker
+
+script:
+    - ./.build.sh
-- 
2.6.3




More information about the openbmc mailing list