More aggressive removal.
Remove everything apart from the final output files.
Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
diff --git a/.github/capture.sh b/.github/capture.sh
index aa50cde..559b2fc 100644
--- a/.github/capture.sh
+++ b/.github/capture.sh
@@ -52,12 +52,29 @@
\
--file ${GITHUB_WORKSPACE}/output/pdk-SKY130A-${STD_CELL_LIBRARY}.tar.bz2 .
- # Remove the stuff we just put in the tarball so we don't run out of disk space.
- rm -rf .
-
echo ::endgroup::
)
+# Free up disk space so the GitHub Action runner doesn't die when collecting
+# the artifacts.
+echo ::group::Freeup space
+
+df -h
+
+for DIR in ${GITHUB_WORKSPACE}/*; do
+ if [ x$DIR = x"${GITHUB_WORKSPACE}/output" ]; then
+ continue
+ fi
+ echo
+ echo "Removing $DIR"
+ rm -rvf $DIR
+done
+
+df -h
+
+echo ::endgroup::
+
+# Output which files are being saved.
echo ::group::Output files
du -h ${GITHUB_WORKSPACE}/output/*
echo ::endgroup::