maximize-build-space icon indicating copy to clipboard operation
maximize-build-space copied to clipboard

Support only "removal of unnecessary software"

Open MPV opened this issue 1 year ago • 2 comments

Would you be up for having an input that disables everything except "removal of unnecessary software"?

I'd like to be able to just use (and benefit from) this: https://github.com/easimon/maximize-build-space/blob/test-report/README.md

(as I have a setup that runs into fatal: write error: No space left on device when using the full setup, which I didn't run into as early before)

MPV avatar Apr 11 '24 08:04 MPV

@MPV I've encountered the same issue and ended up just copying the code that removes that software from this very script. Adjust for your needs:

            -   name: Maximize build space
                shell: bash
                run: |
                    df -h
                    sudo rm -rf /usr/share/dotnet
                    sudo rm -rf /usr/local/lib/android
                    sudo rm -rf /opt/ghc
                    sudo rm -rf /opt/hostedtoolcache/CodeQL
                    sudo docker image prune --all --force
                    sudo docker builder prune -a
                    df -h

kondratovbr avatar Jun 10 '24 13:06 kondratovbr

+1 for this. My jobs are sometimes building massive docker images, in which case I need the free space in /var not in the build directory. Skipping the pv and lvm disk provisioning would help me there; /var is part of the root partition.

geneerik avatar Jul 27 '24 22:07 geneerik