-
Notifications
You must be signed in to change notification settings - Fork 110
chore: speed up ci jobs #2237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: speed up ci jobs #2237
Conversation
23d7acb to
4798329
Compare
|
4798329 to
0ee2e85
Compare
Preview of ubuntu/go tests in 9e486cf🔍 View Details on Terramate Cloud .
|
Preview of macos-ventura/go tests in 9e486cf🔍 View Details on Terramate Cloud .
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍 I have only one suggestion regarding benchmark discovery.
9cab623 to
154ec5b
Compare
0ee2e85 to
d97549e
Compare
d97549e to
b7c3076
Compare
154ec5b to
a2b9c15
Compare
b7c3076 to
8442d85
Compare
804db89 to
7967643
Compare
7967643 to
9e486cf
Compare
| echo "result<<EOF" >> $GITHUB_OUTPUT | ||
| echo "$(make bench/check 'new=${{ github.event.pull_request.head.sha }}' 'old=${{ github.event.pull_request.base.ref }}')" >> $GITHUB_OUTPUT | ||
| # Sort and combine all benchmark result files | ||
| find benchmark-results -name 'benchmark-result.txt' -type f | sort | while read -r result_file; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Suppress Error Messages for Missing Directories
If the benchmark-results directory doesn't exist (e.g., when all benchmark jobs fail or download-artifact step fails despite continue-on-error), the find command will output an error message "find: 'benchmark-results': No such file or directory" which will be captured in GITHUB_OUTPUT and displayed in the PR comment. The command should check if the directory exists first, or redirect stderr to /dev/null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍

ci: parallelize benchmark workflow for faster execution
What this PR does / why we need it:
This PR enhances the benchmark workflow by parallelizing benchmark execution across packages. The changes include:
bench/checkmake target:countparameter (defaults to 20) to control benchmark iterationsparallelparameter (defaults to 1) to control Go test parallelismThese changes improve CI efficiency by running benchmarks for different packages concurrently rather than sequentially.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
The workflow now automatically discovers packages with benchmark tests and runs them in parallel, which should significantly reduce the overall benchmark execution time.
Does this PR introduce a user-facing change?
No
Note
Parallelizes Go benchmarks per-package with matrix jobs, uploads results as artifacts, aggregates them into a single PR comment, and adds count/parallel options to bench/check.
.github/workflows/benchmark.yml):discoverjob to find packages containing benchmark functions.benchmarksper-package via matrix; generate package-scoped result files and upload as artifacts.reportjob to download, combine, and post aggregated benchmark results to the PR.makefiles/common.mk):bench/checkwithcountandparallelparameters (defaults:20,1).-paralleland dynamic-countthrough-go-test-flags.Written by Cursor Bugbot for commit 9e486cf. This will update automatically on new commits. Configure here.