diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index c6e33020d..c835da981 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -10,23 +10,38 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Log disk space (after checkout) + uses: ./.github/workflows/log-disk-space + - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: '9.x' + - name: Log disk space (after .NET setup) + uses: ./.github/workflows/log-disk-space + - name: Install Android workload run: dotnet workload install android + - name: Log disk space (after Android workload) + uses: ./.github/workflows/log-disk-space + - name: Setup OpenJDK 21 uses: actions/setup-java@v4 with: distribution: 'microsoft' java-version: '21' + - name: Log disk space (after Java setup) + uses: ./.github/workflows/log-disk-space + - name: Restore dotnet tools run: dotnet tool restore + - name: Log disk space (after dotnet tools restore) + uses: ./.github/workflows/log-disk-space + # Cache the externals directory based on config.json content # This caches the Maven artifacts downloaded by the binderator tool # to avoid re-downloading the same artifacts on subsequent runs @@ -37,10 +52,16 @@ jobs: path: ./externals key: externals-${{ hashFiles('config.json') }} + - name: Log disk space (after externals cache restore) + uses: ./.github/workflows/log-disk-space + - name: Run dotnet cake run: dotnet cake continue-on-error: true + - name: Log disk space (after dotnet cake) + uses: ./.github/workflows/log-disk-space + # Save the externals cache after dotnet cake runs # This ensures the cache reflects the original config.json state # before any potential modifications by the build process diff --git a/.github/workflows/log-disk-space/action.yml b/.github/workflows/log-disk-space/action.yml new file mode 100644 index 000000000..d5217c348 --- /dev/null +++ b/.github/workflows/log-disk-space/action.yml @@ -0,0 +1,19 @@ +name: Log Disk Space +description: Logs disk space usage on the runner +runs: + using: composite + steps: + - name: Log disk space + shell: bash + 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)"}'