@@ -70,25 +70,14 @@ jobs:
7070 - name : Install Conan
7171 run : pip install conan==2.*
7272
73- - name : Cache Conan Dependencies (Ubuntu Latest)
74- if : ${{ matrix.os == 'ubuntu-latest' }}
73+ - name : Restore Cache Conan Dependencies
7574 id : cache-conan-ubuntu
76- uses : actions/cache@v4
75+ uses : actions/cache/restore@v5
7776 with :
7877 path : /home/runner/.conan2
79- save-always : true
8078 key : conan-${{ runner.os }}-${{ matrix.c_compiler }}-${{ matrix.library_type }}
8179
82- - name : Cache Conan Dependencies (Windows Latest)
83- if : ${{ matrix.os == 'windows-latest' }}
84- id : cache-conan-windows
85- uses : actions/cache@v4
86- with :
87- save-always : true
88- path : C:\Users\runneradmin\.conan2
89- key : conan-${{ runner.os }}-${{ matrix.c_compiler }}-${{ matrix.library_type }}
90-
91- - if : ${{ (matrix.os == 'ubuntu-latest' && steps.cache-conan-ubuntu.outputs.cache-hit != 'true') || (matrix.os == 'windows-latest' && steps.cache-conan-windows.outputs.cache-hit != 'true') }}
80+ - if : ${{ steps.cache-conan-ubuntu.outputs.cache-hit != 'true' }}
9281 name : Create default Conan profile
9382 run : conan profile detect --force
9483
@@ -117,6 +106,14 @@ jobs:
117106 - name : Clean up
118107 run : conan cache clean "*/*"
119108
109+ - name : Save Cache Conan Dependencies
110+ if : always() && steps.cache-conan-ubuntu.outputs.cache-hit != 'true'
111+ id : save-cache-conan-ubuntu
112+ uses : actions/cache/save@v5
113+ with :
114+ path : /home/runner/.conan2
115+ key : ${{ steps.cache-conan-ubuntu.outputs.cache-primary-key }}
116+
120117 - name : Configure CMake
121118 run : cmake --preset conan-release -DMANAPIHTTP_ENABLE_TESTS=ON -DMANAPIHTTP_DISABLE_TRACE_HARD=ON -DMANAPIHTTP_STD_BACKTRACE_DEPENDENCY=OFF
122119
@@ -181,14 +178,12 @@ jobs:
181178 - name : Install Conan
182179 run : pip install conan==2.*
183180
184- - name : Cache Conan Dependencies (Windows Latest)
185- if : ${{ matrix.os == 'windows-latest' }}
181+ - name : Cache Conan Dependencies
186182 id : cache-conan-windows
187- uses : actions/cache@v4
183+ uses : actions/cache/restore@v5
188184 with :
189185 path : C:\Users\runneradmin\.conan2
190186 key : conan-${{ runner.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}-${{ matrix.library_type }}
191- save-always : true
192187
193188 - if : ${{ (matrix.os == 'ubuntu-latest' && steps.cache-conan-ubuntu.outputs.cache-hit != 'true') || (matrix.os == 'windows-latest' && steps.cache-conan-windows.outputs.cache-hit != 'true') }}
194189 name : Create default Conan profile
@@ -207,6 +202,15 @@ jobs:
207202 - name : Clean up
208203 run : conan cache clean "*/*"
209204
205+
206+ - name : Save Cache Conan Dependencies
207+ id : save-cache-conan-windows
208+ uses : actions/cache/save@v5
209+ if : always() && steps.cache-conan-windows.outputs.cache-hit != 'true'
210+ with :
211+ path : C:\Users\runneradmin\.conan2
212+ key : ${{ steps.cache-conan-windows.outputs.cache-primary-key }}
213+
210214 - name : Configure CMake
211215 run : cmake --preset conan-default -DMANAPIHTTP_ENABLE_TESTS=ON -DMANAPIHTTP_DISABLE_TRACE_HARD=ON -DMANAPIHTTP_STD_BACKTRACE_DEPENDENCY=OFF -DMANAPIHTTP_CPPTRACE_DEPENDENCY=ON
212216
0 commit comments