From b91d7dfe5bb3745147ee3a5f18be8d4f803b0e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigbj=C3=B8rn=20Skj=C3=A6ret?= Date: Sun, 15 Mar 2026 18:58:13 +0100 Subject: [PATCH] ci : only save openvino caches on github-hosted master (#20593) * only save openvino ccache on master * disable toolkit cache if self-hosted * only cache on github-hosted runners * remove toolkit cache [no ci] --- .github/workflows/build-self-hosted.yml | 8 -------- .github/workflows/build.yml | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index eba06b96bc..7c7710fe45 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -222,15 +222,7 @@ jobs: id: checkout uses: actions/checkout@v6 - - name: Use OpenVINO Toolkit Cache - uses: actions/cache@v5 - id: cache-openvino - with: - path: ./openvino_toolkit - key: openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }} - - name: Setup OpenVINO Toolkit - if: steps.cache-openvino.outputs.cache-hit != 'true' uses: ./.github/actions/linux-setup-openvino with: path: ./openvino_toolkit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b60ad993b8..fef08d4c00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -604,10 +604,12 @@ jobs: uses: actions/checkout@v6 - name: ccache + if: runner.environment == 'github-hosted' uses: ggml-org/ccache-action@v1.2.16 with: key: ubuntu-24-openvino-${{ matrix.variant }}-no-preset-v1 evict-old-files: 1d + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - name: Dependencies id: depends @@ -617,6 +619,7 @@ jobs: sudo apt-get install -y ocl-icd-opencl-dev opencl-headers opencl-clhpp-headers intel-opencl-icd - name: Use OpenVINO Toolkit Cache + if: runner.environment == 'github-hosted' uses: actions/cache@v5 id: cache-openvino with: