summaryrefslogtreecommitdiffstats
path: root/.build.sh
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2015-11-24 00:26:51 +1030
committerJoel Stanley <joel@jms.id.au>2015-11-24 00:44:59 +1030
commita3544a1008fea4fb89185f657b5ed39ed2725137 (patch)
treec161102c07157cd2d595c37b527b5fc41ae7fc68 /.build.sh
parentf0d4635fa2b417bd0eef3f19ae98e56ec615e703 (diff)
downloadphosphor-host-ipmid-a3544a1008fea4fb89185f657b5ed39ed2725137.zip
phosphor-host-ipmid-a3544a1008fea4fb89185f657b5ed39ed2725137.tar.gz
travis: Add Travis CI building
Builds on Ubuntu 15.10 under docker. Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to '.build.sh')
-rwxr-xr-x.build.sh20
1 files changed, 20 insertions, 0 deletions
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
OpenPOWER on IntegriCloud