From 804328c913c031f70958157902da50d05673e80d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastian=20K=C3=B6cher?= <bkchr@users.noreply.github.com>
Date: Thu, 7 Apr 2022 21:15:43 +0200
Subject: [PATCH] Remove old caching stuff from CI (#1154)

---
 cumulus/.gitlab-ci.yml          |  3 ---
 cumulus/scripts/ci/pre_cache.sh | 28 ----------------------------
 2 files changed, 31 deletions(-)
 delete mode 100755 cumulus/scripts/ci/pre_cache.sh

diff --git a/cumulus/.gitlab-ci.yml b/cumulus/.gitlab-ci.yml
index 04151c92d4f..0d89bd90f2f 100644
--- a/cumulus/.gitlab-ci.yml
+++ b/cumulus/.gitlab-ci.yml
@@ -13,11 +13,9 @@ variables:                         &default-vars
   GIT_STRATEGY:                    fetch
   GIT_DEPTH:                       100
   CARGO_INCREMENTAL:               0
-  CARGO_TARGET_DIR:                "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
   CI_IMAGE:                        "paritytech/ci-linux:production"
   DOCKER_OS:                       "debian:stretch"
   ARCH:                            "x86_64"
-  WASM_BUILD_WORKSPACE_HINT:       "/builds/parity/cumulus/"
 
 .rust-info-script:                 &rust-info-script
   - rustup show
@@ -37,7 +35,6 @@ variables:                         &default-vars
   image:                           "${CI_IMAGE}"
   before_script:
     - *rust-info-script
-    - ./scripts/ci/pre_cache.sh
     - sccache -s
   retry:
     max: 2
diff --git a/cumulus/scripts/ci/pre_cache.sh b/cumulus/scripts/ci/pre_cache.sh
deleted file mode 100755
index c25d73587bf..00000000000
--- a/cumulus/scripts/ci/pre_cache.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-set -u
-
-# if there is no directory for this $CI_COMMIT_REF_NAME/$CI_JOB_NAME
-# create such directory and
-# copy recursively all the files from the newest dir which has $CI_JOB_NAME, if it exists
-
-# cache lives in /ci-cache/${CI_PROJECT_NAME}/${2}/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}
-
-function prepopulate {
-  if [[ ! -d $1 ]]; then
-    mkdir -p "/ci-cache/$CI_PROJECT_NAME/$2/$CI_COMMIT_REF_NAME";
-    FRESH_CACHE=$(find "/ci-cache/$CI_PROJECT_NAME/$2" -mindepth 2 -maxdepth 2 \
-      -type d -name "$CI_JOB_NAME"  -exec stat --printf="%Y\t%n\n" {} \; |sort -n -r |head -1 |cut -f2);
-    if [[ -d $FRESH_CACHE ]]; then
-      echo "____Using" "$FRESH_CACHE" "to prepopulate the cache____";
-      time cp -r "$FRESH_CACHE" "$1";
-    else
-      echo "_____No such $2 dir, proceeding from scratch_____";
-    fi
-  else
-    echo "____No need to prepopulate $2 cache____";
-  fi
-}
-
-# CARGO_HOME cache is still broken so would be handled some other way.
-prepopulate "$CARGO_TARGET_DIR" targets
-- 
GitLab