Run cleanup-disk removals in parallel (#766)
This commit is contained in:
@@ -14,13 +14,20 @@ runs:
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Remove Tool Cache and Swap"
|
||||
# Remove tool cache to free up ~15GB of space per https://github.com/ultralytics/ultralytics/pull/15848
|
||||
rm -rf /opt/hostedtoolcache || true
|
||||
toolcache_pid=""
|
||||
if [ -e /opt/hostedtoolcache ]; then
|
||||
# Remove tool cache to free up ~15GB of space per https://github.com/ultralytics/ultralytics/pull/15848
|
||||
rm -rf /opt/hostedtoolcache &
|
||||
toolcache_pid=$!
|
||||
fi
|
||||
# Remove swap space to free up ~4GB
|
||||
if [ -f /swapfile ]; then
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
fi
|
||||
if [ -n "$toolcache_pid" ]; then
|
||||
wait "$toolcache_pid" || true
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Disk Space After Cleanup"
|
||||
|
||||
Reference in New Issue
Block a user