Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free up space on github actions runners for all jobs. #8386

Merged
merged 5 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/actions/purge-runner-disk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'purge-runner-disk'
description: 'Free up space on the runner image to prevent out-of-space errors during CI tests'
runs:
using: "composite"
steps:
#Reclaim some disk space on the runner to prevent the WDL tasks from running out of space on the docker.
#https://github.com/actions/runner-images/issues/2840
- name: Reclaim some runner disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
shell: bash
14 changes: 8 additions & 6 deletions .github/workflows/gatk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
- name: checkout gatk
uses: actions/checkout@v3

- uses: ./.github/actions/purge-runner-disk

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
Expand Down Expand Up @@ -87,6 +89,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/purge-runner-disk
- name: 'Set up java ${{ matrix.Java }}'
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -161,6 +164,8 @@ jobs:
with:
fetch-depth: 0 #TODO make this shallow

- uses: ./.github/actions/purge-runner-disk

- name: 'Set up java ${{ matrix.Java }}'
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -250,6 +255,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/purge-runner-disk
- name: Set up java 17
uses: actions/setup-java@v3
with:
Expand All @@ -270,6 +276,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/purge-runner-disk
- name: Set up java 17
uses: actions/setup-java@v3
with:
Expand All @@ -292,15 +299,10 @@ jobs:
continue-on-error: true
name: WDL test ${{ matrix.wdlTest }} on cromwell
steps:
#Reclaim some disk space on the runner to prevent the WDL tasks from running out of space on the docker.
#https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image
- name: Reclaim some runner disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/purge-runner-disk
- name: pull lfs files
run: git lfs pull
- name: Set up java 17
Expand Down