From 5c6cf0aa2e5cb5cb48623c588c3bbfb058090f0b Mon Sep 17 00:00:00 2001 From: RobinQu Date: Mon, 1 Apr 2024 10:08:56 +0800 Subject: [PATCH] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ff714fd4..e6473e8a 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -47,15 +47,23 @@ jobs: - name: Create default conan profile run: conan profile detect --force - - uses: actions/cache@v4.0.2 - id: cache-conan + - uses: actions/cache/restore@v4.0.2 + id: resture-conan-cache with: - key: ${{ matrix.os}}-${{ matrix.build_type }}-${{ matrix.cc.tool }} + key: ${{ matrix.os}}-${{ matrix.build_type }}-${{ matrix.cc.tool }}-${{ hashFiles('conanfile.py') }} path: ~/.conan2 - save-always: true - + restore-keys: | + ${{ matrix.os}}-${{ matrix.build_type }}-${{ matrix.cc.tool }}- + - name: Conan install run: conan install conanfile.py --build=missing -s:a compiler.cppstd=20 -s:a build_type=${{ matrix.build_type }} -s:a compiler=${{ matrix.cc.tool }} -s:a compiler.version=${{matrix.cc.ver}} + + - name: Save conan cache + id: save-conan-cache + uses: actions/cache/restore@v4.0.2 + with: + key: ${{ matrix.os}}-${{ matrix.build_type }}-${{ matrix.cc.tool }}-${{ hashFiles('conanfile.py') }} + path: ~/.conan2 - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.