Skip to content

Commit 5043ac3

Browse files
committed
fix package installation
1 parent 546161d commit 5043ac3

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

src/ci/scripts/free-disk-space.sh

+22-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ isX86() {
1414
fi
1515
}
1616

17+
# Check if we're on a GitHub hosted runner.
18+
# Otherwise, we are running in aws codebuild.
19+
isGitHubRunner() {
20+
# `:-` means "use the value of RUNNER_ENVIRONMENT if it exists, otherwise use an empty string".
21+
if [[ "${RUNNER_ENVIRONMENT:-}" == "github-hosted" ]]; then
22+
return 1
23+
else
24+
return 0
25+
fi
26+
}
27+
1728
# print a line of the specified character
1829
printSeparationLine() {
1930
for ((i = 0; i < 80; i++)); do
@@ -155,20 +166,25 @@ cleanPackages() {
155166
'^dotnet-.*'
156167
'^llvm-.*'
157168
'^mongodb-.*'
158-
'azure-cli'
159169
'firefox'
160170
'libgl1-mesa-dri'
161171
'mono-devel'
162172
'php.*'
163173
)
164174

165-
if isX86; then
175+
if isGithubHosted; then
166176
packages+=(
167-
'google-chrome-stable'
168-
'google-cloud-cli'
169-
'google-cloud-sdk'
170-
'powershell'
177+
azure-cli
171178
)
179+
180+
if isX86; then
181+
packages+=(
182+
'google-chrome-stable'
183+
'google-cloud-cli'
184+
'google-cloud-sdk'
185+
'powershell'
186+
)
187+
fi
172188
fi
173189

174190
sudo apt-get -qq remove -y --fix-missing "${packages[@]}"

0 commit comments

Comments
 (0)