unit-e icon indicating copy to clipboard operation
unit-e copied to clipboard

Split Travis builds in few stages

Open kostyantyn opened this issue 6 years ago • 1 comments

Is your feature request related to a problem? Please describe Currently, we have 6 parallel builds on Travis that do a compilation, then optionally run unit tests and after optionally run functional tests. It works quite well but if we want to add another build that reuses the same unit-e binary, we would need to recompile the unit-e again. In this case, we will increase the build time as we would need to have more resources to execute another parallel compilation.

Also, we can't run unit and functional tests in parallel, and it can be quite useful to get feedback from the Travis if functional tests are OK.

Describe the solution you'd like I'd like to split builds into 2 steps.

  1. we compile binaries per platform and cache them. It seems that Travis supports it https://docs.travis-ci.com/user/build-stages/warm-cache/
  2. Create parallel builds that will use the necessary binary to run unit or functional test only

In this case, we could create a separate build for feature_no_esperanza_tx_relay_delay.py which we keep breaking as we don't pay attention to the CRON job when open any PR (see https://github.com/dtr-org/unit-e/issues/656) and it won't increase the overall build time as we don't run any compilation, just execute a single long-running test in parallel with others.

kostyantyn avatar Mar 12 '19 12:03 kostyantyn

We can take this very far. For instance we could execute in the build / compile build just cd src; make united. This will only build the unit-e binary. This is the only thing required to run the functional tests.

The unit test build could then build the unit tests (cd src; make test/test_unite) or the rest (make check, required to backup the whole build directory in cache).

This should start functional tests way earlier and run the compilation of the unit tests and the execution of functional tests in parallel. Also it is now super easy to spot whether the tests do not compile or the production code.

scravy avatar Mar 12 '19 16:03 scravy