From 2672b7bde408aaedcd8be5a623371964319e0852 Mon Sep 17 00:00:00 2001 From: Roman Zajic Date: Mon, 30 Sep 2024 23:46:18 +0800 Subject: [PATCH] fix: Coverage and PR workflows - no space left on device (#798) * test: remove LLVM profiling * fix: add on push * test: use release mode * test: remove Android support from the runner * test: return back LLVM profiling - remove dotnet * fix: remove on push condition * fix: prune-vm action added * fix: move actions-checkout * fix: PR workflow * fix: remove on push condition from codecov --- .github/actions/prune-vm/action.yml | 27 +++++++++++++++++++++++++++ .github/workflows/build-test.yml | 3 +++ .github/workflows/codecov.yml | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 .github/actions/prune-vm/action.yml diff --git a/.github/actions/prune-vm/action.yml b/.github/actions/prune-vm/action.yml new file mode 100644 index 00000000..a80b08c4 --- /dev/null +++ b/.github/actions/prune-vm/action.yml @@ -0,0 +1,27 @@ +# Inspired by https://github.com/AdityaGarg8/remove-unwanted-software +# to free up disk space. Currently removes Dotnet, Android and Haskell. +name: Remove unwanted software +description: Default GitHub runners come with a lot of unnecessary software +runs: + using: "composite" + steps: + - name: Disk space report before modification + shell: bash + run: | + echo "==> Available space before cleanup" + echo + df -h + - name: Maximize build disk space + shell: bash + run: | + set -euo pipefail + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /usr/local/.ghcup + - name: Disk space report after modification + shell: bash + run: | + echo "==> Available space after cleanup" + echo + df -h \ No newline at end of file diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index ed742c93..37d27a35 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -54,6 +54,9 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Remove unwanted software + if: matrix.os == 'ubuntu-latest' + uses: ./.github/actions/prune-vm - uses: arduino/setup-protoc@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 00e7f1ae..b7d3b262 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -16,6 +16,8 @@ jobs: - uses: actions/checkout@v3 with: submodules: true + - name: Remove unwanted software + uses: ./.github/actions/prune-vm - uses: arduino/setup-protoc@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }}