From 478adec0deba549364bc801a6f4144d81a95962a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BAndrzej=20Ressel?= Date: Sun, 11 Aug 2024 23:03:27 +0200 Subject: [PATCH] Add cleanup step to more workflows (#310) --- .github/workflows/build.yml | 18 ++++++++++++ .github/workflows/deploy.yaml | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c57dedf0..401e39471 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,6 +126,24 @@ jobs: env: RUST_BACKTRACE: "full" steps: + - name: Cleanup unused stuff + run: | + df -h / + sudo rm -rf \ + "$AGENT_TOOLSDIRECTORY" \ + /opt/google/chrome \ + /opt/microsoft/msedge \ + /opt/microsoft/powershell \ + /opt/pipx \ + /usr/lib/mono \ + /usr/local/julia* \ + /usr/local/lib/android \ + /usr/local/lib/node_modules \ + /usr/local/share/chromium \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift + df -h / - uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9a65ead40..15d36e375 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,6 +18,24 @@ jobs: runs-on: ubuntu-latest steps: + - name: Cleanup unused stuff + run: | + df -h / + sudo rm -rf \ + "$AGENT_TOOLSDIRECTORY" \ + /opt/google/chrome \ + /opt/microsoft/msedge \ + /opt/microsoft/powershell \ + /opt/pipx \ + /usr/lib/mono \ + /usr/local/julia* \ + /usr/local/lib/android \ + /usr/local/lib/node_modules \ + /usr/local/share/chromium \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift + df -h / - uses: actions/checkout@v4 with: submodules: true @@ -41,6 +59,24 @@ jobs: runs-on: ubuntu-latest steps: + - name: Cleanup unused stuff + run: | + df -h / + sudo rm -rf \ + "$AGENT_TOOLSDIRECTORY" \ + /opt/google/chrome \ + /opt/microsoft/msedge \ + /opt/microsoft/powershell \ + /opt/pipx \ + /usr/lib/mono \ + /usr/local/julia* \ + /usr/local/lib/android \ + /usr/local/lib/node_modules \ + /usr/local/share/chromium \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift + df -h / - name: Write release version run: | VERSION=${GITHUB_REF_NAME#v} @@ -152,6 +188,25 @@ jobs: os: windows-latest steps: + - name: Cleanup unused stuff + if: runner.os == 'Linux' + run: | + df -h / + sudo rm -rf \ + "$AGENT_TOOLSDIRECTORY" \ + /opt/google/chrome \ + /opt/microsoft/msedge \ + /opt/microsoft/powershell \ + /opt/pipx \ + /usr/lib/mono \ + /usr/local/julia* \ + /usr/local/lib/android \ + /usr/local/lib/node_modules \ + /usr/local/share/chromium \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift + df -h / - run: git config --system core.longpaths true if: runner.os == 'Windows' - name: Write release version (non-Windows)