Skip to content

Add build_even/odd types to split Arduino tests #4737

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

Merged
merged 2 commits into from
May 21, 2018

Conversation

earlephilhower
Copy link
Collaborator

Arduino builds are now taking 49 minutes or more, and failing due to
Travis timeouts.

Split the Arduino build task into even and odd halves, where each job
will build every other test. This will reduce any test's runtime
by 50% and speed up checks to avoid the timeout.

Arduino builds are now taking 49 minutes or more, and failing due to
Travis timeouts.

Split the Arduino build task into even and odd half, where each job
will build every other test.  This will reduce any test's runtime
by 50% and speed up checks to avoid the timeout.
@earlephilhower earlephilhower requested review from devyte and d-a-v May 17, 2018 03:18
@earlephilhower
Copy link
Collaborator Author

Just verified that the combination of both _odd and _even run the same tests as the single combined run (96 in total now).

@earlephilhower earlephilhower requested a review from igrr May 17, 2018 14:33
@earlephilhower
Copy link
Collaborator Author

Added @igrr to get his input, too. Right now it's looking like jobs fail almost all the time due to timeouts, so if we want to get any merges in, this (or some other solution) has probably got to be merged first.

@Juppit
Copy link
Contributor

Juppit commented May 17, 2018

You can use travis build stages, all stages are executed consecutively, and each stage can run up to one hour.

@earlephilhower
Copy link
Collaborator Author

@Juppit interesting idea, I didn't know about them. However, that's not quite the problem we need to solve here.

Everything can be run in parallel with these tests, the problem is that the Arduino "build-all-examples" job itself takes ~ 50 mins to complete, leading to a CI timeout.

With the proposed change, the individual jobs are cut in half to ~25 mins, and all 7 CI jobs are run in parallel (assuming enough CI slots).

@@ -239,7 +249,13 @@ fi

if [ "$BUILD_TYPE" = "build" ]; then
install_arduino
build_sketches_with_arduino
build_sketches_with_arduino 1 0
elif [ "$BUILD_TYPE" = "build_even" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please rename build/build_odd/build_even to e.g. arduino/arduino_odd/arduino_even? It's not critical for the pr, but every time I read through this code it takes me a few minutes to remember that "build" really means arduino and is not common to everything.

build_sketches_with_arduino 2 0
elif [ "$BUILD_TYPE" = "build_odd" ]; then
install_arduino
build_sketches_with_arduino 2 1
elif [ "$BUILD_TYPE" = "platformio" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't a similar even/odd scheme be implemented for platformio builds?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not needed. PlatformIO builds the examples 2x (yes, two times) as fast as Arduino. So it takes ~28mins today vs 50+mins for Ardunio. Should we go from 96 to 200 examples, I'll revisit this statement, but for now we're OK. 😄

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the.times, you're right. Even with load I see the platformio runtime doesn't go above 40mins.

@d-a-v d-a-v mentioned this pull request May 18, 2018
@devyte
Copy link
Collaborator

devyte commented May 21, 2018

Merging this now in the interest of moving forward.

@devyte devyte merged commit a1a9b99 into esp8266:master May 21, 2018
@earlephilhower earlephilhower deleted the parallel_test_build branch May 21, 2018 18:35
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.

4 participants