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
21 changes: 11 additions & 10 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "Copilot Setup Steps"

on: workflow_dispatch
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
copilot-setup-steps:
Expand All @@ -16,14 +20,15 @@ jobs:
- name: Setup build directories on secondary disk
run: |
echo "Setting up build directories on /mnt (secondary disk with 66G+ free)"
mkdir -p /mnt/build-output
mkdir -p /mnt/externals
mkdir -p /mnt/generated
sudo mkdir -p /mnt/build-output
sudo mkdir -p /mnt/externals
sudo mkdir -p /mnt/generated
sudo chmod -R 777 /mnt/build-output /mnt/externals /mnt/generated
Comment thread
jonathanpeppers marked this conversation as resolved.
Comment thread
jonathanpeppers marked this conversation as resolved.

# Create symlinks to use the secondary disk
ln -s /mnt/build-output ./output
ln -s /mnt/externals ./externals-link
ln -s /mnt/generated ./generated-link
ln -s /mnt/externals ./externals
ln -s /mnt/generated ./generated

echo "Build directories configured:"
ls -la | grep -E "(output|externals|generated)"
Expand Down Expand Up @@ -70,17 +75,13 @@ jobs:

- name: Log disk space (after externals cache restore)
uses: ./.github/workflows/log-disk-space
with:
detailed: 'true'

- name: Run dotnet cake
run: dotnet cake
continue-on-error: true

- name: Log disk space (after dotnet cake)
uses: ./.github/workflows/log-disk-space
with:
detailed: 'true'

# Save the externals cache after dotnet cake runs
# This ensures the cache reflects the original config.json state
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/log-disk-space/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
name: Log Disk Space
description: Logs disk space usage on the runner
inputs:
detailed:
description: 'Whether to include detailed disk analysis (true/false)'
required: false
default: 'false'
runs:
using: composite
steps:
Expand All @@ -13,48 +8,3 @@ runs:
run: |
echo "=== Disk Space Usage ==="
df -h
echo ""
echo "=== Disk Usage by Directory (/) ==="
du -h -d 1 / 2>/dev/null | sort -hr | head -20 || true
echo ""
echo "=== Disk Usage in Current Directory ==="
du -h -d 1 . 2>/dev/null | sort -hr | head -20 || true
echo ""
echo "=== Disk Usage Summary ==="
df -h / | tail -1 | awk '{print "Used: " $3 " / " $2 " (" $5 " full)"}'

# Detailed analysis if requested
if [ "${{ inputs.detailed }}" = "true" ]; then
echo ""
echo "=== DETAILED ANALYSIS ==="
echo ""
echo "=== Largest directories in /home/runner ==="
sudo du -h /home/runner 2>/dev/null | sort -rh | head -20
echo ""
echo "=== Largest directories in /opt ==="
sudo du -h /opt 2>/dev/null | sort -rh | head -20
echo ""
echo "=== Workspace breakdown (top level) ==="
du -h --max-depth=1 . 2>/dev/null | sort -rh
echo ""
echo "=== Workspace breakdown (2 levels deep) ==="
du -h --max-depth=2 . 2>/dev/null | sort -rh | head -30
echo ""
echo "=== externals directory ==="
du -sh ./externals/* 2>/dev/null | sort -rh | head -20 || echo "No externals"
echo ""
echo "=== output directory ==="
du -sh ./output/* 2>/dev/null | sort -rh | head -20 || echo "No output"
echo ""
echo "=== generated directory ==="
du -sh ./generated/* 2>/dev/null | sort -rh | head -20 || echo "No generated"
echo ""
echo "=== /mnt disk usage ==="
du -h --max-depth=1 /mnt 2>/dev/null | sort -rh
echo ""
echo "=== Docker usage ==="
docker system df 2>/dev/null || echo "Docker not available"
echo ""
echo "=== Temp directories ==="
du -sh /tmp /var/tmp 2>/dev/null || true
fi
Loading