-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Reduce test time on TravisCI #2757
Conversation
by allowing parallel build of units, and reducing optimization levels. Parallel build is only effective on "recent" versions of `zstd`, as previously, the list of units was passed as a list of source files, which is something neither `make` nor `gcc` can parallelize. So its impact is mildly effective (-20%). Reducing optimization level to `-O1` makes compilation much faster. It also makes runtime slower, but in this test, compilation time dominates run time. The savings are very significant (-50%). On my test system, it reduces the length of this test from 13mn to 5mn.
This was ~30mn, by far the longest run on travisCI. That's because it re-analyzes multiple times the same files (library files notably). It also performs actions that make no sense for the static analyzer purpose, such as building the single-file library. Reduced time spent in this test by reducing its scope : just build the CLI, and obviously the library along it. These are the only ones that really deserve to be analyzed. Unfortunately, it still results in a number of false positives when using newer versions of scanbuild (each version of scanbuild generates a different list of false positives). These will have to be fixed before transfering to Github Actions.
since it fails on Github Actions specifically. The test is run on TravisCI for the time being. Its duration has been reduced to ~6mn anyway.
Note : the flaky failing test is unrelated to this PR :
There seems to be an issue in This test has been failing for a while now, but because the issue is transient, and apparently specific to |
that are being transfered to GA in #2758. This represents a saving of ~25mn of cpu time on TravisCI.
@@ -200,6 +200,18 @@ jobs: | |||
make clean && make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" | |||
make clean && make check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" | |||
|
|||
# This test currently fails on Github Actions specifically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is probably because GH Actions runners are not ttys. I believe there is a third-party GH action that creates a tty now, so I can go back and migrate the tests that were failing because it wasn't a tty at some point.
Well, this was initially an attempt at transferring more tests from TravisCI into Github Actions.
But with additional complexities along the way, I decided to cut down the scope of this PR at just making TravisCI tests shorter.
More test transfers will happen in other PR(s).
qemu
tests, transferred to Github Actions in added qemu tests #2758This reduces cpu time spent on TravisCI by ~90mn per tested commit (from 2h35mn to 1h05mn).