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

[RFC]: Continuous Integration Design #552

Closed
5 tasks done
Luni-4 opened this issue Jul 27, 2023 · 9 comments
Closed
5 tasks done

[RFC]: Continuous Integration Design #552

Luni-4 opened this issue Jul 27, 2023 · 9 comments
Assignees
Labels
design Design related task

Comments

@Luni-4
Copy link
Collaborator

Luni-4 commented Jul 27, 2023

This issue is an extension of #428 and it is an RFC to verify if there is a consensus with this new design

Feature description

A new design for continuous integration might be the following one:

  • One job for code formatting and linting issues
  • One job that runs all std tests on Linux
  • One job that runs all std tests on MacOs (@dcvz)
  • One job that runs all std tests on Windows (@syl20bnr)
  • One job that runs all no-std tests

Let's try to tackle each point one-by-one

  • (1) Some GitHub actions allow to visualize clippy lints and bad formatting as messages in a PR or in a report. This approach reduces the time spent in detecting these problems because they are immediately viewable. A contributor, especially a new one, does not have to scrape through CI logs in order to find them. This job could run only on a Linux operating system. Running this job on more operating system could be a waste of resources.

  • (2, 3, 4) Run all current checks and tests on the specific operating system using a script. The run-checks.sh script could be rewritten in Rust language in order to be cross-platform and less error-prone. Collect code coverage data through Rust source code coverage and then aggregate the results using grcov, finally publish this data on codecov in order to immediately visualize which lines of code are not covered by tests. (thanks to @gonzalesMK for the help)

  • (5) Maintain the same checks which are already performed. Even this job will benefit from run-checks.sh rewriting in Rust.

Feature motivation

Having a Continuous Integration that implements the points described above, in my opinion, reduces the effort in code maintainability, making the development more interesting, also decreases the possibility to have problems in the future.

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Sep 8, 2023

What we still have to implement :

@gonzalesMK
Copy link
Contributor

gonzalesMK commented Sep 19, 2023

@Luni-4 I have 2 points to consider:

  1. Should we run Rust Doc just once?
  2. Can we minimize running coverage? Maybe run coverage in Linux jobs and then run coverage for specific packages on other OS?

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Sep 20, 2023

@gonzalesMK

  1. What do you mean with just once? Right now we run cargo doc command for std tests on Linux
  2. Yep, that would be fantastic! The code coverage for each crates on Linux and some coverage tests for cross-platform crates. That would be the ideal solution in my opinion. A tradeoff between the usage of heavy resources and fine-grained tests

@gonzalesMK
Copy link
Contributor

  1. Yeah, I just meant to keep like that. I think I misread the first post because I thought the doc was going to run for windows/mac/linux. 👍

Besides, should I close this PR #797 , so to implement this RFC in a new PR ?

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Sep 20, 2023

@gonzalesMK

Perhaps we can transform each bullet point into a PR, in this way it would be simpler to review. What do you think?

@nathanielsimard
Copy link
Member

@Luni-4 I think the current project has a quite fast compilation time, relatively speaking, compared to other Rust projects. The main advantage is splitting it into multiple crates that can easily be cached. I think we could greatly benefit from a faster linker though, maybe something like mold.

@Luni-4
Copy link
Collaborator Author

Luni-4 commented Sep 21, 2023

@nathanielsimard

Yep, the mold idea is contained in the link provided by @gonzalesMK

@gonzalesMK
Copy link
Contributor

Perhaps we can transform each bullet point into a PR, in this way it would be simpler to review. What do you think?

Sounds good to me.

@antimora antimora added the design Design related task label Nov 20, 2023
@Luni-4
Copy link
Collaborator Author

Luni-4 commented Dec 14, 2023

Thanks to @gonzalesMK, @dcvz, and @syl20bnr this issue can be closed! Congrats to everyone for your work and help!

@Luni-4 Luni-4 closed this as completed Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design related task
Projects
None yet
Development

No branches or pull requests

4 participants