Skip to content

Commit ac15240

Browse files
authored
Update CL - Free disk space for the Docker job (#1941)
Update CL - Free disk space for the Docker job
1 parent c5b0392 commit ac15240

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
-DBUILD_TESTS=ON \
110110
.
111111
make -j $(nproc) install
112-
112+
113113
- name: Build Ruy
114114
if: matrix.backend == 'ruy'
115115
run: |
@@ -121,7 +121,7 @@ jobs:
121121
$CMAKE_EXTRA_OPTIONS \
122122
.
123123
make -j $(nproc) install
124-
124+
125125
- name: Download test data
126126
run: |
127127
wget https://opennmt-models.s3.amazonaws.com/transliteration-aren-all.tar.gz
@@ -229,7 +229,7 @@ jobs:
229229
ls -l
230230
find .
231231
pip install ${{ matrix.wheel_pattern }}
232-
232+
233233
- name: Test Python wheel
234234
run: |
235235
pytest -v python/tests/ --ignore=python/tests/test_opennmt_tf.py
@@ -295,6 +295,29 @@ jobs:
295295
with:
296296
submodules: recursive
297297

298+
- name: Show disk and docker usage (before cleanup)
299+
run: |
300+
df -h
301+
echo " -= Docker System =-"
302+
docker system df || true
303+
304+
- name: Free disk space (cleanup heavy preinstalled directories + docker prune)
305+
run: |
306+
echo " -= Removing big preinstalled directories (shouldn't remove the needed tools) =-"
307+
sudo rm -rf /opt/hostedtoolcache || true
308+
sudo rm -rf /usr/share/dotnet || true
309+
sudo rm -rf /usr/lib/jvm || true
310+
sudo rm -rf /usr/local/lib/android || true
311+
echo " -= Running docker prune =-"
312+
docker system prune -af --volumes || true
313+
docker builder prune -af || true
314+
315+
- name: Show disk and docker usage (after cleanup)
316+
run: |
317+
df -h
318+
echo " -= Docker System =-"
319+
docker system df || true
320+
298321
- name: Build Docker images
299322
run: |
300323
./docker/build_all.sh

0 commit comments

Comments
 (0)