Commit f7f315b1 authored by Emmanuel Promayon's avatar Emmanuel Promayon

Merge branch 'bug/fix-ci' into 'develop'

FIXED continous integration

See merge request !100
parents 215f2654 72eab104
Pipeline #17155 failed with stages
in 115 minutes and 54 seconds
......@@ -9,8 +9,6 @@ if ! grep -q TRIGGER_STAGE_CONFIGURE "${PROJECT_LOG_DIR}/trigger-stage.txt"; the
exit 1;
fi
echo "===== configure ====="
# Clean build directory
# note: cannot build outside the source tree otherwise artifacts cannot be collected
if [ "$CAMITK_CI_MODE" == "Nightly" ]; then
......@@ -18,6 +16,20 @@ if [ "$CAMITK_CI_MODE" == "Nightly" ]; then
echo "Nightly Build, start from scratch";
fi
if [[ "$OS" != "win7" ]]; then
echo "===== Configuring xvfb ====="
# Starts the server first (try to avoid unexpected and random "QXcbConnection: Could not connect to display :99")
# see also https://doc.qt.io/qt-5/embedded-linux.html#linuxfb
export DISPLAY=":98"
#-ac +extension GLX +render -noreset -v -fbdir $workingDir/ &> ${PROJECT_LOG_DIR}/test.log &
Xvfb $DISPLAY -screen 0 1600x1200x24 -ac &> ${PROJECT_LOG_DIR}/test.log &
trap "kill $! || true" EXIT
sleep 10
export XAUTHORITY=/dev/null
fi
echo "===== Running configure stage ====="
if [ "$OS" == "win7" ]; then
# there is no xvfb on windows
ctest -VV \
......@@ -30,9 +42,7 @@ if [ "$OS" == "win7" ]; then
-DCTEST_BINARY_DIRECTORY="$PROJECT_BUILD_DIR" \
-S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-configure.cmake > >(tee ${PROJECT_LOG_DIR}/configure.log) 2>&1
else
# on Linux, xvfb is required to run the tests
xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \
ctest -VV \
ctest -VV \
-DCTEST_SITE="$CDASH_SITE" \
-DCI_MODE="$CAMITK_CI_MODE" \
-DCI_ID="P $CI_PIPELINE_ID - J $CI_BUILD_ID" \
......@@ -41,5 +51,4 @@ else
-DCTEST_SOURCE_DIRECTORY="$PROJECT_SOURCE_DIR" \
-DCTEST_BINARY_DIRECTORY="$PROJECT_BUILD_DIR" \
-S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-configure.cmake > >(tee ${PROJECT_LOG_DIR}/configure.log) 2>&1
fi
#!/bin/bash
export PROJECT_NAME="camitk"
export PROJECT_SOURCE_DIR=$(pwd)/CamiTK
export PROJECT_BUILD_DIR=$(pwd)/build
export PROJECT_LOG_DIR=$(pwd)/log
export CI_COMMIT_REF_NAME=$(cd CamiTK && git rev-parse --abbrev-ref HEAD)
export CAMITK_CI_MODE="Experimental"
export CAMITK_CI_STAGE=70
export CI_JOB_NAME="manual-$(date +%Y-%m-%d-%H:%M)"
if [[ "$OS" != "win7" ]]; then
OS_FULL_NAME=$(grep PRETTY_NAME /etc/*rel* | cut -f2 -d\" )
else
OS_FULL_NAME="Win7"
fi
export OS=$OS_FULL_NAME
export CDASH_SITE="[Manual] $OS"
# compiler-arch-buildtype string
export COMPILER_CONFIG="GCC-64bits-Debug"
echo
echo
echo
CamiTK/.gitlab/before.sh
echo
echo
echo
CamiTK/.gitlab/check.sh
echo
echo
echo
CamiTK/.gitlab/configure.sh
echo
echo
echo
CamiTK/.gitlab/build.sh
echo
echo
echo
CamiTK/.gitlab/test.sh
echo
echo
echo
CamiTK/.gitlab/coverage.sh
......@@ -9,10 +9,7 @@ if ! grep -q TRIGGER_STAGE_TEST "${PROJECT_LOG_DIR}/trigger-stage.txt"; then
exit 1;
fi
echo "===== test ====="
if [[ "$osName" != "win7" ]]; then
if [[ "$OS" != "win7" ]]; then
echo "===== Configuring xvfb ====="
# Starts the server first (try to avoid unexpected and random "QXcbConnection: Could not connect to display :99")
# see also https://doc.qt.io/qt-5/embedded-linux.html#linuxfb
......@@ -24,6 +21,8 @@ if [[ "$osName" != "win7" ]]; then
export XAUTHORITY=/dev/null
fi
echo "===== Running ctest ====="
ctest -VV \
-DCTEST_SITE="$CDASH_SITE" \
-DCI_MODE="$CAMITK_CI_MODE" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment