libhal / SJSU-Dev2

Firmware platform written by San Jose State University for building application for embedded systems
Apache License 2.0
42 stars 63 forks source link

Make `make presubmit` fast #1279

Closed kammce closed 4 years ago

kammce commented 4 years ago

Feature Request

The new make presubmit will perform the build and tidy check files for the current commit rather than checking all of them. The previous full version will be named make full-presubmit.

Detailed Description

The build stage currently takes 8 min to complete. Tidy name check takes 10 minutes to complete.

See this link for the build times: https://travis-ci.com/github/SJSU-Dev2/SJSU-Dev2/jobs/355021682.

To fix this we should:

  1. Only build projects if they were created in the latest commit
  2. Only .cpp and .hpp files found in the latest commit.
kammce commented 4 years ago

Building just new project is not acceptable. If collaborators edit files outside of a project and that project isn't rebuilt, there is no telling if that project actually still works or is broken due to the change. The only way to do this effectively would be to store dependencies in some way such that they could be retrieved and compared against currently changed files. Or to use gcc to generate the dependencies, but at that point, you mind as well just compile the project.

So going forward, only option 2 will be created.