-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new XL e2e nightly CI job that triggers every day at 6am UTC. Also update the existing large CI job so that uploaded files are not overwritten. Signed-off-by: Courtney Pacheco <[email protected]>
- Loading branch information
1 parent
8969740
commit bb8d66f
Showing
3 changed files
with
534 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: 'Free Disk Space' | ||
description: 'Frees disk space on the runner' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Print disk space before cleanup | ||
run: | | ||
df -h | ||
shell: bash | ||
- name: Free Disk Space Linux | ||
if: runner.os == 'Linux' | ||
run: | | ||
# Determine if we have Ubuntu, CentOS, or other distro as our runner OS | ||
os_id=$(grep '^ID=' /etc/os-release | cut -d "=" -f2) | ||
echo "Detected OS distro as: ${os_id}" | ||
# Sometimes `docker` is not installed, so only remove images if we need to. | ||
if command -v docker 2>&1 >/dev/null ; then | ||
sudo docker rmi "$(docker image ls -aq) -f" >/dev/null 2>&1 || true | ||
fi | ||
# Remove Android, .NET, and Haskell runtimes | ||
sudo rm -rf \ | ||
/usr/local/lib/android \ | ||
/usr/share/dotnet \ | ||
/opt/ghc \ | ||
/usr/local/.ghcup \ | ||
/usr/local/share/powershell \ | ||
/usr/share/swift \ | ||
/usr/lib/jvm || true | ||
printWarningMessage () { | ||
echo "[warning] Failed to remove '$1', perhaps because it doesn't exist. Ignoring..." | ||
} | ||
# Remove large packages we don't use. | ||
echo "Attempting to remove unused ${os_id} packages..." | ||
if [[ "${os_id}" == "ubuntu" ]]; then | ||
sudo apt-get remove -y '^mysql-.*' || printWarningMessage '^mysql-.*' | ||
sudo apt-get remove -y '^dotnet-.*' --fix-missing || printWarningMessage '^dotnet-.*' | ||
sudo apt-get remove -y 'php.*' --fix-missing || printWarningMessage 'php.*' | ||
sudo apt-get remove -y '^mongodb-.*' --fix-missing || printWarningMessage '^mongodb-.*' | ||
sudo apt-get remove -y '^llvm-.*' --fix-missing || printWarningMessage '^llvm-.*' | ||
sudo apt-get remove -y google-cloud-sdk --fix-missing || printWarningMessage 'google-cloud-sdk' | ||
sudo apt-get remove -y google-cloud-cli --fix-missing || printWarningMessage 'google-cloud-cli' | ||
sudo apt-get autoremove -y >/dev/null 2>&1 | ||
sudo apt-get autoclean -y >/dev/null 2>&1 | ||
elif [[ "${os_id}" == "centos" ]]; then | ||
sudo dnf -y remove 'mysql-*' || printWarningMessage 'mysql-*' | ||
sudo dnf -y remove 'dotnet-*' || printWarningMessage 'dotnet-*' | ||
sudo dnf -y remove 'php-*' || printWarningMessage 'php-*' | ||
sudo dnf -y remove 'mongodb-*' || printWarningMessage 'mongodb-*' | ||
sudo dnf -y remove 'llvm-*' || printWarningMessage 'llvm-*' | ||
sudo dnf -y remove google-cloud-sdk || printWarningMessage 'google-cloud-sdk' | ||
sudo dnf -y remove google-cloud-cli || printWarningMessage 'google-cloud-cli' | ||
sudo dnf clean all | ||
rm -rf /var/cache/dnf* | ||
else | ||
echo "Unrecognized OS '${os_id}'. Skipping large package cleanup, as this logic has not been implemented for ${os_id}." | ||
fi | ||
shell: bash | ||
- name: Free Disk Space MacOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
sudo rm -rf /System/Volumes/Data/Applications/Xcode_15* | ||
shell: bash | ||
- name: Print disk space after cleanup | ||
run: | | ||
df -h | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.