Skip to content

Commit

Permalink
Clean up runner space before running actions
Browse files Browse the repository at this point in the history
14Gb default space is probably not enough for us anymore

```
[ec2-user@ip-172-31-49-57 ipa]$ du -sh target/
36G     target/
```

see the discussion here
actions/runner-images#2875
  • Loading branch information
akoshelev committed Nov 9, 2023
1 parent cb0fe9e commit 2fd0567
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/actions/rm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# this name is currently not visible on GitHub due to https://github.com/actions/runner/issues/1877
name: "Free disk space"
description: "Frees up disk space on GitHub Ubuntu runners"
runs:
using: "composite"
steps:
- uses: jlumbroso/free-disk-space@main
with:

# These 5 options give back ~32Gb. If that's not enough, the remaining flags can be set to `true` at the expense
# of this action taking longer to finish
android: true
dotnet: true
haskell: true
docker-images: true
swap-storage: true

large-packages: false
tool-cache: false
4 changes: 3 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
name: Basic Checks
env:
CARGO_INCREMENTAL: 0

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rm

- uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -74,6 +74,7 @@ jobs:
RUSTFLAGS: -C target-cpu=native
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rm

- uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -107,6 +108,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rm

- uses: dtolnay/rust-toolchain@stable
with:
Expand Down

0 comments on commit 2fd0567

Please sign in to comment.