Open ronaldtse opened 3 years ago
The only idea that I have is to rewrite one test from python to C++ and see the impact. It can be an order (10x) but it is a suggestion made on a very shaky grounds. I will try it.
Most of CLI tests were written to check compatibility with GnuPG on initial steps, processing large amounts of random data/generating a lot of keys and so on. Right now we do not need to generate new RSA keys in each test, compress huge files and so on.
I would suggest to add some CLI key, like --run-expensive-tests
, and modify tests to do only necessary checks by default.
rnp_tests.test_dsa_roundtrip
runs 173 sec with Botan and only 4 sec with OpenSSL.In fact our typical CI runner spends 8+ minutes just setting up the stage for configuration and building the codebase. See e.g. https://github.com/rnpgp/rnp/runs/7343968509?check_suite_focus=true The relevant bits are
Run yum -y install git - 1m 0s Setup environment - 1m 25s Build cache - 6m 12s
Only after that comes
tests 1m 57s
That's for cli_tests; rnp_tests take ~2m 45s.
I think producing Docker images for the few prerequisite configurations we use is worth it. CI will go brrr!
@andrey-utkin we did have a long discussion on Docker images some time ago. Perhaps this is a good time to do it!
Yeah, we discussed year or so ago that it would be good to have Docker images with installed CI pre-requisites, just didn't get to this yet. Would be helpful with local debugging/testing as well.
Here are the results from the latest runs after CI speed improvements in #1582 .
Most of the time spent now is in the "Build and Test" stage. I've taken the numbers from the most recent run.
Some of the tests should really not be running so slow, and the point of the test may not even relate to testing time. For some it may be due to reduced entropy of the container.