Merge pull request #2784 from maxGimeno/Travis_check_package_dep-GF
TravisCI: check package dependencies
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
#This script must be called from the CGAL root.
|
||||
set -e
|
||||
set -x
|
||||
while test $# -gt 0
|
||||
do
|
||||
case "$1" in
|
||||
--help) echo "Usage: $0 <doxygen_exe_path> "
|
||||
echo " $0 must be called from the CGAL root directory. It will compile documentation for all packages using doxygen_exe_path, and deduce "
|
||||
echo "their dependencies. It will then compare them with the previous ones and output 1if the dependencies has changed, "
|
||||
echo "0 otherwise."
|
||||
exit 0
|
||||
;;
|
||||
--*) echo "bad option $1"
|
||||
;;
|
||||
*) DOX_PATH="$1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
CGAL_ROOT=$PWD
|
||||
mkdir -p dep_check_build && cd dep_check_build
|
||||
for pkg_path in $CGAL_ROOT/*
|
||||
do
|
||||
pkg=$(basename $pkg_path)
|
||||
if [ -f $pkg_path/package_info/$pkg/dependencies ]; then
|
||||
mv $pkg_path/package_info/$pkg/dependencies $pkg_path/package_info/$pkg/dependencies.old
|
||||
fi
|
||||
done
|
||||
|
||||
cmake -DCGAL_ENABLE_CHECK_HEADERS=TRUE -DDOXYGEN_EXECUTABLE="$DOX_PATH" -DCGAL_COPY_DEPENDENCIES=TRUE -DCMAKE_CXX_FLAGS="-std=c++11" ..
|
||||
make -j$(nproc --all) packages_dependencies
|
||||
echo " Checks finished"
|
||||
for pkg_path in $CGAL_ROOT/*
|
||||
do
|
||||
pkg=$(basename $pkg_path)
|
||||
if [ -f "$pkg_path/package_info/$pkg/dependencies" ]; then
|
||||
PKG_DIFF=$(diff -N -w "$pkg_path/package_info/$pkg/dependencies.old" "$pkg_path/package_info/$pkg/dependencies")
|
||||
if [ -n "$PKG_DIFF" ]; then
|
||||
HAS_DIFF=TRUE
|
||||
echo "Differences in $pkg: $PKG_DIFF"
|
||||
else
|
||||
echo "No differencies in $pkg dependencies."
|
||||
fi
|
||||
if [ -f $pkg_path/package_info/$pkg/dependencies.old ]; then
|
||||
rm $pkg_path/package_info/$pkg/dependencies.old
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo " Checks finished"
|
||||
cd $CGAL_ROOT
|
||||
rm -r dep_check_build
|
||||
if [ -n "$HAS_DIFF" ]; then
|
||||
echo " You should run cmake with options CGAL_CHECK_HEADERS and CGAL_COPY_DEPENDENCIES ON, make the target packages_dependencies and commit the new dependencies files."
|
||||
exit 1
|
||||
else
|
||||
echo "The dependencies are up to date."
|
||||
exit 0
|
||||
fi
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Used to regenerate `Installation/list_of_documented_headers.cmake`
|
||||
#
|
||||
# Run it in the `Installation` directory of a Git layout, with
|
||||
# `../build-doc/doc_output/` containing the build of the Doxygen
|
||||
# documentation.
|
||||
|
||||
file=cmake/modules/list_of_documented_headers.cmake
|
||||
|
||||
printf "# Generated using $0\n" > "$file"
|
||||
|
||||
exec >> "$file"
|
||||
|
||||
printf 'set(list_of_documented_headers_txt [=[\n'
|
||||
ack --no-heading --no-filename --output='$2' '# *include *(<|[<"])(CGAL/[^>&]*)([>"]|>)' ../build-doc/doc_output/*/*.html ../*/examples/*/*.cpp | sort | uniq
|
||||
printf ']=])\n'
|
||||
printf 'separate_arguments(list_of_documented_headers UNIX_COMMAND ${list_of_documented_headers_txt})\n'
|
||||
Reference in New Issue
Block a user