glvis icon indicating copy to clipboard operation
glvis copied to clipboard

Update CI to test installation with both GNU make and CMake

Open tzanio opened this issue 3 years ago • 10 comments

This came up in https://github.com/GLVis/glvis/pull/239

tzanio avatar Sep 08 '22 01:09 tzanio

Right now it looks like CI already tests make/cmake for both ubuntu and macos. Is the goal for this to add make support to windows? Otherwise maybe we can close this one as complete

justinlaughlin avatar Jul 25 '24 19:07 justinlaughlin

Native Windows builds (i.e. not using cygwin, WSL, msys2, or something like that) with GNU make are not really possible. CMake is the way to go in this case. Therefore, on Windows, it should be sufficient to just test with CMake.

v-dobrev avatar Jul 25 '24 23:07 v-dobrev

so should we close this?

justinlaughlin avatar Jul 26 '24 00:07 justinlaughlin

Post here what PR addresses this issue, and then it should fine to close this.

v-dobrev avatar Jul 26 '24 00:07 v-dobrev

https://github.com/GLVis/glvis/pull/189 is when cmake became the default in matrix. And the include section still has specific setups for different make tests

justinlaughlin avatar Jul 26 '24 02:07 justinlaughlin

The issue mentioned in the top post is about a bug in the install target. I'm not sure the PR you mention above deals with that -- do we have any tests in CI that run the install target in GNU make or CMake?

v-dobrev avatar Jul 26 '24 02:07 v-dobrev

The issue mentioned in the top post is about a bug in the install target. I'm not sure the PR you mention above deals with that -- do we have any tests in CI that run the install target in GNU make or CMake?

Maybe I'm misunderstanding, but I thought we already test installation using both make and cmake for ubuntu and macos, and cmake for windows?

justinlaughlin avatar Jul 26 '24 14:07 justinlaughlin

I only see commands that build GLVis and then test it in the CI:

  • build with GNU make: https://github.com/GLVis/glvis/blob/ae4abfe31b469a808c2d4d7f31761063104057a7/.github/workflows/builds.yml#L196-L201
  • build with CMake: https://github.com/GLVis/glvis/blob/ae4abfe31b469a808c2d4d7f31761063104057a7/.github/workflows/builds.yml#L203-L221
  • test on Linux: https://github.com/GLVis/glvis/blob/ae4abfe31b469a808c2d4d7f31761063104057a7/.github/workflows/builds.yml#L240-L245
  • test on Mac: https://github.com/GLVis/glvis/blob/ae4abfe31b469a808c2d4d7f31761063104057a7/.github/workflows/builds.yml#L247-L251

I don't see anything that runs the install target.

v-dobrev avatar Jul 27 '24 23:07 v-dobrev

When installed via cmake the install is being tested via tests/CMakeLists.txt which calls tests/glvis_driver.py which executes glvis using a stream file on line 129 .

When installed via make I'm not sure why but it just installs and doesn't test (maybe because the test is performed using cmake?).

We could update the testing to also work for make installations.

justinlaughlin avatar Jul 29 '24 19:07 justinlaughlin

I think you are confusing the build directory with the install directory. The commands in CI build GLVis in the build directory and run it from there. The target called install which performs the installation to the install directory is never run.

With CMake, the install directory is set with the flag -DCMAKE_INSTALL_PREFIX=<install-prefix> and in CI we currently actually do not set it (if not set, the default is a system path like /usr or /usr/local).

With GNU make, the install directory can be set with PREFIX=<install-prefix>/bin on the command line when running make install. The build directory with GNU make is the source directory -- we do not support out-of-source builds.

This issue is about adding a test that invokes the target called install -- there is such a target in both build systems.

Edit: fixed a typo "we support out-of-source builds" -> "we do not support out-of-source builds".

v-dobrev avatar Jul 30 '24 20:07 v-dobrev