Skip to content
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

WIP: Unit tests: Improve build time #1141

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dbaston
Copy link
Member

@dbaston dbaston commented Aug 15, 2024

  • Remove unnecessary includes from tut.hpp
  • Add tut.hpp to precompiled headers

Improves test build time from 4:30 to 3:20 on my system.

@dbaston dbaston force-pushed the test-build-time-opt branch 4 times, most recently from 6323768 to 4be3d40 Compare August 15, 2024 18:15
- Remove unnecessary includes from tut.hpp
- Add tut.hpp to precompiled headers

Improves test build time from 4:30 to 3:20 on my system.
Reducing to -O0 disables precompiled headers and actually increases
build time.
@dbaston
Copy link
Member Author

dbaston commented Aug 15, 2024

I disabled precompiled headers, since they were causing problems outside of Linux/gcc that I don't have time to track down. Remaining failures are:

MSVC:

 cl : command line  error D8016: '/O1' and '/RTC1' command-line options are incompatible [D:\a\geos\geos\build\tests\unit\test_geos_unit.vcxproj]

https://github.com/libgeos/geos/actions/runs/10410141366/job/28831289025?pr=1141#step:3:587

MacOS clang14:

179: geos::geom::Envelope: .....[6=F]..............
179: 
179: ---> group: geos::geom::Envelope, test: test<6>
179:      problem: assertion failed
179:      failed assertion: `FE_INVALID raised`

https://github.com/libgeos/geos/actions/runs/10410141366/job/28831291511?pr=1141#step:8:2684

@dbaston dbaston changed the title Unit tests: Improve build time WIP: Unit tests: Improve build time Aug 15, 2024
@dbaston
Copy link
Member Author

dbaston commented Aug 15, 2024

I suspect the "real solution" to improving the build time is to use a unity build, but that doesn't play well with TUT's use of typedefs:

typedef test_group<test_sgpr_data> group;
typedef group::object object;

test_group<test_sgpr_data> test_sgpr_group("geos::precision::SimpleGeometryPrecisionReducer");

template<>
template<>
void object::test<1>()

We need object to be globally unique, and doing so manually would make writing these tests even more cumbersome than it already is.

@robe2 robe2 added this to the 3.14.0 milestone Aug 21, 2024
@pramsey pramsey added the WIP Work in progress, do not merge. label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress, do not merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants