forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.46 KB
/
cleanup_caches.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Cleanup caches
on:
workflow_dispatch:
schedule:
# at 00:00 on the 1st day of every month
- cron: '0 0 1 * *'
permissions: read-all
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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: '.'