diff --git a/.github/actions/disk-cleanup/action.yml b/.github/actions/disk-cleanup/action.yml new file mode 100644 index 0000000000..ad6df5de40 --- /dev/null +++ b/.github/actions/disk-cleanup/action.yml @@ -0,0 +1,24 @@ +name: Disk cleanup +description: "Free up disk space by removing unused pre-installed software." +runs: + using: composite + steps: + - name: Free up disk space + shell: bash + run: | + echo "Disk space before cleanup:" + df -h / + + sudo rm -rf \ + /opt/google/chrome \ + /opt/microsoft/msedge \ + /opt/microsoft/powershell \ + /usr/lib/mono \ + /usr/local/.ghcup \ + /usr/local/share/chromium \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift \ + + echo "Disk space after cleanup:" + df -h / diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 792d14e176..3d556bd645 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Free up disk space in runner + uses: ./.github/actions/disk-cleanup + - name: Set up JDK 17 uses: actions/setup-java@v4 with: