Skip to content

Commit

Permalink
[GHA] Cleanup ccache shares (openvinotoolkit#23894)
Browse files Browse the repository at this point in the history
### Details:
 - Added job to automatically cleanup compressed caches
 - Disable creation of the cache for each commit in risc-v pipeline

### Tickets:
 - *ticket-id*
  • Loading branch information
mryzhov authored and bbielawx committed Apr 12, 2024
1 parent f76c519 commit 281ce8c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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 * *'

jobs:
Cleanup_PIP_Caches:
Cleanup_PIP:
runs-on: aks-linux-2-cores-8gb
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
Expand All @@ -30,3 +30,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: '*'
5 changes: 2 additions & 3 deletions .github/workflows/linux_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,15 @@ jobs:
id: ccache_restore
uses: ./openvino/.github/actions/cache
with:
save-always: true
save-always: ${{ github.event_name == 'push' && 'true' || 'false' }}
cleanup-always: ${{ github.event_name == 'push' && 'true' || 'false' }}
cache-size: 10
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: |
Expand Down

0 comments on commit 281ce8c

Please sign in to comment.