name: 'Milvus Cache'
description: ''
runs:
  using: "composite"
  steps:
  - name: 'Generate CCache Hash'
    env:
      CORE_HASH: ${{ hashFiles( 'internal/core/**/*.cpp', 'internal/core/**/*.cc', 'internal/core/**/*.c', 'internal/core/**/*.h', 'internal/core/**/*.hpp', 'internal/core/**/CMakeLists.txt') }}
    run: |
      echo "corehash=${CORE_HASH}" >> $GITHUB_ENV
      echo "Set CCache hash to ${CORE_HASH}"
    shell: bash
  - name: Mac Cache CCache Volumes
    uses: actions/cache/restore@v4
    with:
      path: /var/tmp/ccache
      key: macos-ccache-${{ env.corehash }}
      restore-keys: macos-ccache-
  - name: Mac Cache Go Mod Volumes
    uses: actions/cache/restore@v4
    with:
      path: ~/go/pkg/mod
      key: macos-go-mod-${{ hashFiles('**/go.sum') }}
      restore-keys: macos-go-mod-
  - name: Mac Cache Conan Packages
    uses: actions/cache/restore@v4
    with:
      path: ~/.conan
      key: macos-conan-${{ hashFiles('internal/core/conanfile.*') }}
      restore-keys: macos-conan-
