Skip to content

Commit cb97181

Browse files
committed
Fixed caching of OpenCL.dll
1 parent ea48740 commit cb97181

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.azure-pipelines.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,25 @@ jobs:
121121
key: '"install" | "$(WINDOWS_BASEKIT_URL)" | "$(WINDOWS_DPCPP_COMPONENTS)" | "tbb" | scripts/cache_exclude_windows.sh'
122122
- task: Cache@2
123123
inputs:
124-
path: C:\Windows\System32\OpenCL.dll
125-
key: '"install" | "$(WINDOWS_BASEKIT_URL)" | "$(WINDOWS_DPCPP_COMPONENTS)" | "opencl" | scripts/cache_exclude_windows.sh'
124+
path: opencl # caching of individual files is not supported, caching OpenCL.dll in a folder as a workaround.
125+
key: '"install" | "$(WINDOWS_BASEKIT_URL)" | "$(WINDOWS_DPCPP_COMPONENTS)" | "opencl_folder" | scripts/cache_exclude_windows.sh'
126126
cacheHitVar: CACHE_RESTORED
127127
- script: scripts/install_windows.bat $(WINDOWS_BASEKIT_URL) $(WINDOWS_DPCPP_COMPONENTS)
128128
displayName: install
129129
condition: ne(variables.CACHE_RESTORED, 'true')
130+
- bash: cp opencl/OpenCL.dll C:/Windows/System32/
131+
displayName: restore OpenCL.dll from cache
132+
condition: eq(variables.CACHE_RESTORED, 'true')
130133
- script: scripts/build_windows.bat dpc++
131134
displayName: build
132135
- bash: scripts/cache_exclude_windows.sh
133136
displayName: exclude unused files from cache
134137
condition: ne(variables.CACHE_RESTORED, 'true')
138+
- bash: |
139+
mkdir -p opencl
140+
cp C:/Windows/System32/OpenCL.dll opencl/
141+
displayName: copy OpenCL.dll to a folder for caching
142+
condition: ne(variables.CACHE_RESTORED, 'true')
135143
136144
# Delete the following if you don't want to save install logs
137145
- task: CopyFiles@2

0 commit comments

Comments
 (0)