From 9fdf36fc57e570200ac9c2b4c5ed5d8fc41d9ce7 Mon Sep 17 00:00:00 2001 From: Jeremy Bettis Date: Thu, 1 Sep 2022 14:04:33 -0600 Subject: gitlab: Fix some path problems in gitlab ci Moving the EC dir wasn't moving the dot files, also deleting the files from the cache defeats the purpose of the cache. Corrected both problems. BRANCH=None BUG=None TEST=Pushed to coverage branch in gitlab. Signed-off-by: Jeremy Bettis Change-Id: I2920ec27eafdc76248e9253724b29a198262865a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3869307 Reviewed-by: Tristan Honscheid Commit-Queue: Jeremy Bettis Tested-by: Jeremy Bettis --- .gitlab-ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1442d03cda..00f7280b17 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,18 +50,17 @@ before_script: - echo "CI_PROJECT_DIR is at ${CI_PROJECT_DIR}" # Move freshly-checked out ec code to subdirectory - cd ${CI_PROJECT_DIR} - - shopt -s extglob - mkdir -p ec_dir - - mv -- !(ec_dir) ec_dir - - shopt -u extglob + - find . -mindepth 1 -maxdepth 1 -name ec_dir -o -print0 | xargs -0 -I {} mv {} ec_dir - export EC_DIR="${CI_PROJECT_DIR}/ec_dir" # Remove old zephyr and module checkouts (unwanted cache artifact) - - rm -rf ${EC_DIR}/zephyr/main - - rm -rf ${EC_DIR}/modules - # Get Zephyr repo and modules - export MODULES_DIR="$CI_PROJECT_DIR/modules" - - mkdir -p "${MODULES_DIR}" - export ZEPHYR_BASE="${CI_PROJECT_DIR}/zephyr/main" + - mkdir -p "${CI_PROJECT_DIR}/zephyr" + - test -d ${EC_DIR}/zephyr/main && mv -T ${EC_DIR}/zephyr/main ${ZEPHYR_BASE} + - test -d ${EC_DIR}/modules && mv -T ${EC_DIR}/modules ${MODULES_DIR} + # Get Zephyr repo and modules + - mkdir -p "${MODULES_DIR}" - mkdir -p "${ZEPHYR_BASE}" - test -d "${ZEPHYR_BASE}/.git" || git clone --depth 1 -b main https://chromium.googlesource.com/chromiumos/third_party/zephyr "${ZEPHYR_BASE}" - test -d "${MODULES_DIR}/cmsis" || git clone --depth 1 -b chromeos-main https://chromium.googlesource.com/chromiumos/third_party/zephyr/cmsis "${MODULES_DIR}/cmsis" -- cgit v1.2.1