diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65fc903097c0021e3a6378c1780fee6a407566d3..73c5407cc0a1b42bd27657882929e1f36e314700 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,12 +5,22 @@ stages: - analyse - deploy +# git config --global ahev been added to get around the issue related in +# https://github.com/actions/checkout/issues/760 for github +# Does not seem to be fixed for gitlab-runner yet before_script: + - git config --global --add safe.directory $CI_PROJECT_DIR + - git config --global --add safe.directory $CI_PROJECT_DIR/cmake_modules/morse_cmake + - git config --global --add safe.directory $CI_PROJECT_DIR/coreblas/hmat-oss + - git config --global --add safe.directory $CI_PROJECT_DIR/hqr + - git config --global --add safe.directory $CI_PROJECT_DIR/testing/test_fembem + - env 2>&1 > env.log - git submodule update --init --recursive - source .gitlab-ci-env.sh $SIMU - mkdir -p build-$VERSION include: + - .gitlab/preliminary.yml - .gitlab/common.yml - .gitlab/build.yml - .gitlab/test_starpu.yml diff --git a/.gitlab/check_ci.sh b/.gitlab/check_ci.sh index 76e9496ea8fefc963a5376942d4cb33b2f6075a8..20be8e72268924d6a3cd49179a372382dbcb86fe 100755 --- a/.gitlab/check_ci.sh +++ b/.gitlab/check_ci.sh @@ -51,28 +51,46 @@ check_draft() return 0 } -echo "----------------------------------------------------" -check_rebase - -echo "" -echo "----------------------------------------------------" -check_draft +check_header() +{ + echo " Checking file headers: " + TOOLSDIR=$(dirname $0)/../tools -echo "" -echo "----------------------------------------------------" -echo " Checking file headers: " -TOOLSDIR=$(dirname $0)/../tools + $TOOLSDIR/check_header.sh + rc=$? + if [ $rc -eq 0 ] + then + echo "Check header: SUCCESS" + else + echo "Check header: FAILED" + success=0 + fi +} -$TOOLSDIR/check_header.sh -rc=$? -if [ $rc -eq 0 ] +if [ $# -lt 1 ] then - echo "Check header: SUCCESS" -else - echo "Check header: FAILED" - success=0 + echo "Usage: $0 [rebase|draft|header]" + exit 1 fi +echo "" +echo "----------------------------------------------------" +case $1 in + rebase) + check_rebase + ;; + draft) + check_draft + ;; + header) + check_header + ;; + *) + echo "Usage: $0 [rebase|draft|header]" + exit 1 + ;; +esac + if [ $success -eq 0 ] then exit 1 diff --git a/.gitlab/common.yml b/.gitlab/common.yml index 312eea9ad3660ef55cffa3b5b3b8ec102b4daa10..2c597c65f777f49eb97308ac2cd07a6fae049222 100644 --- a/.gitlab/common.yml +++ b/.gitlab/common.yml @@ -21,14 +21,6 @@ except: - schedules -preliminary_checks: - image: registry.gitlab.inria.fr/solverstack/docker/distrib - stage: .pre - script: - - .gitlab/check_ci.sh - only: - - merge_requests - .build_script_template: extends: .only-branches stage: build diff --git a/.gitlab/preliminary.yml b/.gitlab/preliminary.yml new file mode 100644 index 0000000000000000000000000000000000000000..331c55b3772e261260e8ad1ae17f3fcecf32ef65 --- /dev/null +++ b/.gitlab/preliminary.yml @@ -0,0 +1,15 @@ +# +# This file list the preliminary checks done before trying to compile +# +--- +preliminary_checks: + image: registry.gitlab.inria.fr/solverstack/docker/distrib + stage: .pre + parallel: + matrix: + - TEST: [rebase, draft, header] + script: + - .gitlab/check_ci.sh $TEST + only: + - merge_requests +