mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 01:38:32 +00:00
## Summary This PR resolves all CI failures following the migration to the new DataHaven Github & Docker Hub organizations, and correctly leverage self-hosted GitHub runners (`DH-runners` group) by eliminating sudo dependencies. ## Key Changes ### 🔧 **Eliminated sudo requirements across all workflows** - **Setup Environment**: Installed mold linker and system dependencies in userspace without sudo - **Tool Installation**: Replaced apt/system package installations with direct binary downloads: - Kurtosis: Direct binary download from GitHub releases (v1.10.3) - Taplo: Direct binary installation for Cargo.toml formatting - cargo-nextest: Using `cargo install` instead of GitHub action (v0.9.100) - **Runner Cleanup**: Skipped cleanup-runner action entirely on self-hosted runners (bare-metal manages disk space externally) ### 🏷️ **Workflow optimizations** - **Group-based targeting**: All heavy workloads (Rust builds, E2E tests) now run on `DH-runners` runners - **Dependency management**: Used `install-deps: false` flag instead of hardcoded runner detection Co-authored-by: Claude <noreply@anthropic.com>
64 lines
No EOL
2.9 KiB
YAML
64 lines
No EOL
2.9 KiB
YAML
name: "Cleanup Runner"
|
|
description: "Cleans up the runner environment to free up disk space"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Show disk space and largest directories before cleanup
|
|
shell: bash
|
|
run: |
|
|
echo "Overall disk space before cleanup (df -h /):"
|
|
df -h /
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /usr/ before cleanup:"
|
|
sudo du -h --max-depth=1 /usr/ | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /usr/local/lib before cleanup:"
|
|
sudo du -h --max-depth=1 /usr/local/lib | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /usr/lib before cleanup:"
|
|
sudo du -h --max-depth=1 /usr/lib | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /opt before cleanup:"
|
|
sudo du -h --max-depth=1 /opt | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /opt/hostedtoolcache before cleanup:"
|
|
sudo du -h --max-depth=1 /opt/hostedtoolcache | sort -rh | head -n 10
|
|
- name: Free up disk space
|
|
id: prune
|
|
shell: bash
|
|
run: |
|
|
echo "--- Starting Cleanup ---"
|
|
sudo rm -rf \
|
|
/usr/local/lib/android \
|
|
/usr/local/lib/heroku \
|
|
/usr/share/dotnet \
|
|
/usr/lib/google-cloud-sdk \
|
|
/usr/lib/jvm \
|
|
/opt/hostedtoolcache/CodeQL \
|
|
/opt/hostedtoolcache/go \
|
|
/opt/hostedtoolcache/Python \
|
|
/opt/hostedtoolcache/Ruby \
|
|
/opt/hostedtoolcache/Java
|
|
sudo apt-get clean
|
|
echo "--- Cleanup Finished ---"
|
|
- name: Show disk space and largest directories after cleanup
|
|
shell: bash
|
|
run: |
|
|
echo "Overall disk space after cleanup (df -h /):"
|
|
df -h /
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /usr/ after cleanup:"
|
|
sudo du -h --max-depth=1 /usr/ | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /usr/local/lib after cleanup:"
|
|
sudo du -h --max-depth=1 /usr/local/lib | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /usr/lib after cleanup:"
|
|
sudo du -h --max-depth=1 /usr/lib | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /opt after cleanup:"
|
|
sudo du -h --max-depth=1 /opt | sort -rh | head -n 10
|
|
echo "-------------------------------------------"
|
|
echo "Detailed breakdown for /opt/hostedtoolcache after cleanup:"
|
|
sudo du -h --max-depth=1 /opt/hostedtoolcache | sort -rh | head -n 10 |