From 7137818e72b6aabb9097e0cb4c38e68ac4b46bdf Mon Sep 17 00:00:00 2001 From: maxkahan Date: Thu, 1 Feb 2024 02:53:59 +0000 Subject: [PATCH] removing cache deletion script --- .github/workflows/build.yml | 15 --------------- delete_cache_if_too_big.sh | 9 --------- 2 files changed, 24 deletions(-) delete mode 100644 delete_cache_if_too_big.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f058985..ca6841ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,18 +47,3 @@ jobs: - name: Run tests run: | pants test --use-coverage :: - - delete-cache-if-too-big: - name: delete-cache-if-too-big - runs-on: ubuntu-latest - needs: [test] - strategy: - fail-fast: false - steps: - - name: Clone repo - uses: actions/checkout@v3 - - name: Delete cache if too big - run: | - source delete_cache_if_too_big.sh - delete_cache_if_too_big /home/runner/work/_temp/_github_home/.cache/nce 512 - delete_cache_if_too_big /home/runner/work/_temp/_github_home/.cache/pants/named_caches 1024 diff --git a/delete_cache_if_too_big.sh b/delete_cache_if_too_big.sh deleted file mode 100644 index 02963d29..00000000 --- a/delete_cache_if_too_big.sh +++ /dev/null @@ -1,9 +0,0 @@ -function delete_cache_if_too_big() { - path=$1 - limit_mb=$2 - size_mb=$(du -m -d0 "${path}" | cut -f 1) - if (( size_mb > limit_mb )); then - echo "${path} is too large (${size_mb}mb), deleting it." - rm -rf "${path}" - fi - } \ No newline at end of file