From 2fd05673cc6acef0602a0c51729cb7a0383c92e0 Mon Sep 17 00:00:00 2001 From: Alex Koshelev Date: Wed, 8 Nov 2023 10:05:30 -0800 Subject: [PATCH] Clean up runner space before running actions 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 https://github.com/actions/runner-images/issues/2875 --- .github/actions/rm/action.yml | 19 +++++++++++++++++++ .github/workflows/check.yml | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/actions/rm/action.yml diff --git a/.github/actions/rm/action.yml b/.github/actions/rm/action.yml new file mode 100644 index 000000000..66052cbaf --- /dev/null +++ b/.github/actions/rm/action.yml @@ -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 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5224f9abd..b1b8db686 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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: @@ -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: @@ -107,6 +108,7 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: ./.github/actions/rm - uses: dtolnay/rust-toolchain@stable with: