Skip to content

Commit 2934226

Browse files
disk space management: nemo install test (#14822) (#14937)
Co-authored-by: Pablo Garay <[email protected]>
1 parent ab604bf commit 2934226

File tree

1 file changed

+67
-4
lines changed

1 file changed

+67
-4
lines changed

.github/workflows/install-test.yml

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@ jobs:
2323
- name: Checkout repo
2424
uses: actions/checkout@v2
2525

26+
- name: Check disk space before cleanup
27+
run: df -h
28+
29+
- name: Free up disk space
30+
run: |
31+
# Remove unnecessary files on macOS
32+
sudo rm -rf /usr/local/lib/android || true
33+
sudo rm -rf /usr/local/.ghcup || true
34+
sudo rm -rf /usr/local/lib/node_modules || true
35+
brew cleanup || true
36+
# Clear pip cache
37+
pip cache purge || true
38+
39+
- name: Check disk space after cleanup
40+
run: df -h
41+
2642
- uses: actions/setup-python@v5
2743
with:
2844
python-version: "${{ matrix.python }}"
@@ -45,6 +61,9 @@ jobs:
4561
pip install --no-cache-dir ".[all]"
4662
fi
4763
64+
- name: Check disk space after installation
65+
run: df -h
66+
4867
- name: Run import checks
4968
run: |
5069
# Run import checks
@@ -64,6 +83,25 @@ jobs:
6483
- name: Checkout repo
6584
uses: actions/checkout@v2
6685

86+
- name: Check disk space before cleanup
87+
run: df -h
88+
89+
- name: Free up disk space
90+
run: |
91+
# Remove unnecessary packages and files on Ubuntu
92+
sudo apt-get clean
93+
sudo rm -rf /usr/local/lib/android || true
94+
sudo rm -rf /opt/ghc || true
95+
sudo rm -rf /usr/local/.ghcup || true
96+
sudo rm -rf /usr/share/dotnet || true
97+
sudo rm -rf /opt/az || true
98+
# Clear pip and npm caches
99+
pip cache purge || true
100+
sudo npm cache clean --force || true
101+
102+
- name: Check disk space after cleanup
103+
run: df -h
104+
67105
- name: Install Python
68106
uses: actions/setup-python@v5
69107
with:
@@ -74,14 +112,17 @@ jobs:
74112
INSTALLER: ${{ matrix.installer }}
75113
run: |
76114
if [ "$INSTALLER" = "pip-install" ]; then
77-
pip install --upgrade pip
78-
pip install ".[all]"
115+
pip install --no-cache-dir --upgrade pip
116+
pip install --no-cache-dir ".[all]"
79117
else
80118
export INSTALL_DIR=$(pwd)
81119
bash docker/common/install_dep.sh --library "te,mcore,extra" --mode install
82120
pip install --no-cache-dir ".[all]"
83121
fi
84122
123+
- name: Check disk space after installation
124+
run: df -h
125+
85126
- name: Run import checks
86127
run: |
87128
# Run import checks
@@ -101,6 +142,25 @@ jobs:
101142
- name: Checkout repo
102143
uses: actions/checkout@v2
103144

145+
- name: Check disk space before cleanup
146+
run: df -h
147+
148+
- name: Free up disk space
149+
run: |
150+
# Remove unnecessary packages and files on Ubuntu ARM
151+
sudo apt-get clean
152+
sudo rm -rf /usr/local/lib/android || true
153+
sudo rm -rf /opt/ghc || true
154+
sudo rm -rf /usr/local/.ghcup || true
155+
sudo rm -rf /usr/share/dotnet || true
156+
sudo rm -rf /opt/az || true
157+
# Clear pip and npm caches
158+
pip cache purge || true
159+
sudo npm cache clean --force || true
160+
161+
- name: Check disk space after cleanup
162+
run: df -h
163+
104164
- name: Install Python
105165
uses: actions/setup-python@v5
106166
with:
@@ -111,14 +171,17 @@ jobs:
111171
INSTALLER: ${{ matrix.installer }}
112172
run: |
113173
if [ "$INSTALLER" = "pip-install" ]; then
114-
pip install --upgrade pip
115-
pip install -vvv ".[all]"
174+
pip install --no-cache-dir --upgrade pip
175+
pip install --no-cache-dir ".[all]"
116176
else
117177
export INSTALL_DIR=$(pwd)
118178
bash docker/common/install_dep.sh --library "te,mcore,extra" --mode install
119179
pip install --no-cache-dir ".[all]"
120180
fi
121181
182+
- name: Check disk space after installation
183+
run: df -h
184+
122185
- name: Run import checks
123186
run: |
124187
# Run import checks

0 commit comments

Comments
 (0)