1
0
mirror of https://github.com/systemd/systemd.git synced 2025-08-31 09:49:54 +03:00

mkosi: Do disk space cleanup asynchronously

This can actually take a rather long time (multiple minutes) so
make sure we do it asynchronously.
This commit is contained in:
Daan De Meyer
2024-03-15 20:25:01 +01:00
committed by Yu Watanabe
parent af668ab10a
commit e48c170f51

View File

@ -78,10 +78,14 @@ jobs:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: systemd/mkosi@1445b389750af22756c0fde6facc1f2f343340b4 - uses: systemd/mkosi@1445b389750af22756c0fde6facc1f2f343340b4
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
# immediately, we remove the files in the background. However, we first move them to a different location
# so that nothing tries to use anything in these directories anymore while we're busy deleting them.
- name: Free disk space - name: Free disk space
run: | run: |
sudo rm -rf /usr/local sudo mv /usr/local /usr/local.trash
sudo rm -rf /opt/hostedtoolcache sudo mv /opt/hostedtoolcache /opt/hostedtoolcache.trash
sudo systemd-run rm -rf /usr/local.trash /opt/hostedtoolcache.trash
- name: Configure - name: Configure
run: | run: |