From 8eb9ab80005b5ccf2a638dae1f728e2794747e38 Mon Sep 17 00:00:00 2001
From: Vincent <magicdroidx@gmail.com>
Date: Fri, 3 Jan 2025 21:01:48 +0000
Subject: [PATCH] ci: use conan cache when building portable windows build

---
 .github/workflows/wheel.yml            |  4 ++--
 .github/workflows/windows-portable.yml | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml
index 11ba1ba93..444730a58 100644
--- a/.github/workflows/wheel.yml
+++ b/.github/workflows/wheel.yml
@@ -35,9 +35,9 @@ jobs:
         uses: actions/cache@v4
         with:
           path: ~/.conan2
-          key: ${{ runner.os }}-conan-${{ matrix.build_type }}-${{ hashFiles('conanfile.py') }}
+          key: ${{ runner.os }}-conan-RelWithDebInfo-${{ hashFiles('conanfile.py') }}
           restore-keys: |
-            ${{ runner.os }}-conan-${{ matrix.build_type }}-
+            ${{ runner.os }}-conan-RelWithDebInfo-
             ${{ runner.os }}-conan-
             ${{ runner.os }}-
 
diff --git a/.github/workflows/windows-portable.yml b/.github/workflows/windows-portable.yml
index dea71f280..2102f1a0e 100644
--- a/.github/workflows/windows-portable.yml
+++ b/.github/workflows/windows-portable.yml
@@ -24,6 +24,16 @@ jobs:
         with:
           fetch-depth: 0
 
+      - name: Cache Conan
+        uses: actions/cache@v4
+        with:
+          path: ~/.conan2
+          key: ${{ runner.os }}-conan-RelWithDebInfo-${{ hashFiles('conanfile.py') }}
+          restore-keys: |
+            ${{ runner.os }}-conan-RelWithDebInfo-
+            ${{ runner.os }}-conan-
+            ${{ runner.os }}-
+
       - name: Set up MSVC
         uses: ilammy/msvc-dev-cmd@v1
         with: