-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up the bundle archive after extracting it #1820
Conversation
I reran https://github.com/github/codeql-action/actions/runs/5730681885/job/15530162792?pr=1820 in debug. Logs are looking good. |
Just curious: how exactly did you figure out the disk space savings here? |
I did a fairly basic calculation: I added a bunch of print statements to dump the available disk space, and summed the amount of disk space made available by deleting the archived bundle and deleting the extracted bundle from the temporary directory. |
Make some more disk space available to future steps by deleting the CodeQL bundle archive once we've extracted it. We tolerate this step failing since deleting files doesn't always work, particularly on Windows where an antivirus program might lock the file.
Edit: There's another saving to be had — when we cache the bundle we copy it from a temporary directory to a toolcache directory, so we can also delete the extracted CodeQL bundle from this temporary directory.
In total, we make an additional 2.3 GB available to the
autobuild
andanalyze
steps on a Linux run using a single-platform dist. The savings are better for multi-platform dists, but these are less common.Merge / deployment checklist