Skip to content

[GHA] Cleanup ccache shares #3

[GHA] Cleanup ccache shares

[GHA] Cleanup ccache shares #3

Workflow file for this run

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:
runs-on: aks-linux-2-cores-8gb
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount:/mount
env:
PIP_CACHE_PATH: /mount/caches/pip
steps:
- name: Pre-Collecting Cache Info
run: |
echo "Cache info: "
du -h -d2 ${PIP_CACHE_PATH}
- name: Cleanup cache
run: |
echo "Delete cache files if they have not been used in over 30 days"
[ ! -z "${PIP_CACHE_PATH}" ] && find ${PIP_CACHE_PATH} ! -type d -atime +30 -delete
- name: Post-Collecting Cache Info
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: '*'