#!/bin/bash # process command line arguments. By default build all configurations # (aka. nightly build) # case "$1" in "") # default: build all configurations configs="$configs standard" configs="$configs develop" configs="$configs tar" # configs="$configs git" configs="$configs libxcb" configs="$configs rational" configs="$configs libapl" configs="$configs parallel_bench" configs="$configs erlang" configs="$configs python" ;; "clean") # clean up everything configs="" ;; "nightly") # only refresh /var/www/html/nightly_build_results.html configs="" ;; *) configs="$*" esac echo "configs requested: $configs" # this script builds different GNU APL variants and tests some of them # First of all, figure and normalize some directory names: # # START_dir: # the current directory from which this script was called. # Used to cd back when all is done. In a nightly build, START_dir is # probably /etc/cron.daily. # # TOP_BUILD_dir: # the top-level directory that contains this script. The different # configurations produced by this script are stored in corresponding # subdirectories, e.g. in builddir_standard for configuration "standard" # # Example: /home/username/apl-1.9/build # # TOP_LOG_dir: # the directory where top-level logfiles produced by the builds are stored. # Normally TOP_LOG_dir is the same as TOP_BUILD_dir # # ROOT_dir: # the GNU APL top-level directory. This is the one and only # directory than contains the ./configure script for GNU APL. # Normally # TOP_BUILD_dir is $ROOT_dir/build. # # Example: /home/username/apl-1.9 # # APL_VERSION: # the current version (including the 'apl-' prefix). # # Example: apl-1.9 # # VSRC_dir: # this is (despite of its name 'src' the destination directory for a single # configuration. For example: the VSRC_dir for configuration "standard" is: # $TOP_BUILD_dir/build/builddir_standard/src # # Example: /home/username/apl-1.9/src # START_dir=$(pwd) # e.g. /etc/cron.daily cd $(dirname $0) # e.g. /root/apl-1.9 TOP_BUILD_dir=$(pwd) SVN_VERSION=$(svnversion) # NOTE: -j8 fails with out of memory on small hosts (like those # used for nightly builds). By setting J8="" we avoid that J8="-j8" J8="" # TOP_LOG_dir="/tmp" # where to store longer build logs TOP_LOG_dir="$TOP_BUILD_dir" # where to store longer build logs ROOT_dir=$(dirname $TOP_BUILD_dir) APL_VERSION=$(basename $ROOT_dir) # some counters for what happens declare -i build_errors=0 declare -i missing_files=0 declare -i configs_bad=0 declare -i configs_good=0 declare -i test_errors=0 bad_configs="" # print the.html table row for one build artifact # print nothing if the artifact does not exist # artifact() { local indent=" " #