qmcpack icon indicating copy to clipboard operation
qmcpack copied to clipboard

Include make install in CI

Open ye-luo opened this issue 3 years ago • 3 comments

Maybe https://github.com/QMCPACK/qmcpack/issues/3720 can be caught. Not necessary in all cases. We can take advantage of DESTDIR pointing to a writable location.

ye-luo avatar Jan 12 '22 22:01 ye-luo

CMAKE_INSTALL_PREFIX=some_test_location is how I recommend we advertise our install capabilities. DESTDIR is a bit of an afterthought in the cmake docs. Testing both routes wouldn't hurt and testing that the executables are present in the expected location, presumably part of this test, would capture a significant gap in our testing. e.g. Currently I can delete the qmcpack or ppconvert targets in the CMakeLists.txt and our tests will all pass.

prckent avatar Jan 12 '22 23:01 prckent

Users should use CMAKE_INSTALL_PREFIX. DESTDIR is useful like chroot. Since they produce a the composite effect, we can just test both together. -DCMAKE_INSTALL_PREFIX=test_install at CMake and then

make DESTDIR=`pwd`/install_base
# add an additional layer install_base just in case CMAKE_INSTALL_PREFIX gets omitted and install lands in `pwd` which is the build directory.

the whole installation should land in <builddir>/install_base/test_install

Testing where qmcpack in the build directory and in the install directory needs two different tests. the former one can be done in ctest, the latter needs to be done outside CMake.

Currently I can delete the qmcpack or ppconvert targets in the CMakeLists.txt and our tests will all pass.

I doubt this is true. If this is the case, we need an issue.

ye-luo avatar Jan 13 '22 00:01 ye-luo

A change to CMakeLists.txt that leaves it valid while removing, say, a subdirectory will remove the executable targets and all the tests associated with it. I have done this by accident to ppconvert and nexus by botching a file merge.

As a solution I would suggest a set of tests that independently checks for the expected executables using a hard coded list, something independent of the main infrastructure. Definitely an edge case but it is possible.

prckent avatar Jan 13 '22 01:01 prckent