Skip to content

A few fixes for CI performance#79

Open
nickpdemarco wants to merge 3 commits intoHKalbasi:mainfrom
nickpdemarco:nickpdemarco/optimize-ci
Open

A few fixes for CI performance#79
nickpdemarco wants to merge 3 commits intoHKalbasi:mainfrom
nickpdemarco:nickpdemarco/optimize-ci

Conversation

@nickpdemarco
Copy link
Contributor

Optimize CI by running zngur binary directly and parallelizing examples

  • Change Makefiles to execute pre-built zngur binary instead of cargo run
  • Add rayon to parallelize example builds (4 at a time)
  • Pre-build zngur-cli once and set ZNGUR env var for all examples
  • Reduces CI time by 59% faster on my Apple M1 laptop

- Change Makefiles to execute pre-built zngur binary instead of cargo run
- Add rayon to parallelize example builds (4 at a time)
- Pre-build zngur-cli once and set ZNGUR env var for all examples
- Reduces CI time by 59% faster on Apple  M1 laptop
@HKalbasi
Copy link
Owner

HKalbasi commented Dec 2, 2025

Nice! This reduces the CI time on github runners for macOS from 6m to 3m. But it doesn't change the time for linux targets, maybe because they are single core on github? I'm not sure.

Add rayon to parallelize example builds (4 at a time)

I don't think it is correct to use with_max_iter_len for limiting build jobs to 4. I guess it will limit the number of parallel jobs to number_of_examples/4. What will happen if we remove this constrain entirely? Will it become slower? We can also use jobserver to smartly limit the number of inner tasks to the number of cores, but it might be overkill.

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