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

Add test to verify headers are self-contained #147

Merged
merged 1 commit into from Oct 5, 2018

Conversation

mloskot
Copy link
Member

@mloskot mloskot commented Oct 3, 2018

For each header, a translation unit is generated along with corresponding compile target.
Currently, only boost/gil/*.hpp and boost/gil/io/* headres are included.

On CI services, compile self_contained_headers targets only if TEST_HEADERS environment variable is set. This is to avoid build timeouts due to CI services limits.
When running b2 locally, the tests are compiled by default.


NOTE: The self-contained headers tests are built by default. There will be compilation errors due to actual 'broken' headers! Obviously, those need to be fixed via dedicated PRs/commits.

References

Tasklist

  • Review
  • Adjust for comments
  • All CI builds and checks have passed

Copy link
Member

@stefanseefeld stefanseefeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure to fully understand the (Jamfile) logic, but conceptually this looks good to me. So, trusting that the CI will catch any issues, I'm going to approve this.

@mloskot
Copy link
Member Author

mloskot commented Oct 3, 2018

Feel free to ask specific questions about that script. I'll do my best to explain.

@mloskot
Copy link
Member Author

mloskot commented Oct 3, 2018

A sample of errors caught by the two CI-s:

C:\projects\boost\boost/gil/io/bit_operations.hpp(28): 
    error C2061: syntax error: identifier 'byte_t'
./boost/gil/premultiply.hpp: In member function ‘void boost::gil::premultiply::operator()(const SrcP&, DstP&) const’:
./boost/gil/premultiply.hpp:59:3: 
    error: ‘for_each’ is not a member of ‘boost::mpl’
        mpl::for_each<src_colour_channels>(channel_premultiply<SrcP, DstP>(src, dst));
       ^

mloskot added a commit to mloskot/gil that referenced this pull request Oct 3, 2018
Make core and io headers self-contained.
Required by test to verify headers are self-contained in boostorg#147.
@mloskot mloskot force-pushed the ml/add-headers-compile-test branch from 138a6dc to 36669fc Compare October 4, 2018 18:10
@mloskot
Copy link
Member Author

mloskot commented Oct 5, 2018

The new test require more time from the CI jobs, while the allowance is limited, eg.
https://travis-ci.org/boostorg/gil/builds/437264162

My plan is to:

  • Improve Jamfile to make the self_contained_headers test built on demand only via explicit b2 <target> request or dedicated environment variable
  • Update CI builds to run the headers test only during single job, eg. GCC 5

@mloskot mloskot changed the title Add test to verify headers are self-contained WIP: Add test to verify headers are self-contained Oct 5, 2018
For each header, a translation unit is generated along with
corresponding compile target.
Currently, only boost/gil/*.hpp and boost/gil/io/* headres are included.

On CI services, compile self_contained_headers targets only if
TEST_HEADERS environment variable is set. This is to avoid build
timeouts due to CI services limits.
When running b2 locally, the tests are compiled by default.
@mloskot mloskot force-pushed the ml/add-headers-compile-test branch from 36669fc to 9dc67ea Compare October 5, 2018 16:13
@mloskot
Copy link
Member Author

mloskot commented Oct 5, 2018

Done in 9dc67ea

On CI services, compile self_contained_headers targets only if TEST_HEADERS environment variable is set. This is to avoid build timeouts due to CI services limits. When running b2 locally, the tests are compiled by default.

@mloskot mloskot changed the title WIP: Add test to verify headers are self-contained Add test to verify headers are self-contained Oct 5, 2018
@mloskot mloskot added this to the Boost 1.69+ milestone Oct 5, 2018
@mloskot mloskot merged commit 1f1f883 into boostorg:develop Oct 5, 2018
@mloskot mloskot deleted the ml/add-headers-compile-test branch October 5, 2018 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants