Skip to content

Commit 1c9d78c

Browse files
committed
Fixed cache_exclude scripts to reduce the cache size
1 parent a900734 commit 1c9d78c

File tree

8 files changed

+52
-44
lines changed

8 files changed

+52
-44
lines changed

.azure-pipelines.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
condition: ne(variables.CACHE_RESTORED, 'true')
5656
- script: scripts/build_windows.bat c++ - $(ONEAPI_RELEASE)
5757
displayName: build
58-
- bash: scripts/cache_exclude_windows.sh
58+
- bash: scripts/cache_exclude_windows.sh $(ONEAPI_RELEASE)
5959
displayName: exclude unused files from cache
6060
condition: ne(variables.CACHE_RESTORED, 'true')
6161

@@ -89,7 +89,7 @@ jobs:
8989
condition: ne(variables.CACHE_RESTORED, 'true')
9090
- script: scripts/build_windows.bat fortran - $(ONEAPI_RELEASE)
9191
displayName: build
92-
- bash: scripts/cache_exclude_windows.sh
92+
- bash: scripts/cache_exclude_windows.sh $(ONEAPI_RELEASE)
9393
displayName: exclude unused files from cache
9494
condition: ne(variables.CACHE_RESTORED, 'true')
9595

@@ -134,7 +134,7 @@ jobs:
134134
condition: eq(variables.CACHE_RESTORED, 'true')
135135
- script: scripts/build_windows.bat dpc++ - $(ONEAPI_RELEASE)
136136
displayName: build
137-
- bash: scripts/cache_exclude_windows.sh
137+
- bash: scripts/cache_exclude_windows.sh $(ONEAPI_RELEASE)
138138
displayName: exclude unused files from cache
139139
condition: ne(variables.CACHE_RESTORED, 'true')
140140
- bash: |
@@ -177,7 +177,7 @@ jobs:
177177
condition: ne(variables.CACHE_RESTORED, 'true')
178178
- script: scripts/build_linux.sh c++ $(ONEAPI_RELEASE)
179179
displayName: build
180-
- bash: scripts/cache_exclude_linux.sh
180+
- bash: scripts/cache_exclude_linux.sh $(ONEAPI_RELEASE)
181181
displayName: exclude unused files from cache
182182
condition: ne(variables.CACHE_RESTORED, 'true')
183183

@@ -199,7 +199,7 @@ jobs:
199199
condition: ne(variables.CACHE_RESTORED, 'true')
200200
- script: scripts/build_linux.sh fortran $(ONEAPI_RELEASE)
201201
displayName: build
202-
- bash: scripts/cache_exclude_linux.sh
202+
- bash: scripts/cache_exclude_linux.sh $(ONEAPI_RELEASE)
203203
displayName: exclude unused files from cache
204204
condition: ne(variables.CACHE_RESTORED, 'true')
205205

@@ -225,7 +225,7 @@ jobs:
225225
condition: ne(variables.CACHE_RESTORED, 'true')
226226
- script: scripts/build_linux.sh dpc++ $(ONEAPI_RELEASE)
227227
displayName: build
228-
- bash: scripts/cache_exclude_linux.sh
228+
- bash: scripts/cache_exclude_linux.sh $(ONEAPI_RELEASE)
229229
displayName: exclude unused files from cache
230230
condition: ne(variables.CACHE_RESTORED, 'true')
231231

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
command: scripts/build_windows.bat c++ 2017_build_tools << pipeline.parameters.ONEAPI_RELEASE >>
6565
- run:
6666
name: exclude unused files from cache
67-
command: scripts/cache_exclude_windows.sh
67+
command: scripts/cache_exclude_windows.sh << pipeline.parameters.ONEAPI_RELEASE >>
6868
- save_cache:
6969
key: install-<< pipeline.parameters.WINDOWS_HPCKIT_URL >>-<< pipeline.parameters.WINDOWS_CPP_COMPONENTS >>-compiler-{{ checksum "scripts/cache_exclude_windows.sh" }}
7070
paths:
@@ -98,7 +98,7 @@ jobs:
9898
command: scripts/build_windows.bat fortran 2017_build_tools << pipeline.parameters.ONEAPI_RELEASE >>
9999
- run:
100100
name: exclude unused files from cache
101-
command: scripts/cache_exclude_windows.sh
101+
command: scripts/cache_exclude_windows.sh << pipeline.parameters.ONEAPI_RELEASE >>
102102
- save_cache:
103103
key: install-<< pipeline.parameters.WINDOWS_HPCKIT_URL >>-<< pipeline.parameters.WINDOWS_FORTRAN_COMPONENTS >>-compiler-{{ checksum "scripts/cache_exclude_windows.sh" }}
104104
paths:
@@ -132,7 +132,7 @@ jobs:
132132
command: scripts/build_windows.bat dpc++ 2017_build_tools << pipeline.parameters.ONEAPI_RELEASE >>
133133
- run:
134134
name: exclude unused files from cache
135-
command: scripts/cache_exclude_windows.sh
135+
command: scripts/cache_exclude_windows.sh << pipeline.parameters.ONEAPI_RELEASE >>
136136
- save_cache:
137137
key: install-<< pipeline.parameters.WINDOWS_BASEKIT_URL >>-<< pipeline.parameters.WINDOWS_DPCPP_COMPONENTS >>-compiler-tbb-opencl-{{ checksum "scripts/cache_exclude_windows.sh" }}
138138
paths:
@@ -176,7 +176,7 @@ jobs:
176176
command: scripts/build_linux.sh c++ << pipeline.parameters.ONEAPI_RELEASE >>
177177
- run:
178178
name: exclude unused files from cache
179-
command: . scripts/cache_exclude_linux_no_sudo.sh
179+
command: . scripts/cache_exclude_linux_no_sudo.sh << pipeline.parameters.ONEAPI_RELEASE >>
180180
- save_cache:
181181
key: install-<< pipeline.parameters.LINUX_CPP_COMPONENTS >>-{{ checksum "depends.txt" }}-compiler-${{ checksum "scripts/cache_exclude_linux_no_sudo.sh" }}
182182
paths:
@@ -209,7 +209,7 @@ jobs:
209209
command: scripts/build_linux.sh fortran << pipeline.parameters.ONEAPI_RELEASE >>
210210
- run:
211211
name: exclude unused files from cache
212-
command: . scripts/cache_exclude_linux_no_sudo.sh
212+
command: . scripts/cache_exclude_linux_no_sudo.sh << pipeline.parameters.ONEAPI_RELEASE >>
213213
- save_cache:
214214
key: install-<< pipeline.parameters.LINUX_FORTRAN_COMPONENTS >>-{{ checksum "depends.txt" }}-compiler-${{ checksum "scripts/cache_exclude_linux_no_sudo.sh" }}
215215
paths:
@@ -242,7 +242,7 @@ jobs:
242242
command: scripts/build_linux.sh dpc++ << pipeline.parameters.ONEAPI_RELEASE >>
243243
- run:
244244
name: exclude unused files from cache
245-
command: . scripts/cache_exclude_linux_no_sudo.sh
245+
command: . scripts/cache_exclude_linux_no_sudo.sh << pipeline.parameters.ONEAPI_RELEASE >>
246246
- save_cache:
247247
key: install-<< pipeline.parameters.LINUX_DPCPP_COMPONENTS >>-{{ checksum "depends.txt" }}-compiler-${{ checksum "scripts/cache_exclude_linux_no_sudo.sh" }}
248248
paths:

.github/workflows/build_all.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: exclude unused files from cache
4444
if: steps.cache-install.outputs.cache-hit != 'true'
4545
shell: bash
46-
run: scripts/cache_exclude_windows.sh
46+
run: scripts/cache_exclude_windows.sh $ONEAPI_RELEASE
4747

4848
# Delete the following if you don't want to save install logs
4949
- name: Saving install logs
@@ -78,7 +78,7 @@ jobs:
7878
- name: exclude unused files from cache
7979
if: steps.cache-install.outputs.cache-hit != 'true'
8080
shell: bash
81-
run: scripts/cache_exclude_windows.sh
81+
run: scripts/cache_exclude_windows.sh $ONEAPI_RELEASE
8282

8383
# Delete the following if you don't want to save install logs
8484
- name: Saving install logs
@@ -116,7 +116,7 @@ jobs:
116116
- name: exclude unused files from cache
117117
if: steps.cache-install.outputs.cache-hit != 'true'
118118
shell: bash
119-
run: scripts/cache_exclude_windows.sh
119+
run: scripts/cache_exclude_windows.sh $ONEAPI_RELEASE
120120

121121
# Delete the following if you don't want to save install logs
122122
- name: Saving install logs
@@ -155,7 +155,7 @@ jobs:
155155
run: scripts/build_linux.sh c++ $ONEAPI_RELEASE
156156
- name: exclude unused files from cache
157157
if: steps.cache-install.outputs.cache-hit != 'true'
158-
run: scripts/cache_exclude_linux.sh
158+
run: scripts/cache_exclude_linux.sh $ONEAPI_RELEASE
159159

160160
build_linux_apt_fortran:
161161
runs-on: ubuntu-20.04
@@ -182,7 +182,7 @@ jobs:
182182
run: scripts/build_linux.sh fortran $ONEAPI_RELEASE
183183
- name: exclude unused files from cache
184184
if: steps.cache-install.outputs.cache-hit != 'true'
185-
run: scripts/cache_exclude_linux.sh
185+
run: scripts/cache_exclude_linux.sh $ONEAPI_RELEASE
186186

187187
build_linux_apt_dpcpp:
188188
runs-on: ubuntu-20.04
@@ -210,7 +210,7 @@ jobs:
210210
run: scripts/build_linux.sh dpc++ $ONEAPI_RELEASE
211211
- name: exclude unused files from cache
212212
if: steps.cache-install.outputs.cache-hit != 'true'
213-
run: scripts/cache_exclude_linux.sh
213+
run: scripts/cache_exclude_linux.sh $ONEAPI_RELEASE
214214

215215
build_linux_container_cpp:
216216
runs-on: ubuntu-20.04

.gitlab-ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ build_windows_cpp:
4949
after_script: # Moving install directory into 'cache' folder inside build directory
5050
- |
5151
if(!(Test-Path cache)) {
52-
scripts/cache_exclude_windows.ps1
52+
scripts/cache_exclude_windows.ps1 $ONEAPI_RELEASE
5353
New-Item -ItemType "directory" -Path "cache"
5454
}
5555
# "push-pull" is the default cache policy, so cache folder needs to be setup in every run.
@@ -89,7 +89,7 @@ build_windows_fortran:
8989
after_script:
9090
- |
9191
if(!(Test-Path cache)) {
92-
scripts/cache_exclude_windows.ps1
92+
scripts/cache_exclude_windows.ps1 $ONEAPI_RELEASE
9393
New-Item -ItemType "directory" -Path "cache"
9494
}
9595
Move-Item -Path "C:\Program Files (x86)\Intel\oneAPI\compiler" -Destination "cache"
@@ -129,7 +129,7 @@ build_windows_dpcpp:
129129
after_script:
130130
- |
131131
if(!(Test-Path cache)) {
132-
scripts/cache_exclude_windows.ps1
132+
scripts/cache_exclude_windows.ps1 $ONEAPI_RELEASE
133133
New-Item -ItemType "directory" -Path "cache"
134134
}
135135
Move-Item -Path "C:\Program Files (x86)\Intel\oneAPI\compiler" -Destination "cache"
@@ -171,7 +171,7 @@ build_linux_apt_cpp:
171171
- |
172172
if [[ ! -d cache ]]
173173
then
174-
. scripts/cache_exclude_linux_no_sudo.sh
174+
. scripts/cache_exclude_linux_no_sudo.sh ${ONEAPI_RELEASE}
175175
mkdir cache
176176
fi
177177
mv /opt/intel/oneapi/compiler cache
@@ -203,7 +203,7 @@ build_linux_apt_fortran:
203203
- |
204204
if [[ ! -d cache ]]
205205
then
206-
. scripts/cache_exclude_linux_no_sudo.sh
206+
. scripts/cache_exclude_linux_no_sudo.sh ${ONEAPI_RELEASE}
207207
mkdir cache
208208
fi
209209
mv /opt/intel/oneapi/compiler cache
@@ -236,7 +236,7 @@ build_linux_apt_dpcpp:
236236
- |
237237
if [[ ! -d cache ]]
238238
then
239-
. scripts/cache_exclude_linux_no_sudo.sh
239+
. scripts/cache_exclude_linux_no_sudo.sh ${ONEAPI_RELEASE}
240240
mkdir cache
241241
fi
242242
mv /opt/intel/oneapi/compiler cache

scripts/cache_exclude_linux.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#
55
# SPDX-License-Identifier: MIT
66

7-
sudo rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/compiler/lib/ia32_lin
8-
sudo rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/bin/ia32
9-
sudo rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/lib/emu
10-
sudo rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/lib/oclfpga
7+
ONEAPI_RELEASE=$1
8+
9+
sudo rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/compiler/lib/ia32_lin
10+
sudo rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/bin/ia32
11+
sudo rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/lib/emu
12+
sudo rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/lib/oclfpga

scripts/cache_exclude_linux_no_sudo.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#
55
# SPDX-License-Identifier: MIT
66

7-
rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/compiler/lib/ia32_lin
8-
rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/bin/ia32
9-
rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/lib/emu
10-
rm -rf /opt/intel/oneapi/compiler/2021.1-beta10/linux/lib/oclfpga
7+
ONEAPI_RELEASE=$1
8+
9+
rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/compiler/lib/ia32_lin
10+
rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/bin/ia32
11+
rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/lib/emu
12+
rm -rf /opt/intel/oneapi/compiler/"$ONEAPI_RELEASE"/linux/lib/oclfpga

scripts/cache_exclude_windows.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\compiler\lib\ia32_win" -Force -Recurse -ErrorAction SilentlyContinue
6-
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\bin\intel64_ia32" -Force -Recurse -ErrorAction SilentlyContinue
7-
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\emu" -Force -Recurse -ErrorAction SilentlyContinue
8-
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\oclfpga" -Force -Recurse -ErrorAction SilentlyContinue
9-
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\ocloc" -Force -Recurse -ErrorAction SilentlyContinue
10-
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\x86" -Force -Recurse -ErrorAction SilentlyContinue
5+
$ONEAPI_RELEASE=$args[0]
6+
7+
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\$ONEAPI_RELEASE\windows\compiler\lib\ia32_win" -Force -Recurse -ErrorAction SilentlyContinue
8+
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\$ONEAPI_RELEASE\windows\bin\intel64_ia32" -Force -Recurse -ErrorAction SilentlyContinue
9+
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\$ONEAPI_RELEASE\windows\lib\emu" -Force -Recurse -ErrorAction SilentlyContinue
10+
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\$ONEAPI_RELEASE\windows\lib\oclfpga" -Force -Recurse -ErrorAction SilentlyContinue
11+
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\$ONEAPI_RELEASE\windows\lib\ocloc" -Force -Recurse -ErrorAction SilentlyContinue
12+
Remove-Item "C:\Program Files (x86)\Intel\oneAPI\compiler\$ONEAPI_RELEASE\windows\lib\x86" -Force -Recurse -ErrorAction SilentlyContinue
1113

1214
exit 0

scripts/cache_exclude_windows.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
#
55
# SPDX-License-Identifier: MIT
66

7-
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\compiler\lib\ia32_win"
8-
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\bin\intel64_ia32"
9-
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\emu"
10-
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\oclfpga"
11-
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\ocloc"
12-
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1-beta10\windows\lib\x86"
7+
ONEAPI_RELEASE=$1
8+
9+
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$ONEAPI_RELEASE'\windows\compiler\lib\ia32_win"
10+
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$ONEAPI_RELEASE'\windows\bin\intel64_ia32"
11+
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$ONEAPI_RELEASE'\windows\lib\emu"
12+
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$ONEAPI_RELEASE'\windows\lib\oclfpga"
13+
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$ONEAPI_RELEASE'\windows\lib\ocloc"
14+
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$ONEAPI_RELEASE'\windows\lib\x86"

0 commit comments

Comments
 (0)