Skip to content
Open
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
14 changes: 14 additions & 0 deletions .github/scripts/free-disk-space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e

echo "=== Disk usage before cleanup ==="
df -h

echo "=== Freeing up disk space ==="
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc

echo "=== Disk usage after cleanup ==="
df -h
4 changes: 4 additions & 0 deletions .github/workflows/PR-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ jobs:
if: needs.changes.outputs.build == 'true'
uses: actions/checkout@v3

- name: Free up disk space
if: needs.changes.outputs.build == 'true' && matrix.family == 'linux'
run: .github/scripts/free-disk-space.sh

- name: Cache binaries
id: cached_binaries
if: needs.changes.outputs.build == 'true'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-build-distributor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
role-to-assume: ${{ inputs.TerraformAWSAssumeRole }}
aws-region: ${{ inputs.Region }}

- name: Free up disk space
run: .github/scripts/free-disk-space.sh

- name: Agent Version
id: version
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
role-to-assume: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
aws-region: us-west-2

- name: Free up disk space
run: .github/scripts/free-disk-space.sh

- name: Cache container
id: cached_container
uses: actions/cache@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ jobs:
with:
go-version: ~1.22.2

- name: Free up disk space
run: .github/scripts/free-disk-space.sh

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ jobs:
go-version: ~1.22.2
cache: false

- name: Free up disk space
run: .github/scripts/free-disk-space.sh

- name: Install rpm
run: sudo apt install rpm

Expand Down
Loading