9696 id : opencv-cache
9797 uses : actions/cache/restore@v5
9898 with :
99- path : |
100- ${{ github.workspace }}/opencv_artifacts/include
101- ${{ github.workspace }}/opencv_artifacts/lib64
99+ path : ${{ github.workspace }}/opencv_artifacts
102100 key : opencv-${{ env.OPENCV_VERSION }}-manylinux2_28-full-${{ hashFiles('vcpkg.json', 'cmake/opencv_build_options.cmake', 'docker/manylinux/build_static_deps.sh') }}
103101
104102 - name : Configure OpenCV (full)
@@ -150,14 +148,25 @@ jobs:
150148 run : |
151149 cmake --build opencv/build -j 3
152150 cmake --install opencv/build
151+ echo "=== opencv_artifacts layout ==="
152+ find ${GITHUB_WORKSPACE}/opencv_artifacts -name 'OpenCVConfig.cmake' -o -name '*.pc' | head -20
153+ du -sh ${GITHUB_WORKSPACE}/opencv_artifacts/*/
153154
155+ - name : Validate OpenCV install (full)
156+ if : steps.opencv-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
157+ run : |
158+ config=$(find ${GITHUB_WORKSPACE}/opencv_artifacts -name 'OpenCVConfig.cmake' | head -1)
159+ if [ -z "$config" ]; then
160+ echo "ERROR: OpenCVConfig.cmake not found under opencv_artifacts - install is incomplete."
161+ exit 1
162+ fi
163+ echo "Found: $config"
164+ shell : bash
154165 - name : Save OpenCV cache (full)
155166 if : steps.opencv-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
156167 uses : actions/cache/save@v5
157168 with :
158- path : |
159- ${{ github.workspace }}/opencv_artifacts/include
160- ${{ github.workspace }}/opencv_artifacts/lib64
169+ path : ${{ github.workspace }}/opencv_artifacts
161170 key : opencv-${{ env.OPENCV_VERSION }}-manylinux2_28-full-${{ hashFiles('vcpkg.json', 'cmake/opencv_build_options.cmake', 'docker/manylinux/build_static_deps.sh') }}
162171
163172 # -- OpenCvSharpExtern ---------------------------------------------------
@@ -208,9 +217,7 @@ jobs:
208217 id : opencv-cache
209218 uses : actions/cache/restore@v5
210219 with :
211- path : |
212- ${{ github.workspace }}/opencv_artifacts_slim/include
213- ${{ github.workspace }}/opencv_artifacts_slim/lib64
220+ path : ${{ github.workspace }}/opencv_artifacts_slim
214221 key : opencv-${{ env.OPENCV_VERSION }}-manylinux2_28-slim-${{ hashFiles('cmake/opencv_build_options_slim.cmake') }}
215222
216223 - name : Configure OpenCV (slim)
@@ -231,14 +238,25 @@ jobs:
231238 run : |
232239 cmake --build opencv/build -j 3
233240 cmake --install opencv/build
241+ echo "=== opencv_artifacts_slim layout ==="
242+ find ${GITHUB_WORKSPACE}/opencv_artifacts_slim -name 'OpenCVConfig.cmake' -o -name '*.pc' | head -20
243+ du -sh ${GITHUB_WORKSPACE}/opencv_artifacts_slim/*/
234244
235245 - name : Save OpenCV cache (slim)
246+ if : steps.opencv-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
247+ run : |
248+ config=$(find ${GITHUB_WORKSPACE}/opencv_artifacts_slim -name 'OpenCVConfig.cmake' | head -1)
249+ if [ -z "$config" ]; then
250+ echo "ERROR: OpenCVConfig.cmake not found under opencv_artifacts_slim - install is incomplete."
251+ exit 1
252+ fi
253+ echo "Found: $config"
254+ shell : bash
255+ - name : Save OpenCV cache (slim) - upload
236256 if : steps.opencv-cache.outputs.cache-hit != 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
237257 uses : actions/cache/save@v5
238258 with :
239- path : |
240- ${{ github.workspace }}/opencv_artifacts_slim/include
241- ${{ github.workspace }}/opencv_artifacts_slim/lib64
259+ path : ${{ github.workspace }}/opencv_artifacts_slim
242260 key : opencv-${{ env.OPENCV_VERSION }}-manylinux2_28-slim-${{ hashFiles('cmake/opencv_build_options_slim.cmake') }}
243261
244262 - name : Build OpenCvSharpExtern (slim)
0 commit comments