[Iofsl-commits] branch, master, updated. merge-start-356-g85bf2c4
mysql vizuser
noreply at mcs.anl.gov
Fri Sep 6 18:14:37 CDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 85bf2c4b12aa7c9cdab01918cac067ef9e9dd08d (commit)
from 49bc7534bc4195ce4f9d022caf2b048224ef1cd2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 85bf2c4b12aa7c9cdab01918cac067ef9e9dd08d
Author: Dries Kimpe <dkimpe at mcs.anl.gov>
Date: Fri Sep 6 11:11:38 2013 -0500
Working on nightly builds
-----------------------------------------------------------------------
Summary of changes:
autobuild/build-jenkins.sh | 22 ++++++
autobuild/build-local.sh | 17 +++++
autobuild/build.sh | 164 +++++++++++++++++++++++++++++++++++++++++--
autobuild/files.fetch | 8 ++
autobuild/functions.sh | 65 +++++++++++++++++
autobuild/generate-daily.sh | 41 +++++++++++
autobuild/install-bmi.sh | 18 +++++
autobuild/install-boost.sh | 21 ++++++
autobuild/install-openpa.sh | 17 +++++
9 files changed, 366 insertions(+), 7 deletions(-)
create mode 100755 autobuild/build-jenkins.sh
create mode 100755 autobuild/build-local.sh
create mode 100644 autobuild/files.fetch
create mode 100755 autobuild/functions.sh
create mode 100755 autobuild/generate-daily.sh
create mode 100755 autobuild/install-bmi.sh
create mode 100755 autobuild/install-boost.sh
create mode 100755 autobuild/install-openpa.sh
Diff of changes:
diff --git a/autobuild/build-jenkins.sh b/autobuild/build-jenkins.sh
new file mode 100755
index 0000000..6cabfb2
--- /dev/null
+++ b/autobuild/build-jenkins.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if test -z "${WORKSPACE}" -o -z "${BUILD_ID}" ; then
+ echo "This script can only be ran under jenkins"
+ exit 1
+fi
+
+# Dump some information
+ls ${WORKSPACE}
+
+echo "======================================================================="
+echo "= Build ${BUILD_NUMBER} ${BUILD_ID}"
+echo "= on ${NODE_NAME} [${NODE_LABELS}]"
+echo "======================================================================="
+
+
+BUILD="${WORKSPACE}/build"
+mkdir -p "${BUILD}"
+
+"${WORKSPACE}/autobuild/build-local.sh" "${WORKSPACE}" "${BUILD}"
+
+
diff --git a/autobuild/build-local.sh b/autobuild/build-local.sh
new file mode 100755
index 0000000..92b5e99
--- /dev/null
+++ b/autobuild/build-local.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# This script can be used to trigger the nightly build scripts locally. No
+# guarantees!
+
+if test -z "$1" -o -z "$2" ; then
+ echo "Need two arguments: path to source tree and path to build dir"
+ exit 1
+fi
+
+export SRCDIR="$1"
+export WORKSPACE="$2"
+
+echo "IOFSL source in $SRCDIR"
+echo "Building in $WORKSPACE"
+
+exec "${SRCDIR}/autobuild/build.sh"
+
diff --git a/autobuild/build.sh b/autobuild/build.sh
index ac1643d..3bb14be 100755
--- a/autobuild/build.sh
+++ b/autobuild/build.sh
@@ -5,19 +5,169 @@ ls ${WORKSPACE}
AUTOBUILDDIR=${WORKSPACE}/autobuild
-# Dump some information
-echo "======================================================================="
-echo "= Build ${BUILD_NUMBER} ${BUILD_ID}"
-echo "= on ${NODE_NAME} [${NODE_LABELS}]"
-echo "======================================================================="
+# =============== Validate environment ===================
+
+if test -z "${SRCDIR}"; then
+ echo "This script requires SRCDIR to be defined"
+ echo "(and pointing to the IOFSL source tree)"
+ exit 1
+fi
+
+# Make sure srcdir is absolute
+tmp=$(echo ${SRCDIR} | cut -c1-2)
+if test "A$tmp" != "A/" ; then
+ # make srcdir absolute
+ SRCDIR=$(cd $tmp && pwd)
+fi
+
+if ! test -r "${SRCDIR}/iofsl.pc.in" ; then
+ echo "Doesn't look like ${SRCDIR} contains an IOFSL source tree"
+ exit 1
+fi
+
+
+if test -z "${WORKSPACE}" -a -d "${WORKSPACE}"; then
+ echo "This scripts requires WORKSPACE to be defined (and exist)"
+ exit 1
+fi
+
+# ====================================================================
+# ========== Settings ================================================
+# ====================================================================
+
+# where we'll fetch dependencies and other files needed for the build
+FETCHDIR="${WORKSPACE}/fetch-files"
+
+# Where we'll cache build info (fetched files, ccache, etc.)
+CACHEDIR="/tmp/iofsl-cache"
+
+# Dir containing build scripts
+AUTOBUILDDIR=${SRCDIR}/autobuild
+
+# ====================================================================
+# ========= Dump some settings =======================================
+# ====================================================================
+
+echo "===================================================================="
+echo "===== INFO ========================================================="
+echo "===================================================================="
+
+echo "IOFSL Source tree : ${SRCDIR}"
+echo "Workspace : ${WORKSPACE}"
+echo "Cachedir : ${CACHEDIR}"
+
+# ====================================================================
+# Load rest of build function
+# ====================================================================
+
+if ! test -r "${AUTOBUILDDIR}/functions.sh" ; then
+ echo "Missing ${AUTOBUILDDIR}/functions.sh!"
+ exit 1
+fi
+
+source "${AUTOBUILDDIR}/functions.sh" || exit 2
+
+
+# ===================================================================
+# ==== Internal variables | DO NOT MODIFY ===========================
+# ===================================================================
+
+# list of files we will fetch
+FETCH="${AUTOBUILDDIR}/files.fetch"
+
+# Where we'll install dependencies
+DEPINSTALL="${WORKSPACE}/install"
+
+# Where we'll build IOFSL
+BUILDDIR="${WORKSPACE}/build"
+
+
+# ===================================================================
+# ==== Validate internal environment ================================
+# ===================================================================
+
+if ! test -d "${CACHEDIR}" -o ! -O "${CACHEDIR}" -o ! -G "${CACHEDIR}" ; then
+ echo "Invalid cachedir ${CACHEDIR}; Doesn't exist or not owned by build"
+fi
+
echo
echo "======================================================================="
echo "==== STEP 1: Fetch build dependencies ================================="
echo "======================================================================="
+mkdir -p "${FETCHDIR}"
+mkdir -p "${CACHEDIR}"
+
+fetch_deps "${FETCH}" "${FETCHDIR}" "${CACHEDIR}" || exit 1
+
+echo "======================================================================="
+echo "==== STEP 2: Build & install dependencies ============================="
+echo "======================================================================="
+
+DEPBUILDDIR="${WORKSPACE}/depbuild"
+mkdir -p "${DEPBUILDDIR}"
+mkdir -p "${DEPINSTALL}"
+
+echo -n " * Building and installing boost..."
+"${AUTOBUILDDIR}/install-boost.sh" \
+ "${DEPBUILDDIR}" \
+ "${FETCHDIR}/boost.tar.bz2" \
+ "${DEPINSTALL}" \
+ > "${DEPBUILDDIR}/boost-log" \
+ || exit 2
+echo DONE
+
+echo -n " * Building and installing openpa..."
+"${AUTOBUILDDIR}/install-openpa.sh" \
+ "${DEPBUILDDIR}" \
+ "${FETCHDIR}/openpa.tar.gz" \
+ "${DEPINSTALL}" \
+ > "${DEPBUILDDIR}/openpa-log" \
+ || exit 2
+echo DONE
+
+echo -n " * Building and installing BMI..."
+"${AUTOBUILDDIR}/install-bmi.sh" \
+ "${DEPBUILDDIR}" \
+ "${FETCHDIR}/bmi.tar.gz" \
+ "${DEPINSTALL}" \
+ > "${DEPBUILDDIR}/bmi-log" \
+ || exit 2
+echo DONE
+
+echo "======================================================================="
+echo "===== STEP 3: Configure IOFSL ========================================="
+echo "======================================================================="
+
+BUILDDIR="${WORKSPACE}/iofslbuild"
+INSTALLDIR="${WORKSPACE}/iofslinstall"
+
+mkdir -p "${BUILDDIR}"
+
+echo "* Generating buildsystem"
+cd "${SRCDIR}"
+./prepare
+
+echo "* Configuring IOFSL"
+CONFIGOPTS="--prefix=${INSTALLDIR} --with-bmi=${DEPINSTALL}"
+cd "${BUILDDIR}"
+"${SRCDIR}/configure" ${CONFIGOPTS} || exit 3
+
+echo "======================================================================="
+echo "==== STEP 4: Building IOFSL ==========================================="
+echo "======================================================================="
+make -j2 || exit 4
+
+echo "======================================================================="
+echo "==== STEP 5: Install IOFSL ============================================"
+echo "======================================================================="
+make install || exit 5
+
+echo "======================================================================="
+echo "===== STEP 6: Distcheck ==============================================="
+echo "======================================================================="
+make distcheck DISTCHECK_CONFIGURE_FLAGS="${CONFIGOPTS}" || exit 6
-# force failure for now
-exit 1
diff --git a/autobuild/files.fetch b/autobuild/files.fetch
new file mode 100644
index 0000000..ef5110c
--- /dev/null
+++ b/autobuild/files.fetch
@@ -0,0 +1,8 @@
+# Structure of this file:
+# md5sum filename URL
+15cb8c0803064faef0c4ddf5bc5ca279 boost.tar.bz2 .tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.bz2/download
+3ad998bb26ac84ee7de262db94dd7656 openpa.tar.gz https://trac.mcs.anl.gov/projects/openpa/raw-attachment/wiki/Downloads/openpa-1.0.4.tar.gz
+# Version is broken!
+#54d1323d1431311024c01a69913e7b0b bmi.tar.gz http://www.mcs.anl.gov/~dkimpe/bmi-2.8.7-orangefs.tar.gz
+82a8efe604a80c80d18dab76dfc13c38 bmi.tar.gz http://www.mcs.anl.gov/~dkimpe/bmi-2.8.1pre1-2009-10-06-175201.tar.gz
+
diff --git a/autobuild/functions.sh b/autobuild/functions.sh
new file mode 100755
index 0000000..f6147e5
--- /dev/null
+++ b/autobuild/functions.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Helper functions for autobuild
+#
+# Assumes AUTOBUILDDIR is set and valid
+#
+
+function do_error ()
+{
+ echo "Error: $1" >2
+ exit 1
+}
+
+test -n "${AUTOBUILDDIR}" || do_error "Need AUTOBUILDDIR"
+
+
+# Global Settings
+
+# Fetch files described in $1 into dir $2, checking cache in $3
+function fetch_deps () {
+ FETCH="$1"
+ OUTPUTDIR="$2"
+ CACHEDIR="$3"
+ cat "${FETCH}" | grep -v '^#' | while read checksum output url
+ do
+ if test -z "${url}"; then
+ continue
+ fi
+
+ echo -n "${output}: "
+ CACHED="${CACHEDIR}/${output}"
+ OUTPUTNAME="${OUTPUTDIR}/${output}"
+
+ # Check if file is readable, owned by us and regular
+ if test -r "${CACHED}" -a -f "${CACHED}" -a -O "${CACHED}"; then
+ cachesum=$(md5sum "${CACHED}" | cut -f1 -d' ')
+ if test "A${checksum}" = "A${cachesum}" ; then
+ echo -n "(found in cache) "
+ else
+ echo -n "(cached but invalid. Removing) "
+ rm "${CACHED}" || exit 2
+ fi
+ fi
+
+ if ! test -r "${CACHED}"; then
+ echo -n "(fetching) "
+ # file doesn't exist; fetch it
+ rm -f "${CACHED}"
+ wget -q -O "${CACHED}" "${url}" || exit 1
+ fi
+
+
+ # copy into dest
+ cp -f "${CACHED}" "${OUTPUTNAME}" || exit 1
+
+ # verify md5sum
+ cachesum=$(md5sum "${OUTPUTNAME}" | cut -f1 -d' ')
+ if test "A${checksum}" != "A${cachesum}" ; then
+ echo "Incorrect checksum (expecting ${checksum}, got ${cachesum}"
+ echo "Aborting!"
+ exit 2
+ fi
+ echo "OK (${checksum})"
+ done
+}
diff --git a/autobuild/generate-daily.sh b/autobuild/generate-daily.sh
new file mode 100755
index 0000000..c41c894
--- /dev/null
+++ b/autobuild/generate-daily.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+#
+# Generate new daily build if there was a change to the git tree
+#
+#
+
+# location of the checkout out git tree
+GITDIR=/tmp/iofsl-daily
+
+# URL to clone
+GITURL=git://git.mcs.anl.gov/iofsl
+
+# branch to watch
+BRANCH=origin/master
+
+changed=0
+
+if ! test -d "${GITDIR}" ; then
+ git clone ${GITURL} ${GITDIR} || exit 1
+ changed=1
+else
+ cd ${GITDIR}
+ git remote update || exit 1
+ count=$(git rev-list HEAD..${BRANCH} --count)
+ if test 0 -lt "${count}" ; then
+ changed=1
+ fi
+fi
+
+if test "$changed" != "1"; then
+ exit 0
+fi
+
+echo "Need to build daily build"
+
+cd ${GITDIR}
+git pull --rebase
+
+
+
diff --git a/autobuild/install-bmi.sh b/autobuild/install-bmi.sh
new file mode 100755
index 0000000..1e7e563
--- /dev/null
+++ b/autobuild/install-bmi.sh
@@ -0,0 +1,18 @@
+
+#!/bin/bash
+
+echo "Building BMI"
+
+DEPBUILDDIR="${1}/bmi"
+INPUT="$2"
+PREFIX="$3"
+
+echo $*
+
+mkdir -p "${DEPBUILDDIR}"
+cd "${DEPBUILDDIR}"
+tar --strip-components 1 -C "${DEPBUILDDIR}" -xzf "${INPUT}" || exit 1
+
+cd "${DEPBUILDDIR}"
+./configure --prefix="${PREFIX}" && make && make install
+
diff --git a/autobuild/install-boost.sh b/autobuild/install-boost.sh
new file mode 100755
index 0000000..dd94991
--- /dev/null
+++ b/autobuild/install-boost.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+
+echo "Building BOOST"
+
+DEPBUILDDIR="${1}/boost"
+INPUT="$2"
+PREFIX="$3"
+
+LIBS="atomic,chrono,date_time,exception,filesystem,iostreams,program_options,random,regex,system,test,thread,timer,wave"
+
+mkdir -p "${DEPBUILDDIR}"
+
+cd "${DEPBUILDDIR}"
+
+tar --strip-components 1 -C "${DEPBUILDDIR}" -xf "${INPUT}"
+
+cd "${DEPBUILDDIR}"
+./bootstrap.sh --prefix="$PREFIX" --with-libraries="${LIBS}"
+
+./b2 install
diff --git a/autobuild/install-openpa.sh b/autobuild/install-openpa.sh
new file mode 100755
index 0000000..811c95f
--- /dev/null
+++ b/autobuild/install-openpa.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo "Building OpenPA"
+
+DEPBUILDDIR="${1}/openpa"
+INPUT="$2"
+PREFIX="$3"
+
+echo $*
+
+mkdir -p "${DEPBUILDDIR}"
+cd "${DEPBUILDDIR}"
+tar --strip-components 1 -C "${DEPBUILDDIR}" -xzf "${INPUT}" || exit 1
+
+cd "${DEPBUILDDIR}"
+./configure --prefix="${PREFIX}" && make && make install
+
hooks/post-receive
--
More information about the Iofsl-commits
mailing list