Merge remote-tracking branch 'cgal/master' into HEAD

This commit is contained in:
Sébastien Loriot
2021-07-22 13:15:22 +02:00
1891 changed files with 135305 additions and 15381 deletions
+25 -6
View File
@@ -630,11 +630,17 @@ if [ -f '${LIST_TEST_PACKAGES}' ]; then
cp '${CGAL_TEST_DIR}/makefile2' '${CGAL_BINARY_DIR}/test'
cp '${CGAL_TEST_DIR}/run_testsuite_with_cmake' '${CGAL_BINARY_DIR}/test'
for PACKAGE in \`source '${LIST_TEST_PACKAGES}' '${CGAL_ROOT}'\`; do
if [ -d "${CGAL_TEST_DIR}/\${PACKAGE}" ]; then
mkdir "${CGAL_BINARY_DIR}/test/\${PACKAGE}"
cp -r "${CGAL_TEST_DIR}/\${PACKAGE}" '${CGAL_BINARY_DIR}/test'
# list all packages in CGAL_TEST_DIR. If PACKAGE is found in LIST_TEST_PACKAGES,
# copy it, else prepare for the special "skipped" case in the table.
for PACKAGE in \$(ls "${CGAL_TEST_DIR}"); do
if [ -d "${CGAL_TEST_DIR}/\$PACKAGE" ]; then
if source '${LIST_TEST_PACKAGES}' '${CGAL_ROOT}' | egrep -q \$PACKAGE; then
mkdir "\${CGAL_BINARY_DIR}/test/\${PACKAGE}"
cp -r "${CGAL_TEST_DIR}/\${PACKAGE}" '${CGAL_BINARY_DIR}/test'
else
mkdir "${CGAL_BINARY_DIR}/test/\${PACKAGE}"
touch "${CGAL_BINARY_DIR}/test/\${PACKAGE}/skipped"
fi
fi
done
@@ -657,7 +663,20 @@ echo 'COLLECTING RESULTS';
./collect_cgal_testresults_from_cmake;
if [ -n "\$COLLECT_DEMOS_BINARIES" ]; then
echo 'COLLECTING DEMOS BINARIES';
tar czvf '${CGAL_TEST_DIR}/demos_${CGAL_TESTER}_${PLATFORM}.tar.gz' *_Demo/*.exe *_Demo/*.dll *_Demo/*/*.dll *_Demo/*/*/*.dll
echo "cp ${CGAL_TEST_DIR}/../developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh ${CGAL_BINARY_DIR}/test"
cp "${CGAL_TEST_DIR}/../developer_scripts/cgal_demo_copy_all_dlls_cygwin.sh" "${CGAL_BINARY_DIR}/test"
EOF
cat >> "$file" <<'EOF'
for demo_dir in *_Demo; do
echo "pushd ${demo_dir}"
pushd "${demo_dir}"
bash ../cgal_demo_copy_all_dlls_cygwin.sh "${demo_dir}_with_dlls" ""
mv "${demo_dir}_with_dlls" ..
popd
done
EOF
cat >> "$file" <<EOF
tar czvf "${CGAL_TEST_DIR}/demos_${CGAL_TESTER}_${PLATFORM}.tar.gz" *_Demo_with_dlls/*
fi
echo 'COPYING RESULTS';
cp 'results_${CGAL_TESTER}_${PLATFORM}.tar.gz' 'results_${CGAL_TESTER}_${PLATFORM}.txt' '${CGAL_TEST_DIR}';
@@ -1,5 +1,3 @@
#!/bin/bash
#!/bin/bash
#usage : script [-c -l -n -s -k] testsuite_dir
@@ -23,7 +21,7 @@ export TAR="tar"
export GUNZIP="gunzip"
export COMPRESSOR="gzip"
export CONSOLE_OUTPUT="y"
export CGAL_HOME=`pwd`
export CGAL_HOME=$(pwd | sed -E 's/\/cygdrive\/([a-z])\//\U\1:\//')
export USE_TARGZ="y"
export USE_TARBZ="n"
export CGAL_RELEASE=""
@@ -284,6 +282,8 @@ else
CGAL_DIR=`readlink "${CGAL_HOME}/CGAL-I"`
fi
CGAL_DIR=$(echo "$CGAL_DIR" | sed -E 's/\/cygdrive\/([a-z])\//\U\1:\//')
CGAL_RELEASE_ID=$(cat last_release_id)
for HOST in ${BUILD_HOSTS}; do
if [ "$HOST" != "localhost" ]; then
@@ -10,8 +10,8 @@
# GPL_PACKAGE_LIST=path to a file containing the list of GPL packages to include in the release. If not provided all of them are.
# GENERATE_TARBALLS=[ON/OFF] indicates if release tarballs should be created as DESTINATION
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
find_program(BASH NAMES bash sh)
function(process_package pkg)
if(VERBOSE)
message(STATUS "handling ${pkg}")
@@ -226,7 +226,7 @@ if (TESTSUITE)
if(IS_DIRECTORY "${release_dir}/test/${d}")
if(NOT EXISTS "${release_dir}/test/${d}/cgal_test_with_cmake")
execute_process(
COMMAND ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
WORKING_DIRECTORY "${release_dir}/test/${d}"
RESULT_VARIABLE RESULT_VAR
OUTPUT_VARIABLE OUT_VAR
@@ -252,7 +252,7 @@ if (TESTSUITE)
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Demo")
if(NOT EXISTS "${release_dir}/test/${d}_Demo/cgal_test_with_cmake")
execute_process(
COMMAND ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake --no-run
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake --no-run
WORKING_DIRECTORY "${release_dir}/test/${d}_Demo"
RESULT_VARIABLE RESULT_VAR
OUTPUT_VARIABLE OUT_VAR
@@ -273,7 +273,7 @@ if (TESTSUITE)
file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Examples")
if(NOT EXISTS "${release_dir}/test/${d}_Examples/cgal_test_with_cmake")
execute_process(
COMMAND ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
COMMAND ${BASH} ${GIT_REPO}/Scripts/developer_scripts/create_cgal_test_with_cmake
WORKING_DIRECTORY "${release_dir}/test/${d}_Examples"
RESULT_VARIABLE RESULT_VAR
OUTPUT_VARIABLE OUT_VAR
@@ -0,0 +1,46 @@
#!/bin/bash
#use this script from inside the build directory of the Polyhedron demo
#Needs the Qt5_DIR env variable set to <Qt5_ROOT>/lib/cmake/Qt5
#No config : in autotest_cgal we use NMake as generator
#If using MSVC Generator, declare config="Release"
declare config="$2"
declare target_directory="$1"
if [[ ! -d "$target_directory" ]]
then
mkdir $target_directory
fi
copy_dll()
{
local dll_full_path=$(cygpath --unix --absolute "$1")
echo "copy $dll_full_path to $2"
#remove all dlls from system and Visual
if ! [[ "$dll_full_path" =~ "api-ms-win" ]] && ! [[ "$dll_full_path" =~ "system32" ]]; then
cp "$dll_full_path" "$2"
fi
}
files=($PWD/$config/*.exe)
files+=($PWD/$config/*.dll)
files+=($PWD/Plugins/*/$config/*.dll)
for file in "${files[@]}"; do
# copy exe or dll
copy_dll "$file" "$target_directory"
# list and copy dependencies
cygcheck "$file" | while read -r dll ; do
copy_dll "$dll" "$target_directory"
done; #check dependencies
done #loop over directories
mkdir -p "$target_directory/platforms"
cp "$Qt5_DIR/../../../plugins/platforms/qwindows.dll" "$target_directory/platforms"
@@ -326,22 +326,3 @@ if [ -n "$DO_PUBLIC" ]; then
rm -f "$HTML_DIR/CGAL-last-public"
ln -s "${release_name}-public" "$HTML_DIR/CGAL-last-public"
fi
if [ -n "$DO_PUBLIC" ]; then
if docker version > /dev/null; then
# Re-extract the full version of CGAL, with examples/, and doc_html/
rm -rf ./${public_release_name}
tar -xf "${HTML_DIR}/${release_name}-public/${public_release_name}.tar.xz"
# Build the Windows installer
docker pull cgal/cgal-nsis-dockerfile
docker create -v `realpath ${DESTINATION}/${public_release_name}`:/mnt/cgal_release:ro,z \
-v ${SOURCES_DIR}:/mnt/cgal_sources:ro,z \
cgal/cgal-nsis-dockerfile
container_id=`docker ps -q -l`
docker start -a ${container_id}
docker cp ${container_id}:/nsis_release/${public_release_name}-Setup.exe "${HTML_DIR}/${release_name}-public/"
docker rm ${container_id}
else
echo "Cannot use Docker, the Windows installer will not be created" >&2
fi
fi
@@ -258,20 +258,25 @@ run_test_on_platform()
CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM}
cd "${CGAL_BINARY_DIR}"
log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Testing on host ${HOST} and platform ${PLATFORM}"
INIT_FILE="${CGAL_HOME}/${REFERENCE_PLATFORMS_DIR}/${PLATFORM}.cmake"
if [ -f "${CGAL_HOME}/${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/setup" ]; then
source "${CGAL_HOME}/${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/setup"
else
INIT_FILE="${CGAL_HOME}/${REFERENCE_PLATFORMS_DIR}/${PLATFORM}.cmake"
fi
if [ ! -f "${INIT_FILE}" ]; then
echo "error NEED A INIT FILE !"
fi
cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON -DWITH_tests=ON -DCGAL_TEST_SUITE=ON $CGAL_DIR>installation.log 2>&1
cmake ${INIT_FILE:+"-C${INIT_FILE}"} -DBUILD_TESTING=ON -DWITH_tests=ON -DCGAL_TEST_SUITE=ON $CGAL_DIR>installation.log 2>&1
rm CMakeCache.txt
CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON"
CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DWITH_tests=ON"
if [ -n "${SCRIPTS_DIR}" ]; then
CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON"
fi
if [ -z "${SHOW_PROGRESS}" ]; then
cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1
cmake ${INIT_FILE:+"-C${INIT_FILE}"} -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1
else
cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log
cmake ${INIT_FILE:+"-C${INIT_FILE}"} -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log
fi
LIST_TEST_FILE="${CGAL_HOME}/list_test_packages"
if [ -f ${LIST_TEST_FILE} ]; then
@@ -289,11 +294,15 @@ run_test_on_platform()
#unsets the limit of 1024 bits for the logs through ssh
echo "SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1000000000)" > CTestCustom.cmake
echo "SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1000000000)" >> CTestCustom.cmake
CTEST_OPTS="-T Start -T Test --timeout 1200 -j${NUMBER_OF_PROCESSORS} ${DO_NOT_TEST:+-E execution___of__} "
CTEST_OPTS="-T Start -T Test --timeout 1200 ${DO_NOT_TEST:+-E execution___of__}"
if uname | grep -q "CYGWIN"; then
CTEST_OPTS="-C ${CONFIG_TYPE} ${CTEST_OPTS}"
fi
if [ -z "${SHOW_PROGRESS}" ]; then
ctest ${TO_TEST:+-L ${TO_TEST} } ${CTEST_OPTS} ${KEEP_TESTS:+-FC .}> tmp.txt
ctest ${TO_TEST:+-L ${TO_TEST} } ${CTEST_OPTS} -j${NUMBER_OF_PROCESSORS} ${KEEP_TESTS:+-FC .}>tmp.txt
else
ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST}} ${KEEP_TESTS:+-FC .}|tee tmp.txt
ctest ${TO_TEST:+-L ${TO_TEST} } ${CTEST_OPTS} -j${NUMBER_OF_PROCESSORS} ${KEEP_TESTS:+-FC .}|tee tmp.txt
fi
#####################
## GET RESULTS ##
@@ -309,11 +318,14 @@ run_test_on_platform()
else
echo "CGAL_VERSION ${CGAL_GIT_VERSION}">> "$RESULT_FILE"
fi
sed -n '/The CXX compiler/s/-- The CXX compiler identification is/COMPILER_VERSION =/p' < "${CGAL_BINARY_DIR}/installation.log" |sed -E "s/ = (.*)/\ = '\1\'/">> "$RESULT_FILE"
echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE"
echo "TESTER_NAME ${CGAL_TESTER}" >> "$RESULT_FILE"
echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE"
echo "CGAL_TEST_PLATFORM ${PLATFORM}" >> "$RESULT_FILE"
grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE
grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log"|sort -u >> $RESULT_FILE
#Use sed to get the content of DEBUG or RELEASE CXX FLAGS so that Multiconfiguration platforms do provide their CXXXFLAGS to the testsuite page (that greps USING CXXFLAGS to get info)
sed -i -E 's/(^-- USING )(DEBUG|RELEASE) (CXXFLAGS)/\1\3/' $RESULT_FILE
echo "------------" >> "$RESULT_FILE"
#if git branch, create empty scm file for python script
if [ -n "${SCRIPTS_DIR}" ]; then
@@ -366,20 +378,6 @@ setup_dirs
# Setup cmake
if uname | grep -q "CYGWIN"; then
JOM="`which jom`"
if [ -e "$JOM" ]; then
CMAKE_GENERATOR='-GNMake Makefiles JOM'
MAKE_CMD='jom'
else
CMAKE_GENERATOR='-GNMake Makefiles'
MAKE_CMD='nmake'
fi
IS_CYGWIN='y'
else
MAKE_CMD='make'
fi
log "${ACTUAL_LOGFILE}" "running the testsuites"
if [ -n "${CONSOLE_OUTPUT}" ]; then
printf "\n-------------------------------------------------------\n"
@@ -34,16 +34,18 @@ git fetch --tags "${REMOTE}" `git config --get-all "remote.${REMOTE}.fetch"` '+r
PR_LIST=`git log --pretty='%D' v${PREVIOUS_MAJOR_RELEASE}..v${CURRENT_RELEASE} | awk 'match($0, /refs\/pull\/([0-9]+)\/head/, a) {print a[1]}' | sort -u`
echo gh api repos/CGAL/cgal/labels -F name=Merged_in_${CURRENT_RELEASE}
for i in ${PR_LIST}; do
echo ghi label $i -a Merged_in_${CURRENT_RELEASE} -- CGAL/cgal
echo gh pr edit $i --add-label Merged_in_${CURRENT_RELEASE}
done
read -p "Please confirm operation by typing YES? " -n 4 -r
echo
if [[ $REPLY =~ ^YES$ ]]; then
gh api repos/CGAL/cgal/labels -F name=Merged_in_${CURRENT_RELEASE}
for i in ${PR_LIST}; do
ghi label $i -a Merged_in_${CURRENT_RELEASE} -- CGAL/cgal
gh pr edit $i --add-label Merged_in_${CURRENT_RELEASE}
done
else