Installation instructions can be found here.
Normally the data needed for testing is downloaded during the "ctest" step (if you have -DENABLE_EXTRA_TESTS=1) but you can also download all the data from here:
Note: Untar this into the top-level of the CMake "build" directory (not the source directory)
Please be reminded that ecCodes is also available as a "conda" package. See How to install ecCodes with Python bindings in conda - ecCodes FAQ for more information.