From 0386d2bbfaba841259d4790555e8c746029f61f1 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 1 Apr 2026 16:19:41 -0500 Subject: [PATCH 1/4] Fix copilot-setup-steps: sudo for /mnt dirs, add PR trigger The workflow failed with 'mkdir: cannot create directory: Permission denied' when creating directories on /mnt. Use sudo to create the directories and chmod to make them writable. Also added push/pull_request triggers so the workflow runs on PRs that edit it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 67f82270f..24df6aacf 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -1,6 +1,13 @@ name: "Copilot Setup Steps" -on: workflow_dispatch +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml jobs: copilot-setup-steps: @@ -16,9 +23,10 @@ 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 # Create symlinks to use the secondary disk ln -s /mnt/build-output ./output From a14eb94bb2df8a8015e16a00f5772a2c787962b2 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 1 Apr 2026 16:25:37 -0500 Subject: [PATCH 2/4] Remove push trigger, keep only pull_request Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 24df6aacf..aaeec7715 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -2,9 +2,6 @@ name: "Copilot Setup Steps" on: workflow_dispatch: - push: - paths: - - .github/workflows/copilot-setup-steps.yml pull_request: paths: - .github/workflows/copilot-setup-steps.yml From 457ca110ec6de38151ddbf3f1e8cd5265a5a0f01 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 1 Apr 2026 16:27:28 -0500 Subject: [PATCH 3/4] Fix symlinks to use correct names (externals, generated) The symlinks were created as externals-link and generated-link, but the build and cache steps use ./externals and ./generated. Rename so the secondary disk is actually used. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index aaeec7715..015bd77fc 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -27,8 +27,8 @@ jobs: # 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)" From b9025316d829ebf582ec363e59ff72f69ca588aa Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 1 Apr 2026 16:30:38 -0500 Subject: [PATCH 4/4] Simplify log-disk-space action to just df -h The du commands scan the entire filesystem, taking ~1m45s per call. Replace with just 'df -h' which returns instantly. Remove the detailed input option and its callers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 4 -- .github/workflows/log-disk-space/action.yml | 50 --------------------- 2 files changed, 54 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 015bd77fc..dc7d46e65 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -75,8 +75,6 @@ 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 @@ -84,8 +82,6 @@ jobs: - 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 diff --git a/.github/workflows/log-disk-space/action.yml b/.github/workflows/log-disk-space/action.yml index 1fc7361c4..51a170418 100644 --- a/.github/workflows/log-disk-space/action.yml +++ b/.github/workflows/log-disk-space/action.yml @@ -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: @@ -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