diff --git a/.gitlab/before.sh b/.gitlab/before.sh index 1da1730e3fd826e4f4aed786c628ad9115786740..58d24968f43d8111a87a52d605b767d0d0887424 100755 --- a/.gitlab/before.sh +++ b/.gitlab/before.sh @@ -1,6 +1,5 @@ #!/bin/bash - if [ "$OS" == "win7" ]; then # there is no docker on windows CONTAINER_ID=0 @@ -66,6 +65,8 @@ QT_VERSION=$(qmake --version | grep Qt | cut -f4 -d" " ) # output all information to report file echo "Docker container id....... $CONTAINER_ID" > /tmp/report.txt echo "Job....................... $CI_JOB_NAME" >> /tmp/report.txt +echo "PROJECT_SOURCE_DIR........ $PROJECT_SOURCE_DIR" >> /tmp/report.txt +echo "CI_PROJECT_DIR............ $CI_PROJECT_DIR" >> /tmp/report.txt echo "Build Directory........... $PROJECT_BUILD_DIR" >> /tmp/report.txt echo "Log Directory............. $PROJECT_LOG_DIR" >> /tmp/report.txt echo "Branch.................... $CI_COMMIT_REF_NAME" >> /tmp/report.txt diff --git a/.gitlab/build.sh b/.gitlab/build.sh index 956c9fdbd971442a512cad110496359d472ff9e7..99eec2b13567e927189f9fe000b8958fcbcf1b18 100755 --- a/.gitlab/build.sh +++ b/.gitlab/build.sh @@ -2,7 +2,13 @@ # Uncomment next line to print each bash command before it is executed #set -x +# Path needs to use forward slashes +# This is ok on Linux but since gitlab-runner 11.7 on windows all path variables use backward slash instead of forward slash +# → Replace all backslash to forward slash +export PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR//\\//} + echo "Job $CI_JOB_NAME" +echo "PROJECT_SOURCE_DIR=$PROJECT_SOURCE_DIR" if ! grep -q TRIGGER_STAGE_BUILD "${PROJECT_LOG_DIR}/trigger-stage.txt"; then echo "Job skipped as /build flag not in commit message and CAMITK_CI_STAGE < $STAGE_CONFIGURE"; diff --git a/.gitlab/check.sh b/.gitlab/check.sh index c8fbbd74ad7ebd59a21bc34f74be0e3be5306485..a85cd757568e3ecb936e1089212f31d25487df10 100755 --- a/.gitlab/check.sh +++ b/.gitlab/check.sh @@ -1,6 +1,12 @@ #!/bin/bash +# Path needs to use forward slashes +# This is ok on Linux but since gitlab-runner 11.7 on windows all path variables use backward slash instead of forward slash +# → Replace all backslash to forward slash +export PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR//\\//} + echo "Job $CI_JOB_NAME" +echo "PROJECT_SOURCE_DIR=$PROJECT_SOURCE_DIR" if [ "$TRIGGER_STAGE_CHECK" == "false" ]; then echo "Job skipped as /check flag not in commit message and CAMITK_CI_STAGE < $STAGE_CHECK"; diff --git a/.gitlab/configure.sh b/.gitlab/configure.sh index ca30bca485b7fbca4e95a047f09243ef84d14e4a..86f660d59a5d7b3b362c253d1b0d721eacac26c1 100755 --- a/.gitlab/configure.sh +++ b/.gitlab/configure.sh @@ -2,7 +2,13 @@ # Uncomment next line to print each bash command before it is executed #set -x +# Path needs to use forward slashes +# This is ok on Linux but since gitlab-runner 11.7 on windows all path variables use backward slash instead of forward slash +# → Replace all backslash to forward slash +export PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR//\\//} + echo "Job $CI_JOB_NAME" +echo "PROJECT_SOURCE_DIR=$PROJECT_SOURCE_DIR" if ! grep -q TRIGGER_STAGE_CONFIGURE "${PROJECT_LOG_DIR}/trigger-stage.txt"; then echo "Job skipped as /configure flag not in commit message and CAMITK_CI_STAGE < $STAGE_CONFIGURE"; @@ -29,9 +35,8 @@ if [[ "$OS" != "win7" ]]; then fi echo "===== Running configure stage =====" - +# there is no xvfb on windows if [ "$OS" == "win7" ]; then - # there is no xvfb on windows ctest -VV \ -DCTEST_SITE="$CDASH_SITE" \ -DCI_MODE="$CAMITK_CI_MODE" \ @@ -40,7 +45,7 @@ if [ "$OS" == "win7" ]; then -DCI_BUILD_SETTINGS="$COMPILER_CONFIG" \ -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 + -S "$PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-configure.cmake" > >(tee ${PROJECT_LOG_DIR}/configure.log) 2>&1 else ctest -VV \ -DCTEST_SITE="$CDASH_SITE" \ diff --git a/.gitlab/coverage.sh b/.gitlab/coverage.sh index e5fb7afc59cd1199bb5cd7d15a274505aeaa95db..1467b32b4132cd59f15ee9351a0293e90f698cc5 100755 --- a/.gitlab/coverage.sh +++ b/.gitlab/coverage.sh @@ -1,6 +1,12 @@ #!/bin/bash +# Path needs to use forward slashes +# This is ok on Linux but since gitlab-runner 11.7 on windows all path variables use backward slash instead of forward slash +# → Replace all backslash to forward slash +export PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR//\\//} + echo "Job $CI_JOB_NAME" +echo "PROJECT_SOURCE_DIR=$PROJECT_SOURCE_DIR" if ! grep -q TRIGGER_STAGE_COVERAGE "${PROJECT_LOG_DIR}/trigger-stage.txt"; then echo "Job skipped as /coverage flag not in commit message and CAMITK_CI_STAGE < $STAGE_CONFIGURE"; diff --git a/.gitlab/test.sh b/.gitlab/test.sh index 3b54141cbcd18619f5178559aab5da7a55b1b61a..57082f127e8ed77d06d4d85a2d41a3ee4c64c4e2 100755 --- a/.gitlab/test.sh +++ b/.gitlab/test.sh @@ -2,7 +2,13 @@ # Uncomment next line to print each bash command before it is executed #set -x +# Path needs to use forward slashes +# This is ok on Linux but since gitlab-runner 11.7 on windows all path variables use backward slash instead of forward slash +# → Replace all backslash to forward slash +export PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR//\\//} + echo "Job $CI_JOB_NAME" +echo "PROJECT_SOURCE_DIR=$PROJECT_SOURCE_DIR" if ! grep -q TRIGGER_STAGE_TEST "${PROJECT_LOG_DIR}/trigger-stage.txt"; then echo "Job skipped as /test flag not in commit message and CAMITK_CI_STAGE < $STAGE_CONFIGURE";