@@ -43,10 +43,19 @@ jobs:
43
43
pool :
44
44
vmImage : ' windows-latest'
45
45
steps :
46
+ - task : Cache@2
47
+ inputs :
48
+ path : C:\Program Files (x86)\Intel\oneAPI\compiler
49
+ key : ' "install" | "$(WINDOWS_HPCKIT_URL)" | "$(WINDOWS_CPP_COMPONENTS)" | compiler | scripts/cache_exclude_windows.sh'
50
+ cacheHitVar : CACHE_RESTORED
46
51
- script : scripts/install_windows.bat $(WINDOWS_HPCKIT_URL) $(WINDOWS_CPP_COMPONENTS)
47
52
displayName : install
53
+ condition : ne(variables.CACHE_RESTORED, 'true')
48
54
- script : scripts/build_windows.bat c++
49
55
displayName : build
56
+ - bash : scripts/cache_exclude_windows.sh
57
+ displayName : exclude unused files from cache
58
+ condition : ne(variables.CACHE_RESTORED, 'true')
50
59
51
60
# Delete the following if you don't want to save install logs
52
61
- task : CopyFiles@2
@@ -68,10 +77,19 @@ jobs:
68
77
pool :
69
78
vmImage : ' windows-latest'
70
79
steps :
80
+ - task : Cache@2
81
+ inputs :
82
+ path : C:\Program Files (x86)\Intel\oneAPI\compiler
83
+ key : ' "install" | "$(WINDOWS_HPCKIT_URL)" | "$(WINDOWS_FORTRAN_COMPONENTS)" | "compiler" | scripts/cache_exclude_windows.sh'
84
+ cacheHitVar : CACHE_RESTORED
71
85
- script : scripts/install_windows.bat $(WINDOWS_HPCKIT_URL) $(WINDOWS_FORTRAN_COMPONENTS)
72
86
displayName : install
87
+ condition : ne(variables.CACHE_RESTORED, 'true')
73
88
- script : scripts/build_windows.bat fortran
74
89
displayName : build
90
+ - bash : scripts/cache_exclude_windows.sh
91
+ displayName : exclude unused files from cache
92
+ condition : ne(variables.CACHE_RESTORED, 'true')
75
93
76
94
# Delete the following if you don't want to save install logs
77
95
- task : CopyFiles@2
@@ -93,10 +111,27 @@ jobs:
93
111
pool :
94
112
vmImage : ' windows-latest'
95
113
steps :
114
+ - task : Cache@2 # multiple paths per cache not supported yet. See https://github.com/microsoft/azure-pipelines-agent/pull/2834
115
+ inputs :
116
+ path : C:\Program Files (x86)\Intel\oneAPI\compiler
117
+ key : ' "install" | "$(WINDOWS_BASEKIT_URL)" | "$(WINDOWS_DPCPP_COMPONENTS)" | "compiler" | scripts/cache_exclude_windows.sh'
118
+ - task : Cache@2
119
+ inputs :
120
+ path : C:\Program Files (x86)\Intel\oneAPI\tbb
121
+ key : ' "install" | "$(WINDOWS_BASEKIT_URL)" | "$(WINDOWS_DPCPP_COMPONENTS)" | "tbb" | scripts/cache_exclude_windows.sh'
122
+ - task : Cache@2
123
+ inputs :
124
+ path : C:\Windows\System32\OpenCL.dll
125
+ key : ' "install" | "$(WINDOWS_BASEKIT_URL)" | "$(WINDOWS_DPCPP_COMPONENTS)" | "opencl" | scripts/cache_exclude_windows.sh'
126
+ cacheHitVar : CACHE_RESTORED
96
127
- script : scripts/install_windows.bat $(WINDOWS_BASEKIT_URL) $(WINDOWS_DPCPP_COMPONENTS)
97
128
displayName : install
129
+ condition : ne(variables.CACHE_RESTORED, 'true')
98
130
- script : scripts/build_windows.bat dpc++
99
131
displayName : build
132
+ - bash : scripts/cache_exclude_windows.sh
133
+ displayName : exclude unused files from cache
134
+ condition : ne(variables.CACHE_RESTORED, 'true')
100
135
101
136
# Delete the following if you don't want to save install logs
102
137
- task : CopyFiles@2
@@ -120,32 +155,69 @@ jobs:
120
155
steps :
121
156
- script : scripts/setup_apt_repo_linux.sh
122
157
displayName : setup apt repo
158
+ - script : scripts/apt_depends.sh $LINUX_CPP_COMPONENTS | tee depends.txt
159
+ displayName : collect versioned dependencies of apt packages
160
+ - task : Cache@2
161
+ inputs :
162
+ path : /opt/intel/oneapi/compiler
163
+ key : ' "install" | "$(LINUX_CPP_COMPONENTS)" | depends.txt | "compiler" | scripts/cache_exclude_linux.sh'
164
+ cacheHitVar : CACHE_RESTORED
123
165
- script : scripts/install_linux_apt.sh $(LINUX_CPP_COMPONENTS)
124
166
displayName : install
167
+ condition : ne(variables.CACHE_RESTORED, 'true')
125
168
- script : scripts/build_linux.sh c++
126
169
displayName : build
170
+ - bash : scripts/cache_exclude_linux.sh
171
+ displayName : exclude unused files from cache
172
+ condition : ne(variables.CACHE_RESTORED, 'true')
127
173
128
174
- job : build_linux_apt_fortran
129
175
pool :
130
176
vmImage : ' ubuntu-latest'
131
177
steps :
132
178
- script : scripts/setup_apt_repo_linux.sh
133
179
displayName : setup apt repo
180
+ - script : scripts/apt_depends.sh $LINUX_CPP_COMPONENTS | tee depends.txt
181
+ displayName : collect versioned dependencies of apt packages
182
+ - task : Cache@2
183
+ inputs :
184
+ path : /opt/intel/oneapi/compiler
185
+ key : ' "install" | "$(LINUX_FORTRAN_COMPONENTS)" | depends.txt | "compiler" | scripts/cache_exclude_linux.sh'
186
+ cacheHitVar : CACHE_RESTORED
134
187
- script : scripts/install_linux_apt.sh $(LINUX_FORTRAN_COMPONENTS)
135
188
displayName : install
189
+ condition : ne(variables.CACHE_RESTORED, 'true')
136
190
- script : scripts/build_linux.sh fortran
137
191
displayName : build
192
+ - bash : scripts/cache_exclude_linux.sh
193
+ displayName : exclude unused files from cache
194
+ condition : ne(variables.CACHE_RESTORED, 'true')
138
195
139
196
- job : build_linux_apt_dpcpp
140
197
pool :
141
198
vmImage : ' ubuntu-latest'
142
199
steps :
143
200
- script : scripts/setup_apt_repo_linux.sh
144
201
displayName : setup apt repo
202
+ - script : scripts/apt_depends.sh $LINUX_CPP_COMPONENTS | tee depends.txt
203
+ displayName : collect versioned dependencies of apt packages
204
+ - task : Cache@2
205
+ inputs :
206
+ path : /opt/intel/oneapi/compiler
207
+ key : ' "install" | "$(LINUX_DPCPP_COMPONENTS)" | depends.txt | "compiler" | scripts/cache_exclude_linux.sh'
208
+ - task : Cache@2
209
+ inputs :
210
+ path : /opt/intel/oneapi/tbb
211
+ key : ' "install" | "$(LINUX_DPCPP_COMPONENTS)" | depends.txt | "tbb" | scripts/cache_exclude_linux.sh'
212
+ cacheHitVar : CACHE_RESTORED
145
213
- script : scripts/install_linux_apt.sh $(LINUX_DPCPP_COMPONENTS)
146
214
displayName : install
215
+ condition : ne(variables.CACHE_RESTORED, 'true')
147
216
- script : scripts/build_linux.sh dpc++
148
217
displayName : build
218
+ - bash : scripts/cache_exclude_linux.sh
219
+ displayName : exclude unused files from cache
220
+ condition : ne(variables.CACHE_RESTORED, 'true')
149
221
150
222
- job : build_linux_container_cpp
151
223
pool :
@@ -181,8 +253,18 @@ jobs:
181
253
pool :
182
254
vmImage : ' macOS-latest'
183
255
steps :
256
+ - script : |
257
+ sudo mkdir -p /opt/intel
258
+ sudo chown $USER /opt/intel
259
+ displayName: prepare for cache restore
260
+ - task : Cache@2
261
+ inputs :
262
+ path : /opt/intel/oneapi
263
+ key : ' "install" | "$(MACOS_HPCKIT_URL)" | "$(MACOS_CPP_COMPONENTS)"'
264
+ cacheHitVar : CACHE_RESTORED
184
265
- script : scripts/install_macos.sh $(MACOS_HPCKIT_URL) $(MACOS_CPP_COMPONENTS)
185
266
displayName : install
267
+ condition : ne(variables.CACHE_RESTORED, 'true')
186
268
- script : scripts/build_macos.sh c++
187
269
displayName : build
188
270
@@ -205,8 +287,18 @@ jobs:
205
287
pool :
206
288
vmImage : ' macOS-latest'
207
289
steps :
290
+ - script : |
291
+ sudo mkdir -p /opt/intel
292
+ sudo chown $USER /opt/intel
293
+ displayName: prepare for cache restore
294
+ - task : Cache@2
295
+ inputs :
296
+ path : /opt/intel/oneapi
297
+ key : ' "install" | "$(MACOS_HPCKIT_URL)" | "$(MACOS_FORTRAN_COMPONENTS)"'
298
+ cacheHitVar : CACHE_RESTORED
208
299
- script : scripts/install_macos.sh $(MACOS_HPCKIT_URL) $(MACOS_FORTRAN_COMPONENTS)
209
300
displayName : install
301
+ condition : ne(variables.CACHE_RESTORED, 'true')
210
302
- script : scripts/build_macos.sh fortran
211
303
displayName : build
212
304
0 commit comments