From f9662b4051a1fe4eda3384bdd63749b82cdc9ed9 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Mon, 14 Oct 2024 19:42:45 +0300 Subject: [PATCH] try to speedup cache (#663) * try to speedup cache * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/analyzers.yml | 4 ++-- .github/workflows/ci v2.yml | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/analyzers.yml b/.github/workflows/analyzers.yml index eaa755a01..b75298cf1 100644 --- a/.github/workflows/analyzers.yml +++ b/.github/workflows/analyzers.yml @@ -39,7 +39,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }} + key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }} restore-keys: deps-ci-ubuntu-clang-Release - name: conan detect profile @@ -112,7 +112,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }} + key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }} restore-keys: deps-ci-ubuntu-clang-Release - name: conan detect profile diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 480172004..d8d4c9496 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -53,20 +53,24 @@ jobs: - name: get conan uses: turtlebrowser/get-conan@main - - name: cache deps + - name: check cache uses: actions/cache@v4 + id: check_cache with: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }} + key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }} restore-keys: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }} + lookup-only: true - name: conan detect profile + if: steps.check_cache.outputs.cache-hit != 'true' || github.event_name == 'schedule' run: | conan profile detect --force - name: Run CMake + if: steps.check_cache.outputs.cache-hit != 'true' || github.event_name == 'schedule' uses: lukka/run-cmake@v10 with: configurePreset: ${{ matrix.config.name }}-tests @@ -110,7 +114,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }} + key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }} restore-keys: deps-ci-ubuntu-clang-Release - name: conan detect profile @@ -187,7 +191,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }} + key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }} restore-keys: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }} - name: conan detect profile