- Notifications
You must be signed in to change notification settings - Fork34
Allow user-defined Makefile to optimize compiling#355
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
jgfoster wants to merge8 commits intoArduino-CI:masterChoose a base branch fromjgfoster:makefile
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
- Fix error in logging failures
- Change order of linking
@ian, We've been using this for a number of months based on my fork and I'd like to pull it into here so we can return to using this upstream project. Other than adding a test for the new behavior, the substance of the change is at lib/arduino_ci/cpp_library.rb:543-548. Let me know if you have any concerns; if not, I'll go ahead and merge it. |
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
Ourproject has about 100 application source files and 50 test files. When I repeatedly run the tests (with no changes) on my local machine they take about 3-1/2 minutes. About half of that time is spent determining what files to compile and what include directories to use and the other half of that time is spent doing the compiling (one file at a time).
When (re)building a large project programmers typically use a tool like
make
to keep track of dependencies and avoid recompiling files that have not changed. Of course, there is a cost to maintaining theMakefile
but it is typically worth it.With this change we allow the user to provide a
Makefile
that considerably shortens the process (my project takes 10 seconds to rerun all tests if there are no changes; 15 seconds if there is a change to one test file; and 25 seconds if there is a change to an application file).If the user does not provide a
Makefile
then the prior behavior is preserved. Note that this is disabled on Windows (I don't know enough about the build environment; does it supportg++
?).