From d0c508f79a541332a156ce168b91617db94ec6ad Mon Sep 17 00:00:00 2001 From: Mikhail Ryzhov Date: Fri, 5 Apr 2024 14:12:49 +0200 Subject: [PATCH] clenaup ccache share --- ...eanup_pip_cache.yml => cleanup_caches.yml} | 29 +++++++++++++++++-- .github/workflows/linux_riscv.yml | 3 +- 2 files changed, 28 insertions(+), 4 deletions(-) rename .github/workflows/{cleanup_pip_cache.yml => cleanup_caches.yml} (53%) diff --git a/.github/workflows/cleanup_pip_cache.yml b/.github/workflows/cleanup_caches.yml similarity index 53% rename from .github/workflows/cleanup_pip_cache.yml rename to .github/workflows/cleanup_caches.yml index 355d0d68d7cf93..14f3407f6f9573 100644 --- a/.github/workflows/cleanup_pip_cache.yml +++ b/.github/workflows/cleanup_caches.yml @@ -1,12 +1,14 @@ -name: Cleanup PIP caches +name: Cleanup caches on: workflow_dispatch: schedule: # at 00:00 on the 1st day of every month - cron: '0 0 1 * *' + # TODO: need to remove, only for debug: + pull_request: jobs: - Cleanup_PIP_Caches: + Cleanup_PIP: runs-on: aks-linux-2-cores-8gb container: image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 @@ -30,3 +32,26 @@ jobs: run: | echo "Cache info: " du -h -d2 ${PIP_CACHE_PATH} + + Cleanup_CCACHE: + runs-on: aks-linux-2-cores-8gb + container: + image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 + volumes: + - /mount:/mount + env: + CCACHE_PATH: /mount/caches/ccache/ubuntu22_riscv64 + + steps: + - name: Checkout cach action + uses: actions/checkout@v4 + with: + sparse-checkout: .github/actions/cache + + - name: Cleanup ccache + uses: ./.github/actions/cache/cleanup + with: + cache-size: 10 + max-cache-size: 50 + cache-path: ${{ env.CCACHE_PATH }} + key: '*' diff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.yml index 87ac7c117e8d87..394f0bcdacab98 100644 --- a/.github/workflows/linux_riscv.yml +++ b/.github/workflows/linux_riscv.yml @@ -96,10 +96,9 @@ jobs: max-cache-size: 50 cache-path: ${{ env.CCACHE_REMOTE_DIR }} path: ${{ env.CCACHE_DIR }} - key: ${{ runner.os }}-${{ runner.arch }}-${{ github.ref_name == 'master' && '' || github.event.number }}ccache-${{ github.sha }} + key: ${{ runner.os }}-${{ runner.arch }}-ccache-${{ github.sha }} restore-keys: | ${{ runner.os }}-${{ runner.arch }}-ccache - ${{ runner.os }}-${{ runner.arch }}-${{ github.event.number }}ccache - name: Init submodules for non-Conan dependencies run: |