Skip to content

Commit

Permalink
Free up space on github actions runners for all jobs. (#8386)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnbroad authored Jun 28, 2023
1 parent 01e45a2 commit 3b95e6b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
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

0 comments on commit 3b95e6b

Please sign in to comment.