Skip to content

Commit

Permalink
Use GitHub action to free up space (#1271)
Browse files Browse the repository at this point in the history
* Use GitHub action to freee up space

* Try deleting tool-cache as well

* Add missing free disk calls; don't remove tool-cache
  • Loading branch information
maltekliemann authored Feb 29, 2024
1 parent ff3b5f1 commit c102f66
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 44 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -58,4 +49,4 @@ jobs:
fail_ci_if_error: true
flags: tests
verbose: true
name: unit-tests
name: unit-tests
5 changes: 5 additions & 0 deletions .github/workflows/migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
53 changes: 25 additions & 28 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit c102f66

Please sign in to comment.