brenoguim / flexclass

A library for classes with flexible layout
MIT License
56 stars 6 forks source link

Adding preprocessed library size check (fixes #12) #23

Closed eullerborges closed 3 years ago

eullerborges commented 3 years ago

This includes a job in the default CMake GitHub Action to allow us to check the preprocessed size for every push.

The CMakeLists.txt is a bit on the hacky side since I couldn't find a better way to instruct CMake to generate a preprocessed file. Note that with this code, this check won't ever work for the Visual Studio compiler as the syntax for preprocessing with it is a bit different.

I've tested this to work properly in my fork. Today the preprocessed library has 3558 lines (on both Debug and Release) which is why I've set the limit to 4500 lines, following a similar reasoning as that of the time of writing of #12.

codecov-io commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@6c66593). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #23   +/-   ##
=========================================
  Coverage          ?   96.42%           
=========================================
  Files             ?        1           
  Lines             ?      196           
  Branches          ?        0           
=========================================
  Hits              ?      189           
  Misses            ?        7           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6c66593...a83621f. Read the comment docs.

brenoguim commented 3 years ago

The CMakeLists.txt is a bit on the hacky side since I couldn't find a better way to instruct CMake to generate a preprocessed file. Note that with this code, this check won't ever work for the Visual Studio compiler as the syntax for preprocessing with it is a bit different.

I think that is fine. Perhaps we can disable/adjust that for visual studio when time comes to support that.