Skip to content

Fix benchmark workflow: syntax error from stale code after avg_runs()#125

Merged
brunoborges merged 2 commits intomainfrom
copilot/fix-github-actions-workflow-again
Mar 2, 2026
Merged

Fix benchmark workflow: syntax error from stale code after avg_runs()#125
brunoborges merged 2 commits intomainfrom
copilot/fix-github-actions-workflow-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

The benchmark (macos-latest) job (and all OS variants) failed with syntax error near unexpected token 'done' due to leftover lines from the old avg_runs() body that were never removed when the function was rewritten to track failures.

Root cause

When failure-tracking logic was added to avg_runs(), the new function body was inserted correctly but the old closing lines were left orphaned immediately after:

          avg_runs() {
            # ... new body ending with ...
            awk "BEGIN {printf \"%.2f\", $sum / $success}"
          }
            done                                           # ← orphaned
            awk "BEGIN {printf \"%.2f\", $sum / $n}"      # ← orphaned
          }                                               # ← orphaned

The bare done with no enclosing loop triggers an immediate syntax error, aborting the entire step.

Fix

  • Remove the 3 stale lines (orphaned done, awk, and }) from the Run benchmark step in .github/workflows/benchmark.yml
Original prompt

Fix the failing GitHub Actions workflow benchmark (macos-latest)
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 65348374252
Job URL: https://github.com/javaevolved/javaevolved.github.io/actions/runs/22561315511/job/65348374252


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
@brunoborges brunoborges marked this pull request as ready for review March 2, 2026 04:26
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow benchmark Fix benchmark workflow: syntax error from stale code after avg_runs() Mar 2, 2026
@brunoborges brunoborges merged commit 4ea5d3a into main Mar 2, 2026
@brunoborges brunoborges deleted the copilot/fix-github-actions-workflow-again branch March 2, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants