Skip to content

Add build_even/odd types to split Arduino tests - #4737

Merged
devyte merged 2 commits into
esp8266:masterfrom
earlephilhower:parallel_test_build
May 21, 2018
Merged

devyte merged 2 commits into
esp8266:masterfrom
earlephilhower:parallel_test_build

Conversation

@earlephilhower

Copy link
Copy Markdown
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 d-a-v and devyte May 17, 2018 03:18
@earlephilhower

Copy link
Copy Markdown
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
Copy Markdown
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

Juppit commented May 17, 2018

Copy link
Copy Markdown
Contributor

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

@earlephilhower

Copy link
Copy Markdown
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).

Comment thread tests/common.sh
install_arduino
build_sketches_with_arduino
build_sketches_with_arduino 1 0
elif [ "$BUILD_TYPE" = "build_even" ]; then

Copy link
Copy Markdown
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.

Comment thread tests/common.sh
elif [ "$BUILD_TYPE" = "build_odd" ]; then
install_arduino
build_sketches_with_arduino 2 1
elif [ "$BUILD_TYPE" = "platformio" ]; then

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

devyte commented May 21, 2018

Copy link
Copy Markdown
Collaborator

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