Skip to content

Commit 2e4fa1a

Browse files
committed
[actions] Ensure cache is not used when doing rolling builds
1 parent 9523373 commit 2e4fa1a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/build_wheels_windows.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
type: boolean
2626
default: true
2727
rolling_build:
28-
description: "Use latest commit from upstream OpenCV repo."
28+
description: "Use latest commit from upstream OpenCV repo. Cache settings will be ignored."
2929
required: false
3030
type: boolean
3131
default: false
@@ -117,12 +117,9 @@ jobs:
117117
Copy-Item -Path "$CUDNN_PATH/bin/*" -Destination . -Include "*.dll"
118118
shell: pwsh
119119

120-
# TODO: This isn't the correct cache key since it relies on the CMake options we build with.
121-
# This is good enough for now though to cache build artifacts; we can manually skip restoring
122-
# the cache to rebuild it.
123120
- name: Restore build artifacts
124121
uses: actions/cache/restore@v3
125-
if: ${{ inputs.restore_build_cache }}
122+
if: ${{ inputs.restore_build_cache && !inputs.rolling_build }}
126123
with:
127124
path: _skbuild
128125
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }}
@@ -146,7 +143,7 @@ jobs:
146143

147144
- name: Save build artifacts to cache
148145
uses: actions/cache/save@v3
149-
if: ${{ inputs.save_build_cache }}
146+
if: ${{ inputs.save_build_cache && !inputs.rolling_build }}
150147
with:
151148
path: _skbuild
152149
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }}

0 commit comments

Comments
 (0)