Description of changes:
The gradle tasks coverage_exec and test_exec correspond to the
underlying CMake tasks coverage and check respectively. In CMake,
the coverage task depends on check. Because of how the gradle task
dependencies are wired up we run these tasks separately and end up
running the CMake check task twice. The check target is responsible for
running all of our unit tests which is by far the longest portion of our
build which is why not doing that twice cuts our build time by 35%. This
avoids the redundancy by re-arranging the dependency graph in gradle to
run coverage once and generate both unit test and coverage reports out
of it.
# Run this to profile the build
./gradlew --profile release
# Before this change we get this total build time
Total Build Time 11m11.85s
## We end up running these Gradle tasks which account for the bulk of our build
:coverage_exec 4m49.22s
:test_exec 3m55.42s
:buildAwsLc 1m39.76s
...
# After this change, here's the new build time
Total Build Time 7m20.29s
## The speedup here comes from eliminating the :test_exec Task
:coverage_exec 4m51.70s
:buildAwsLc 1m39.82s
...
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: CryptoAlg-2210
Description of changes: The gradle tasks coverage_exec and test_exec correspond to the underlying CMake tasks coverage and check respectively. In CMake, the coverage task depends on check. Because of how the gradle task dependencies are wired up we run these tasks separately and end up running the CMake check task twice. The check target is responsible for running all of our unit tests which is by far the longest portion of our build which is why not doing that twice cuts our build time by 35%. This avoids the redundancy by re-arranging the dependency graph in gradle to run coverage once and generate both unit test and coverage reports out of it.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.