Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit e6b81c0

Browse files
committed
Take free-space.sh from nuclio
1 parent 4b7a2ef commit e6b81c0

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

.github/workflows/check-test-release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
with:
3737
fetch-depth: 0
3838
ref: ${{ github.event.pull_request.head.sha || github.ref }}
39+
40+
- name: Freeing up disk space
41+
run: "${GITHUB_WORKSPACE}/hack/scripts/ci/free-space.sh"
42+
3943
- uses: actions/setup-python@v4
4044
with:
4145
python-version: '3.x'

hack/scripts/ci/free-space.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env sh
2+
# Copyright 2023 The Nuclio Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
print_free_space() {
18+
df --human-readable
19+
}
20+
21+
# before cleanup
22+
print_free_space
23+
24+
# clean unneeded os packages and misc
25+
sudo apt-get remove -y '^dotnet-.*'
26+
sudo apt-get remove -y 'php.*'
27+
sudo apt-get remove -y \
28+
azure-cli \
29+
google-cloud-sdk \
30+
google-chrome-stable \
31+
firefox \
32+
powershell
33+
34+
sudo apt-get autoremove --yes
35+
sudo apt clean
36+
37+
# cleanup unneeded share dirs ~30GB
38+
sudo rm --recursive --force \
39+
/usr/local/lib/android \
40+
/usr/share/dotnet \
41+
/usr/share/miniconda \
42+
/usr/share/swift
43+
44+
# clean unneeded docker images
45+
docker system prune --all --force
46+
47+
# post cleanup
48+
print_free_space

tests/utils/test_save.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@
7878
},
7979
"nbformat": 4,
8080
"nbformat_minor": 0
81-
}
81+
}

0 commit comments

Comments
 (0)