From 4faf0c762e18cd79257277dc5f9b3e84c2425c7b Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Mon, 14 Oct 2024 18:30:16 +0300 Subject: [PATCH 1/2] try to speedup cache --- .github/workflows/analyzers.yml | 4 ++-- .github/workflows/ci v2.yml | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 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..69988b761 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 From d372d794b4bb066f72447737dcc3d08eb958dbc4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:31:44 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/ci v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 69988b761..d8d4c9496 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -63,7 +63,7 @@ jobs: 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: |