Skip to content
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
40 changes: 40 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,25 @@ jobs:
sudo rm -rf /usr/local/share/boost || true
sudo rm -rf /usr/share/swift || true
sudo rm -rf /usr/local/julia* || true
sudo rm -rf /usr/lib/google-cloud-sdk || true
sudo rm -rf /opt/hostedtoolcache/CodeQL || true
docker image prune -af 2>/dev/null || true
sync
after=$(df -BG / | tail -1 | awk '{print $4}')
echo "Space after: ${after}"
- name: Remove extra tools to free disk space (Windows)
if: inputs.os == 'windows'
shell: pwsh
run: |
Write-Host "Removing extra tools to free disk space..."
Write-Host "Space before: C: $([math]::Round((Get-PSDrive C).Free / 1GB, 1))GB free, D: $([math]::Round((Get-PSDrive D).Free / 1GB, 1))GB free"
Remove-Item -Path "C:\Miniconda" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\tools\ghc" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Program Files\LLVM" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Program Files\PostgreSQL" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Program Files\MongoDB" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Program Files\MySQL" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "Space after: C: $([math]::Round((Get-PSDrive C).Free / 1GB, 1))GB free, D: $([math]::Round((Get-PSDrive D).Free / 1GB, 1))GB free"
- name: Calculate fetch depth
id: depth
shell: bash
Expand Down Expand Up @@ -217,6 +233,12 @@ jobs:
crates: rust/Cargo.Bazel.lock
repository-cache: true
bazelrc: common --color=yes
- name: Disk usage after cache restore
if: inputs.os != 'macos'
shell: bash
run: |
df -h "$GITHUB_WORKSPACE"
if [[ "$RUNNER_OS" == "Windows" ]]; then df -h /c; fi
- name: Setup Fluxbox and Xvfb
if: inputs.os == 'ubuntu' && inputs.browser != ''
run: |
Expand All @@ -242,6 +264,24 @@ jobs:
- name: Configure RubyGems credentials via OIDC
if: inputs.gem-trusted-publishing
uses: rubygems/configure-rubygems-credentials@main
- name: Check disk space before build
if: inputs.os != 'macos'
shell: bash
run: |
df -h "$GITHUB_WORKSPACE"
if [[ "$RUNNER_OS" == "Windows" ]]; then
# On Windows the workspace is on D: but C: is the constrained drive
avail=$(df -k /c | awk 'NR==2 {printf "%.0f", $4/1024/1024}')
echo "Available disk space before build (C:): ${avail}GB"
df -h /c
else
avail=$(df -k "$GITHUB_WORKSPACE" | awk 'NR==2 {printf "%.0f", $4/1024/1024}')
echo "Available disk space before build: ${avail}GB"
fi
if [ "$avail" -lt 10 ]; then
echo "::error::Insufficient disk space: ${avail}GB available (need >=10GB)"
exit 1
fi
- name: Run Bazel
id: run-bazel
shell: bash
Expand Down
1 change: 0 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ single_version_override(
version = "33.5",
)

bazel_dep(name = "rules_android", version = "0.7.2")
bazel_dep(name = "rules_closure", version = "0.16.0")
bazel_dep(name = "rules_dotnet", version = "0.21.5")

Expand Down