mirror of https://github.com/CGAL/cgal
Use a queue
This commit is contained in:
parent
30a43908a9
commit
e2e9f7385d
|
|
@ -12,7 +12,35 @@ if uname | grep -q -i cygwin; then
|
|||
set -o igncr
|
||||
fi
|
||||
source ~/.autofilterrc
|
||||
echo "CGAL_ROOT = $CGAL_ROOT" > log
|
||||
|
||||
|
||||
|
||||
|
||||
queue_insert (){
|
||||
echo "$1 $2 $3 $4">>$CGAL_ROOT/queue_file
|
||||
if [ ! -f running ];then
|
||||
execute $1 $2 $3 $4
|
||||
fi
|
||||
}
|
||||
|
||||
queue_pop(){
|
||||
mv queue_file tmp
|
||||
egrep -v "$1 $2 $3 $4" tmp>$CGAL_ROOT/queue_file
|
||||
if [ "$(<queue_file wc -w)" = "0" ]; then
|
||||
rm running
|
||||
else
|
||||
line=$(head -n 1 queue_file)
|
||||
USER_NAME=$(echo $line| cut -d' ' -f 1)
|
||||
BRANCH_NAME=$(echo $line| cut -d' ' -f 2)
|
||||
REF_NAME=$(echo $line| cut -d' ' -f 3)
|
||||
PR_NUMBER=$(echo $line| cut -d' ' -f 4)
|
||||
execute $USER_NAME $BRANCH_NAME $REF_NAME $PR_NUMBER
|
||||
fi
|
||||
}
|
||||
|
||||
execute()
|
||||
{
|
||||
touch running
|
||||
USER_REPO=$1
|
||||
BRANCH_NAME=$2
|
||||
BASE_NAME=$3
|
||||
|
|
@ -27,9 +55,6 @@ if [ ! -d cgal ]; then
|
|||
cd ..
|
||||
fi
|
||||
cd cgal
|
||||
CGAL_VERSION="CGAL-$(sed -E 's/#define CGAL_VERSION (.*\..*)-dev/\1/' <(grep "#define CGAL_VERSION " Installation/include/CGAL/version.h))-${PR_NUMBER}"
|
||||
echo $CGAL_VERSION > log
|
||||
exit 0
|
||||
git fetch --depth 1 cgal
|
||||
git remote add $USER_REPO https://github.com/$USER_REPO/cgal.git
|
||||
git fetch --depth 1 $USER_REPO
|
||||
|
|
@ -54,11 +79,9 @@ if [ "$LIST_OF_PKGS" != "" ]; then
|
|||
echo "echo \"${f}_Demo\"" >> ${CGAL_ROOT}/list_test_packages
|
||||
done
|
||||
fi
|
||||
(
|
||||
#create the release from the branch
|
||||
echo " Create release..."
|
||||
CGAL_VERSION="CGAL-$(sed -E 's/#define CGAL_VERSION (.*\..*)-dev/\1/' <(grep "#define CGAL_VERSION " Installation/include/CGAL/version.h))-${PR_NUMBER}"
|
||||
|
||||
echo "CGAL_VERSION = ${CGAL_VERSION}"> log
|
||||
cmake -DGIT_REPO=${CGAL_GIT_DIR}/cgal -DDESTINATION=${CGAL_ROOT}/CGAL-TEST -DPUBLIC=OFF -DTESTSUITE=ON -DCGAL_VERSION=${CGAL_VERSION} -P ${CGAL_GIT_DIR}/cgal/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake | tee log
|
||||
echo "done."
|
||||
|
|
@ -72,8 +95,17 @@ echo "starting testsuite..."
|
|||
|
||||
./autotest_cgal -c
|
||||
|
||||
)>${CGAL_ROOT}/autotest.log2 2>&1 &
|
||||
echo "finished."
|
||||
queue_pop $1 $2 $3 $4
|
||||
}
|
||||
|
||||
|
||||
(
|
||||
cd $CGAL_ROOT
|
||||
queue_insert $1 $2 $3 $4
|
||||
|
||||
)>${CGAL_ROOT}/autotest.log2 2>&1 &
|
||||
|
||||
|
||||
echo "exit."
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue