Skip to content
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

ci: parallelize CI jobs #318

Merged
merged 3 commits into from
Jul 17, 2023
Merged

ci: parallelize CI jobs #318

merged 3 commits into from
Jul 17, 2023

Conversation

joshka
Copy link
Member

@joshka joshka commented Jul 16, 2023

  • remove the dependency on the lint job from all other jobs
  • implement workflow concurrency
  • run jobs which run for each backend in parallel by calling e.g.
    cargo make test-termion, instead of cargo make test
  • add a coverage task to the makefile
  • change "cargo-make check" to check all valid features in parallel
  • add clippy-all tasks to enable all features
  • tidy up the workflow file

Fixes:

Second commit simplifies Makefile.toml to use platform overrides for windows to avoid termion, and makes the backend choice a parameter for tasks that actually need it (e.g. cargo make test-backend termion is now possible). Where useful, the makefile now builds features together, rather than separately. All tasks now check all features rather than some skipping the calendar, etc.

Third commit fixes an existing error in the termwiz doc tests that this hightlights (was not previously tested as the previous doc tests didn't check all backends)

Performance

  • CI build time reduces to 5-6 mins from 8-10 mins
  • lint and clippy results often available fairly soon (<1-2 mins) after submission instead

Review notes

  • It's probably difficult to review the diff, and would likely be easier to just review the Makefile and ci.yml file
  • Take a look at the Checks tab to see how the CI differs from previous CI results.

@codecov
Copy link

codecov bot commented Jul 16, 2023

Codecov Report

Merging #318 (21fc736) into main (446efae) will not change coverage.
The diff coverage is n/a.

❗ Current head 21fc736 differs from pull request most recent head c4afec9. Consider uploading reports for the commit c4afec9 to get more accurate results

@@           Coverage Diff           @@
##             main     #318   +/-   ##
=======================================
  Coverage   85.00%   85.00%           
=======================================
  Files          38       38           
  Lines        8507     8507           
=======================================
  Hits         7231     7231           
  Misses       1276     1276           
Impacted Files Coverage Δ
src/backend/termwiz.rs 0.00% <ø> (ø)

... and 1 file with indirect coverage changes

@joshka joshka force-pushed the ci-parallelize branch 5 times, most recently from db66db7 to 21fc736 Compare July 16, 2023 06:25
@joshka joshka marked this pull request as ready for review July 16, 2023 06:46
- remove the dependency on the lint job from all other jobs
- implement workflow concurrency
- reorder the workflow so that the lint, clippy and coverage jobs are
  scheduled before the test jobs
- run jobs which run for each backend in parallel by calling e.g.
  cargo make test-termion, instead of cargo make test
- add a coverage task to the makefile
- change "cargo-make check" to check all features valid for OS in
  parallel
- run clippy only on the ubuntu-latest runner and check all features
  valid in parallel
- tidy up the workflow file
Use platform overrides to significantly simplify the Makefile logic
See https://github.com/sagiegurari/cargo-make\#platform-override
@orhun orhun added this pull request to the merge queue Jul 17, 2023
Merged via the queue into ratatui-org:main with commit bb061fd Jul 17, 2023
27 of 28 checks passed
@joshka joshka deleted the ci-parallelize branch July 17, 2023 13:34
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.

None yet

2 participants