From c102f662ddd9f21154755def97df6b68ef9cbe50 Mon Sep 17 00:00:00 2001 From: Malte Kliemann Date: Thu, 29 Feb 2024 11:30:31 +0100 Subject: [PATCH] Use GitHub action to free up space (#1271) * Use GitHub action to freee up space * Try deleting tool-cache as well * Add missing free disk calls; don't remove tool-cache --- .github/workflows/coverage.yml | 23 ++++---------- .github/workflows/migration.yml | 5 +++ .github/workflows/rust.yml | 53 +++++++++++++++---------------- .github/workflows/try-runtime.yml | 10 ++++++ 4 files changed, 47 insertions(+), 44 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8a43c0520..8affb0d66 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -22,27 +22,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + - name: Install rust toolchain run: rustup show - uses: actions-rs/install@v0.1 with: crate: grcov - use-tool-cache: true - - # No disk space: https://github.com/zeitgeistpm/zeitgeist/actions/runs/5085081984/jobs/9144298675?pr=1006 - # Workaround: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 - - name: Free up disk space on GitHub hosted runners - run: | - # Ensure context is GitHub hosted runner - # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context - if [[ "${{ runner.name }}" == "GitHub Actions"* ]]; then - echo "Freeing up space in GitHub hosted runner" - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - fi + use-tool-cache: false - name: Cache Dependencies uses: Swatinem/rust-cache@v1 @@ -58,4 +49,4 @@ jobs: fail_ci_if_error: true flags: tests verbose: true - name: unit-tests \ No newline at end of file + name: unit-tests diff --git a/.github/workflows/migration.yml b/.github/workflows/migration.yml index 967dc6510..6387503c2 100644 --- a/.github/workflows/migration.yml +++ b/.github/workflows/migration.yml @@ -17,4 +17,9 @@ jobs: - name: Install build tools run: ./scripts/init.sh + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + - run: ./scripts/runtime-upgrade/test_runtime_upgrade.sh ${{ github.event.inputs.block }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 064bf936a..a814b4d88 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -55,6 +55,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + - name: Install build tools run: ./scripts/init.sh @@ -76,6 +81,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + - name: Install build tools run: ./scripts/init.sh @@ -93,22 +103,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + - name: Install build tools run: ./scripts/init.sh - - # No disk space: https://github.com/zeitgeistpm/zeitgeist/actions/runs/5085081984/jobs/9144298675?pr=1006 - # Workaround: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 - - name: Free up disk space on GitHub hosted runners - run: | - # Ensure context is GitHub hosted runner - # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context - if [[ "${{ runner.name }}" == "GitHub Actions"* ]]; then - echo "Freeing up space in GitHub hosted runner" - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - fi - name: Cache Dependencies uses: Swatinem/rust-cache@v1 @@ -128,22 +129,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + - name: Install build tools run: ./scripts/init.sh - - # No disk space: https://github.com/zeitgeistpm/zeitgeist/actions/runs/5085081984/jobs/9144298675?pr=1006 - # Workaround: https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 - - name: Free up disk space on GitHub hosted runners - run: | - # Ensure context is GitHub hosted runner - # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context - if [[ "${{ runner.name }}" == "GitHub Actions"* ]]; then - echo "Freeing up space in GitHub hosted runner" - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - fi - name: Cache Dependencies uses: Swatinem/rust-cache@v1 @@ -163,6 +155,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + - name: Install build tools run: ./scripts/init.sh diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index 676368afa..0d5d4b99d 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -13,6 +13,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + - name: Install build tools run: ./scripts/init.sh @@ -27,6 +32,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Free up disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + - name: Install build tools run: ./scripts/init.sh