diff options
author | Edward Hervey <edward@collabora.com> | 2013-09-25 17:56:13 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2013-09-25 17:56:13 +0200 |
commit | eb3387771deb1bd3f23cee179bbffa488b5c8758 (patch) | |
tree | f170d46fa85d6f0d937952b99bcd3c047a99aa26 | |
parent | 48e3a14353a8c6b9dfc2ca8ec4fe043d51b2562d (diff) |
Fix output directories and clean up after build
-rwxr-xr-x | ci-build.sh | 62 |
1 files changed, 45 insertions, 17 deletions
diff --git a/ci-build.sh b/ci-build.sh index 0c644b4..c1818b4 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -74,9 +74,18 @@ else fi echo -mkdir -p $WORKSPACE/prefix/$BUILD_TAG -ln -s -f $WORKSPACE/prefix/$BUILD_TAG $WORKSPACE/prefix/target -INSTALLPREFIX=$WORKSPACE/prefix/target +# Create an output directory for all results +# +# output/ +# $BUILD_TAG/ +# logs/ # Where logs from the various steps are stored +# prefix/ # Install prefix (if flavor:full) +# registry.dat # Llocation of the registry (if flavor full) + +OUTPUTDIR=$WORKSPACE/output/$BUILD_TAG + +LOGDIR=$OUTPUTDIR/logs +mkdir -p $LOGDIR echo echo "======================================================" @@ -87,18 +96,16 @@ echo echo "Modules scheduled to be checked (make check):" echo " $CHECK_MODULES" echo -echo "======================================================" -echo -echo "Grabbing Environment variables" -echo - -env > $INSTALLPREFIX/env.log 2>&1 if test "x$FLAVOR" == "xfull"; then echo "Modules scheduled to be checked for leaks (make check-valgrind):" echo " $VALGRIND_MODULES" echo + # prefix directory + INSTALLPREFIX=$OUTPUTDIR/prefix + mkdir -p $INSTALLPREFIX + # setup the various env variables export PATH="$INSTALLPREFIX/bin":$PATH export LD_LIBRARY_PATH="$INSTALLPREFIX/lib":$LD_LIBRARY_PATH @@ -107,8 +114,17 @@ if test "x$FLAVOR" == "xfull"; then export PKG_CONFIG_PATH="$INSTALLPREFIX/lib/pkgconfig/":$PKG_CONFIG_PATH export GST_REGISTRY="$INSTALLPREFIX/gstreamer-registry.dat" fi + +echo "======================================================" +echo +echo "Grabbing Environment variables => output/$BUILD_TAG/env.log" echo +env > $LOGDIR/env.log 2>&1 + +echo + +# build the specified module build() { if test -d $WORKSPACE/$1; then @@ -122,7 +138,7 @@ build() if test -e autoregen.sh then echo "+ $1: autoregen.sh" - logname=$INSTALLPREFIX/$1-autoregen.log + logname=$LOGDIR/$1-autoregen.log ./autoregen.sh > $logname 2>&1 if test $? -ne 0 then @@ -132,7 +148,7 @@ build() fi else echo "+ $1: autogen.sh" - logname=$INSTALLPREFIX/$1-autogen.log + logname=$LOGDIR/$1-autogen.log # Fast variant => no instrospection, no docs # Full variant => introspection and docs case "$FLAVOR" in @@ -161,7 +177,7 @@ build() echo "+ $1 : make" - logname=$INSTALLPREFIX/$1-make.log + logname=$LOGDIR/$1-make.log make > $logname 2>&1 if test $? -ne 0 then @@ -172,7 +188,7 @@ build() if test "x$FLAVOR" == "xfull"; then echo "+ $1 : make install" - logname=$INSTALLPREFIX/$1-make-install.log + logname=$LOGDIR/$1-make-install.log make install > $logname 2>&1 if test $? -ne 0 then @@ -193,7 +209,7 @@ make_check() cd $WORKSPACE/$1 echo "+ $1 : make check" - logname=$INSTALLPREFIX/$1-make-check.log + logname=$LOGDIR/$1-make-check.log make check > $logname 2>&1 if test $? -ne 0 @@ -205,7 +221,7 @@ make_check() if test "x$FLAVOR" == "xfull"; then echo "+ $1 : make distcheck" - logname=$INSTALLPREFIX/$1-make-distcheck.log + logname=$LOGDIR/$1-make-distcheck.log make distcheck > $logname 2>&1 if test $? -ne 0 @@ -224,7 +240,7 @@ valgrind() cd $WORKSPACE/$1 echo "+ $1 : make check-valgrind" - logname=$INSTALLPREFIX/$1-make-check-valgrind.log + logname=$LOGDIR/$1-make-check-valgrind.log make check-valgrind > $logname 2>&1 if test $? -ne 0 @@ -252,13 +268,25 @@ beach() echo echo "======================================================" - echo echo "Cleaning up build directories" # ccache will have cached all non-changed compilation, we can safely make clean repo forall -c make clean > /dev/null 2>&1 + if test "x$FLAVOR" == "xfull"; then + echo + echo "======================================================" + echo + echo "Compressing/storing output prefix" + cd $OUTPUTDIR + tar cvJf $BUILD_TAG.tar.xz prefix > /dev/null + ls -lah $BUILD_TAG.tar.xz + rm -Rf prefix + echo + echo "======================================================" + fi + echo "Update done" exit } |