diff options
author | Joel Stanley <joel@jms.id.au> | 2017-07-17 16:26:54 +0930 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2017-07-17 16:26:54 +0930 |
commit | 5aa6dd48db50d93188f6f5fe2966f802ba85d5b1 (patch) | |
tree | d890f0244493a8450b3229058fb1cb91d8687ef9 | |
parent | 3e50b37ef1b75fac645d09a1de5511cc93d8d50b (diff) | |
download | pdbg-5aa6dd48db50d93188f6f5fe2966f802ba85d5b1.tar.gz pdbg-5aa6dd48db50d93188f6f5fe2966f802ba85d5b1.zip |
build: Update to do both an in and out of tree build
The OpenBMC Yocto build process uses an out of tree build model. Now
that pdbg supports that, add it to the Travis build so it does not
regress.
This also updates to an Ubuntu 17.04 container.
Signed-off-by: Joel Stanley <joel@jms.id.au>
-rwxr-xr-x | .build.sh | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -1,15 +1,20 @@ #!/bin/bash +set -e + CONTAINER=pdbg-build Dockerfile=$(cat << EOF -FROM ubuntu:15.10 +FROM ubuntu:17.04 RUN apt-get update && apt-get install --no-install-recommends -yy \ make \ gcc-arm-linux-gnueabi \ libc-dev-armel-cross \ autoconf \ - automake + automake \ + libtool \ + git \ + device-tree-compiler RUN groupadd -g ${GROUPS} ${USER} && useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER} USER ${USER} ENV HOME ${HOME} @@ -17,18 +22,22 @@ RUN /bin/bash EOF ) -docker pull ubuntu:15.10 +docker pull ubuntu:17.04 docker build -t ${CONTAINER} - <<< "${Dockerfile}" +RUN="docker run --rm=true --user=${USER} -w ${PWD} -v ${HOME}:${HOME} -t ${CONTAINER}" -docker run --rm=true --user="${USER}" \ - -w "${PWD}" -v "${HOME}":"${HOME}" -t ${CONTAINER} \ - ./bootstrap.sh +${RUN} ./bootstrap.sh -docker run --rm=true --user="${USER}" \ - -w "${PWD}" -v "${HOME}":"${HOME}" -t ${CONTAINER} \ - ./configure --host=arm-linux-gnueabi +# Out-of-tree build +# TODO: clean up when the build fails +SRCDIR=$PWD +TEMPDIR=`mktemp -d ${HOME}/pdbgobjXXXXXX` +RUN_TMP="docker run --rm=true --user=${USER} -w ${TEMPDIR} -v ${HOME}:${HOME} -t ${CONTAINER}" +${RUN_TMP} ${SRCDIR}/configure --host=arm-linux-gnueabi +${RUN_TMP} make +rm -rf ${TEMPDIR} -docker run --rm=true --user="${USER}" \ - -w "${PWD}" -v "${HOME}":"${HOME}" -t ${CONTAINER} \ - make +# In-tree build +${RUN} ./configure --host=arm-linux-gnueabi +${RUN} make |