Skip to content

Commit f34bd79

Browse files
committed
[actions] Cache compiled artifacts between runs
1 parent 04ea94f commit f34bd79

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/build_wheels_windows.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ jobs:
104104
Copy-Item -Path "$CUDNN_PATH/bin/*" -Destination . -Include "*.dll"
105105
shell: pwsh
106106

107+
- name: Cache build artifacts
108+
uses: actions/cache@v3
109+
with:
110+
path: _skbuild
111+
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }}
112+
restore-keys: |
113+
${{ runner.os }}-${{ matrix.python-version }}-
107114
- name: Build a package
108115
# CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
109116
run: |
@@ -112,9 +119,12 @@ jobs:
112119
python -m pip install --upgrade setuptools
113120
python -m pip install cmake==3.24.2
114121
python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
115-
dir
116-
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
117-
shell: cmd
122+
$CI_BUILD = 1
123+
if (Test-Path _skbuild) {
124+
$SKIP_CMAKE = "--skip-cmake"
125+
}
126+
python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir="$PWD\wheelhouse" $SKIP_CMAKE -v
127+
shell: pwsh
118128
- name: Saving all wheels
119129
uses: actions/upload-artifact@v4
120130
with:

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ def _classify_installed_files_override(
457457
expanded_paths = []
458458
for path in paths:
459459
expanded_paths.append([path] if '*' not in path else glob.glob(path))
460-
print(expanded_paths)
461460
for path in expanded_paths:
462461
new_install_relpath = os.path.join(
463462
package_dest_reldir,

0 commit comments

Comments
 (0)