Revision 24eaf3bf279b06d92a5488a7a4f9959ae7d86960 authored by Laurent Rineau on 08 September 2017, 15:30:09 UTC, committed by Laurent Rineau on 08 September 2017, 15:30:09 UTC
Parameterization: Remove VC++ compiler option; Remove a macro concerning Eigen
run_doxygen_testsuite
#!/bin/bash
set -o errexit
cd /home/cgal-testsuite
# Rotate log files on one month: the logfile name contains the number of
# the day
LOGFILE=$PWD/doxygen_testsuite-`date '+%d'`.log
exec > "$LOGFILE"
# Display commands as if using `set -o xtrace`, but to the stdout
trap 'echo "[$BASH_SOURCE:$LINENO] $BASH_COMMAND" >&1' DEBUG
# A helper error function that outputs both to stderr and stdout before
# aborting the script.
function error() {
echo "Error: $@"
echo "Error: $@" >&2
echo "See $LOGFILE" >&2
exit 1
}
CGAL_URL="https://cgal.geometryfactory.com/CGAL/Members/Releases"
CURL_OPTS="--remote-name --silent -n"
LATEST_LOCATION="${CGAL_URL}/LATEST"
CGAL_DOC_BUILD="/home/cgal-testsuite/cgal_doc_build"
if [ -r "${CGAL_DOC_BUILD}" ]; then
rm -rf "${CGAL_DOC_BUILD}"
fi
mkdir ${CGAL_DOC_BUILD}
cd ${CGAL_DOC_BUILD}
if [ -r "LATEST" ]; then
rm -rf LATEST
fi
curl ${CURL_OPTS} "${LATEST_LOCATION}"
if [ ! -f "LATEST" ]; then
error "COULD NOT DOWNLOAD LATEST!"
fi
for i in `cat LATEST`
do
CGAL_LOCATION="${CGAL_URL}/${i}";
CGAL_ZIPFILE="${i}";
done
CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"`
curl ${CURL_OPTS} "${CGAL_LOCATION}"
tar xvzf "${CGAL_ZIPFILE}" && rm "${CGAL_ZIPFILE}"
if [ ! -d "${CGAL_DOC_BUILD}/${CGAL_RELEASE_ID}" ]; then
error "directory ${CGAL_DOC_BUILD}/${CGAL_RELEASE_ID} does not exist"
fi
cd "${CGAL_RELEASE_ID}"
PYTHONPATH=/home/cgal-testsuite/.local/lib/python2.6/site-packages
export PYTHONPATH
PATH=/home/cgal-testsuite/local/bin:$PATH
export PATH
cmake \
-DBUILD_DOC:BOOL=ON \
-DCGAL_DOC_CREATE_LOGS:bool=ON \
-DCGAL_DOC_MATHJAX_LOCATION:STRING=../../MathJax \
-DCGAL_DOC_RELEASE:BOOL=TRUE \
-DCGAL_DOC_PUBLISH_DIR=/srv/CGAL/www/Members/Manual_doxygen_test \
-DDOXYGEN_EXECUTABLE:FILEPATH=/home/cgal-testsuite/local/bin/doxygen \
-DPYTHON_EXECUTABLE:FILEPATH=/home/cgal-testsuite/local/bin/python2 \
. 2>&1 || error "exit code $? returned by CMake"
# Note that -DCGAL_DOC_RELEASE:BOOL=TRUE should be only for master-only
# internal releases, and not for integration releases.
make doc 2>&1 || error "exit code $? returned by the command 'make doc'"
make doc_and_publish_testsuite 2>&1 || error "exit code $? returned by the command 'make doc_and_publish_testsuite'"
case "$CGAL_RELEASE_ID" in
*-I-*) ln -snf "../Manual_doxygen_test/$CGAL_RELEASE_ID/output" /srv/CGAL/www/doc/master
;;
esac
rm -rf "${CGAL_DOC_BUILD}"
# Then gzip the log file, to save space
exec
gzip -f "$LOGFILE"
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...