From 9620880cf987c7aff59f11779a9273bd50153acc Mon Sep 17 00:00:00 2001 From: Alejandro Lopez Gestoso <alopez@iri.upc.edu> Date: Fri, 2 Sep 2022 17:00:47 +0200 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 55 ++++++++++++-------------------------------------- 1 file changed, 13 insertions(+), 42 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 991ce7c..1691e57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,46 +3,17 @@ stages: - rdepends - variables: - ALGO: "TRUE" - - mal: - stage: rdepends - script: - - exit 1 - - bien: - stage: rdepends - script: - - exit 0 - - when_bien: - stage: rdepends - when: always - needs: [bien] - script: - - echo "GOOD" - - when_mal: - stage: rdepends - when: always - needs: [mal] - script: - - echo "GOOD" - - algo_bien: - stage: rdepends - rules: - - if: $ALGO == "TRUE" - when: always - script: - - echo "GOOD" - - algo_mal: - stage: rdepends - rules: - - if: $ALGO != "TRUE" - when: always + test_dep: + stage: test script: - - echo "GOOD" - \ No newline at end of file + - DEP=( $(grep -P '[^#]\s+SET\(CPACK_DEBIAN_PACKAGE_DEPENDS\s+"' CMakeLists.txt) ) + - declare -a DEP + - for ((i=1;i<${#DEP[@]};i+=3)) + do + if [ ${i} -eq 1 ] + then + apt -y install ${DEP[${i}]:1} + else + apt -y install ${DEP[${i}]} + fi + done \ No newline at end of file -- GitLab