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
88 changes: 18 additions & 70 deletions .github/actions/cache-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,25 @@
name: 'Cache setup'
description: 'Cache setup (disabled)'
description: 'Cache setup'

runs:
using: 'composite'
steps:
- name: Cache setup (disabled)
- name: "Mounted volumes"
shell: bash
run: |
echo "Caching is disabled - skipping cache setup"

# - name: Setup Docker cache
# shell: bash
# run: |
# if ! systemctl is-active --quiet docker; then
# echo "Docker is not running, skipping Docker cache setup"
# exit 0
# fi

# if [ -f "/etc/hetzner-volumes" ]; then
# echo "Hetzner volumes"
# cat /etc/hetzner-volumes
# fi

# if [ -d "/mnt/cache" ]; then
# {
# DOCKER_CACHE_DIR="/mnt/cache/docker"
# echo "Using docker cache directory: $DOCKER_CACHE_DIR"
# }
# {
# echo "Stopping Docker to prepare cache"
# sudo systemctl stop docker
# sudo sync
# }

# {
# echo "Deleting empty overlay2 directories"
# mkdir -p "$DOCKER_CACHE_DIR/overlay2"
# sudo find "$DOCKER_CACHE_DIR/overlay2" -maxdepth 1 -mindepth 1 -type d -empty -delete
# }
# {
# if [ -d "$DOCKER_CACHE_DIR/overlay2" ]; then
# echo "Restoring overlay2 from cache"
# sudo rm -rf "/var/lib/docker/overlay2"
# targets=$(sudo find "$DOCKER_CACHE_DIR/overlay2" -mindepth 1 -maxdepth 1)
# if [ -z "$targets" ]; then
# echo "⚠️ No entries found in $DOCKER_CACHE_DIR/overlay2 — skipping"
# else
# for target in $targets; do
# id=$(basename "$target")
# echo "Mounting $target to /var/lib/docker/overlay2/$id"
# sudo mkdir -p "/var/lib/docker/overlay2/$id"
# sudo mount --bind "$target" "/var/lib/docker/overlay2/$id"
# echo "/var/lib/docker/overlay2/$id" | sudo tee -a /etc/docker-cache-mounts > /dev/null
# done
# fi
# fi
# }

# sudo sync
# sudo systemctl start docker
# else
# echo "No docker cache directory available, proceeding without caching"
# fi

# - name: Setup Python cache
# shell: bash
# run: |
# if [ -d "/mnt/cache" ]; then
# PYTHON_CACHE_DIR="/mnt/cache/python3.12-venv"
# mkdir -p "$PYTHON_CACHE_DIR" "$PWD/venv"
# sudo mount --bind "$PYTHON_CACHE_DIR" "$PWD/venv"
# echo "Using Python cached venv directory: $PYTHON_CACHE_DIR"
# else
# PYTHON_CACHE_DIR=""
# echo "No Python venv cache directory available, proceeding without caching"
# fi
if [ -f "/etc/hetzner-volumes" ]; then
echo "Hetzner volumes"
cat /etc/hetzner-volumes
fi
- name: Setup Python cache
shell: bash
run: |
if [ -d "/mnt/cache" ]; then
PYTHON_CACHE_DIR="/mnt/cache/python3.12-venv"
mkdir -p "$PYTHON_CACHE_DIR" "$PWD/venv"
sudo mount --bind "$PYTHON_CACHE_DIR" "$PWD/venv"
echo "Using Python cached venv directory: $PYTHON_CACHE_DIR"
else
PYTHON_CACHE_DIR=""
echo "No Python venv cache directory available, proceeding without caching"
fi
86 changes: 3 additions & 83 deletions .github/actions/cache-sync/action.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,10 @@
name: 'Cache sync'
description: 'Cache sync (disabled)'
description: 'Cache sync'

runs:
using: 'composite'
steps:
- name: Cache sync (disabled)
- name: Cache sync
shell: bash
run: |
echo "Caching is disabled - skipping cache sync"

# - name: Sync Docker cache
# shell: bash
# run: |
# if ! command -v docker >/dev/null; then
# echo "Docker is not installed, skipping cache sync"
# exit 0
# fi

# if [ -d "/mnt/cache" ]; then
# {
# echo "Stopping containers and cleaning up..."
# sudo docker stop $(sudo docker ps -q) || true
# sudo docker rm -fv $(sudo docker ps -a -q) || true
# }
# {
# echo "Cleaning up old Docker digest images"
# # Get all images with repository and tag
# docker images --digests --format '{{.Repository}} {{.Tag}} {{.ID}}' | sort > /tmp/docker_images_list.txt
# while read -r line; do
# repo=$(awk '{print $1}' <<< "$line")
# tag=$(awk '{print $2}' <<< "$line")
# image_id=$(awk '{print $3}' <<< "$line")
# key="${repo}:${tag}"
# if [[ "$repo" == "<none>" || "$tag" == "<none>" ]]; then
# echo "Removing image with no repository/tag: $key"
# docker rmi -f "$image_id"
# continue
# fi
# done < /tmp/docker_images_list.txt

# # List all image IDs with repository starting with "clickhouse-regression"
# images_to_delete=$(docker images --format '{{.Repository}} {{.ID}}' | awk '$1 ~ /^clickhouse-regression/ {print $2}')
# if [ -z "$images_to_delete" ]; then
# echo "No images found with repository starting with 'clickhouse-regression'."
# else
# echo "Deleting the following images:"
# echo "$images_to_delete"

# # Delete the images
# docker rmi -f $images_to_delete
# fi
# echo "Cleanup complete"
# }
# {
# sudo sync
# if [ -f "/etc/hetzner-volumes" ]; then
# echo "Hetzner volumes"
# cat /etc/hetzner-volumes
# fi
# echo "Stopping Docker daemon"
# sudo systemctl stop docker
# sudo sync
# echo "Syncing docker folders to cache"
# sudo mkdir -p /mnt/cache/docker
# }
# {
# if sudo test -d "/var/lib/docker/overlay2"; then
# sudo mkdir -p /mnt/cache/docker/overlay2
# targets=$(sudo find "/var/lib/docker/overlay2" -mindepth 1 -maxdepth 1)
# if [ -z "$targets" ]; then
# echo "⚠️ No entries found in /var/lib/docker/overlay2 — skipping"
# else
# for target in $targets; do
# id=$(basename "$target")
# if [ ! -f /etc/docker-cache-mounts ] || ! grep -Fxq "$target" /etc/docker-cache-mounts; then
# sudo rsync -aH --delete "$target/" /mnt/cache/docker/overlay2/$id/
# fi
# done
# fi
# fi
# for DIR in image buildkit; do
# sudo rsync -aH --delete /var/lib/docker/$DIR/ /mnt/cache/docker/$DIR/
# done
# sudo sync
# }
# else
# echo "/mnt/cache not available — skipping Docker cache sync"
# fi

echo "Nothing to sync"
2 changes: 1 addition & 1 deletion .github/workflows/reusable-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ on:
runner_volume:
required: false
type: string
default: "volume-cache_regression-20GB"
default: "volume-cache-10GB"
artifacts:
required: true
type: string
Expand Down