@@ -17,6 +17,7 @@ variables:
17
17
LINUX_DPCPP_COMPONENTS : intel-oneapi-dpcpp-cpp-compiler
18
18
MACOS_CPP_COMPONENTS : intel.oneapi.mac.cpp-compiler
19
19
MACOS_FORTRAN_COMPONENTS : intel.oneapi.mac.ifort-compiler
20
+ RELEASE : 2021.1-beta10
20
21
21
22
.shared_windows_runners :
22
23
tags :
@@ -28,9 +29,32 @@ build_windows_cpp:
28
29
extends :
29
30
- .shared_windows_runners
30
31
stage : build
32
+ cache :
33
+ key :
34
+ prefix : install-${RELEASE}-${WINDOWS_CPP_COMPONENTS}-compiler
35
+ files :
36
+ - scripts/cache_exclude_windows.ps1
37
+ paths :
38
+ - cache # GitLab CI cannot cache files outside build directory
39
+ before_script : # Restoring install directory from 'cache' folder
40
+ - |
41
+ if(Test-Path cache) {
42
+ New-Item -ItemType "directory" -Path "C:\Program Files (x86)\Intel\oneAPI" -Force
43
+ Move-Item -Path cache\compiler -Destination "C:\Program Files (x86)\Intel\oneAPI"
44
+ } else {
45
+ scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_CPP_COMPONENTS
46
+ }
31
47
script :
32
- - scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_CPP_COMPONENTS
33
48
- scripts/build_windows.bat c++ 2019_build_tools
49
+ after_script : # Moving install directory into 'cache' folder inside build directory
50
+ - |
51
+ if(!(Test-Path cache)) {
52
+ scripts/cache_exclude_windows.ps1
53
+ New-Item -ItemType "directory" -Path "cache"
54
+ }
55
+ # "push-pull" is the default cache policy, so cache folder needs to be setup in every run.
56
+ # consider setting "policy: pull" once the cache is warm.
57
+ Move-Item -Path "C:\Program Files (x86)\Intel\oneAPI\compiler" -Destination "cache"
34
58
35
59
# Delete the following if you don't want to save install logs
36
60
artifacts :
@@ -45,9 +69,30 @@ build_windows_fortran:
45
69
extends :
46
70
- .shared_windows_runners
47
71
stage : build
72
+ cache :
73
+ key :
74
+ prefix : install-${RELEASE}-${WINDOWS_FORTRAN_COMPONENTS}-compiler
75
+ files :
76
+ - scripts/cache_exclude_windows.ps1
77
+ paths :
78
+ - cache
79
+ before_script :
80
+ - |
81
+ if(Test-Path cache) {
82
+ New-Item -ItemType "directory" -Path "C:\Program Files (x86)\Intel\oneAPI" -Force
83
+ Move-Item -Path cache\compiler -Destination "C:\Program Files (x86)\Intel\oneAPI"
84
+ } else {
85
+ scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS
86
+ }
48
87
script :
49
- - scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS
50
88
- scripts/build_windows.bat fortran 2019_build_tools
89
+ after_script :
90
+ - |
91
+ if(!(Test-Path cache)) {
92
+ scripts/cache_exclude_windows.ps1
93
+ New-Item -ItemType "directory" -Path "cache"
94
+ }
95
+ Move-Item -Path "C:\Program Files (x86)\Intel\oneAPI\compiler" -Destination "cache"
51
96
52
97
# Delete the following if you don't want to save install logs
53
98
artifacts :
@@ -62,10 +107,34 @@ build_windows_dpcpp:
62
107
extends :
63
108
- .shared_windows_runners
64
109
stage : build
110
+ cache :
111
+ key :
112
+ prefix : install-${RELEASE}-${WINDOWS_DPCPP_COMPONENTS}-compiler-tbb-opencl
113
+ files :
114
+ - scripts/cache_exclude_windows.ps1
115
+ paths :
116
+ - cache
117
+ before_script :
118
+ - |
119
+ if(Test-Path cache) {
120
+ New-Item -ItemType "directory" -Path "C:\Program Files (x86)\Intel\oneAPI" -Force
121
+ Move-Item -Path cache\compiler -Destination "C:\Program Files (x86)\Intel\oneAPI"
122
+ Move-Item -Path cache\tbb -Destination "C:\Program Files (x86)\Intel\oneAPI"
123
+ Move-Item -Path cache\OpenCL.dll -Destination "C:\Windows\System32"
124
+ } else {
125
+ scripts/install_windows.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_COMPONENTS
126
+ }
65
127
script :
66
- - scripts/install_windows.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_COMPONENTS
67
128
- scripts/build_windows.bat dpc++ 2019_build_tools
68
-
129
+ after_script :
130
+ - |
131
+ if(!(Test-Path cache)) {
132
+ scripts/cache_exclude_windows.ps1
133
+ New-Item -ItemType "directory" -Path "cache"
134
+ }
135
+ Move-Item -Path "C:\Program Files (x86)\Intel\oneAPI\compiler" -Destination "cache"
136
+ Move-Item -Path "C:\Program Files (x86)\Intel\oneAPI\tbb" -Destination "cache"
137
+ Move-Item -Path "C:\Windows\System32\OpenCL.dll" -Destination "cache"
69
138
# Delete the following if you don't want to save install logs
70
139
artifacts :
71
140
when : always
@@ -78,26 +147,97 @@ build_windows_dpcpp:
78
147
build_linux_apt_cpp :
79
148
image : ubuntu:latest
80
149
stage : build
81
- script :
150
+ cache :
151
+ key : # GitLab CI doesn't support steps before cache is restored, i.e. only static cache keys are supported.
152
+ prefix : install-${RELEASE}-${LINUX_CPP_COMPONENTS}-compiler
153
+ files :
154
+ - scripts/cache_exclude_linux_no_sudo.sh
155
+ paths :
156
+ - cache
157
+ before_script :
82
158
- . scripts/install_prerequisites_linux_apt_no_sudo.sh
83
- - . scripts/setup_apt_repo_linux_no_sudo.sh
84
- - . scripts/install_linux_apt_no_sudo.sh $LINUX_CPP_COMPONENTS
159
+ - |
160
+ if [[ -d cache ]]
161
+ then
162
+ mkdir -p /opt/intel/oneapi
163
+ mv cache/compiler /opt/intel/oneapi/
164
+ else
165
+ . scripts/setup_apt_repo_linux_no_sudo.sh
166
+ . scripts/install_linux_apt_no_sudo.sh $LINUX_CPP_COMPONENTS
167
+ fi
168
+ script :
85
169
- scripts/build_linux.sh c++
170
+ after_script :
171
+ - |
172
+ if [[ ! -d cache ]]
173
+ then
174
+ . scripts/cache_exclude_linux_no_sudo.sh
175
+ mkdir cache
176
+ fi
177
+ mv /opt/intel/oneapi/compiler cache
86
178
87
179
build_linux_apt_fortran :
88
180
image : ubuntu:latest
89
181
stage : build
90
- script :
182
+ cache :
183
+ key :
184
+ prefix : install-${RELEASE}-${LINUX_FORTRAN_COMPONENTS}-compiler
185
+ files :
186
+ - scripts/cache_exclude_linux_no_sudo.sh
187
+ paths :
188
+ - cache
189
+ before_script :
91
190
- . scripts/install_prerequisites_linux_apt_no_sudo.sh
92
- - . scripts/setup_apt_repo_linux_no_sudo.sh
93
- - . scripts/install_linux_apt_no_sudo.sh $LINUX_FORTRAN_COMPONENTS
191
+ - |
192
+ if [[ -d cache ]]
193
+ then
194
+ mkdir -p /opt/intel/oneapi
195
+ mv cache/compiler /opt/intel/oneapi/
196
+ else
197
+ . scripts/setup_apt_repo_linux_no_sudo.sh
198
+ . scripts/install_linux_apt_no_sudo.sh $LINUX_FORTRAN_COMPONENTS
199
+ fi
200
+ script :
94
201
- scripts/build_linux.sh fortran
202
+ after_script :
203
+ - |
204
+ if [[ ! -d cache ]]
205
+ then
206
+ . scripts/cache_exclude_linux_no_sudo.sh
207
+ mkdir cache
208
+ fi
209
+ mv /opt/intel/oneapi/compiler cache
95
210
96
211
build_linux_apt_dpcpp :
97
212
image : ubuntu:latest
98
213
stage : build
99
- script :
214
+ cache :
215
+ key :
216
+ prefix : install-${RELEASE}-${LINUX_DPCPP_COMPONENTS}-compiler-tbb
217
+ files :
218
+ - scripts/cache_exclude_linux_no_sudo.sh
219
+ paths :
220
+ - cache
221
+ before_script :
100
222
- . scripts/install_prerequisites_linux_apt_no_sudo.sh
101
- - . scripts/setup_apt_repo_linux_no_sudo.sh
102
- - . scripts/install_linux_apt_no_sudo.sh $LINUX_DPCPP_COMPONENTS
223
+ - |
224
+ if [[ -d cache ]]
225
+ then
226
+ mkdir -p /opt/intel/oneapi
227
+ mv cache/compiler /opt/intel/oneapi/
228
+ mv cache/tbb /opt/intel/oneapi/
229
+ else
230
+ . scripts/setup_apt_repo_linux_no_sudo.sh
231
+ . scripts/install_linux_apt_no_sudo.sh $LINUX_DPCPP_COMPONENTS
232
+ fi
233
+ script :
103
234
- scripts/build_linux.sh dpc++
235
+ after_script :
236
+ - |
237
+ if [[ ! -d cache ]]
238
+ then
239
+ . scripts/cache_exclude_linux_no_sudo.sh
240
+ mkdir cache
241
+ fi
242
+ mv /opt/intel/oneapi/compiler cache
243
+ mv /opt/intel/oneapi/tbb cache
0 commit comments