Pressio / pressio

core C++ library
Other
45 stars 7 forks source link

ci workflows: get rid of pressio-builder and use dirctly cmake configure line #617

Closed fnrizzi closed 1 year ago

fnrizzi commented 1 year ago

in https://github.com/Pressio/pressio/blob/main/.github/workflows/ci-workflow.yml when we need to build pressio, we are now using pressio-builder to do so because it contains inside shortcuts. for example: https://github.com/Pressio/pressio/blob/a6a86b649fea045e6b735a7bb0a7d28cf2960a73/.github/workflows/ci-workflow.yml#L125-L130

we need to get rid of this and replace this with the pure cmake command:

cmake ...


For https://github.com/Pressio/pressio/blob/a6a86b649fea045e6b735a7bb0a7d28cf2960a73/.github/workflows/ci-workflow.yml#L41-L42

the cmake line to use is something like:

cmake /__w/pressio/pressio -D CMAKE_BUILD_TYPE:STRING=Release -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE -D CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -D CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ -D PRESSIO_ENABLE_TPL_EIGEN=ON -D EIGEN_INCLUDE_DIR='/usr/local/eigen/install;/usr/local/eigen/install/include/eigen3' -D GTEST_ROOT=/usr/local/gtest/install -D PRESSIO_ENABLE_DEBUG_PRINT=ON -D PRESSIO_ENABLE_TESTS:BOOL=ON -D CMAKE_INSTALL_PREFIX:PATH=../install  -D CMAKE_CXX_FLAGS=''

see for example the configure stage of this https://github.com/Pressio/pressio/actions/runs/5393023689/jobs/9792181161


For https://github.com/Pressio/pressio/blob/a6a86b649fea045e6b735a7bb0a7d28cf2960a73/.github/workflows/ci-workflow.yml#L153-L154 the cmake line to use is something like:

cmake /__w/pressio/pressio -D CMAKE_BUILD_TYPE:STRING=Debug -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE -D PRESSIO_ENABLE_TPL_MPI:BOOL=ON -D CMAKE_C_COMPILER:FILEPATH=/usr/bin/mpicc -D CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/mpic++ -D MPI_Fortran_COMPILER:FILEPATH=/usr/bin/mpif90 -D PRESSIO_ENABLE_TESTS:BOOL=ON -D PRESSIO_ENABLE_TPL_EIGEN=ON -D EIGEN_INCLUDE_DIR='/home/pressio_builds/eigen/install;/home/pressio_builds/eigen/install/include/eigen3' -D GTEST_ROOT=/home/pressio_builds/gtest/install -D PRESSIO_ENABLE_TPL_TRILINOS=ON -D TRILINOS_ROOT=/home/pressio_builds/trilinos/install -D PRESSIO_ENABLE_TPL_KOKKOS=ON -D KOKKOS_ROOT= -D KOKKOS_KERNELS_ROOT= -D PRESSIO_ENABLE_TPL_BLAS=ON -D PRESSIO_ENABLE_TPL_LAPACK=ON -D PRESSIO_ENABLE_DEBUG_PRINT=ON -D CMAKE_INSTALL_PREFIX:PATH=../install  -D CMAKE_CXX_FLAGS=''

see for example the build stage in https://github.com/Pressio/pressio/actions/runs/5393023689/jobs/9792180259


For https://github.com/Pressio/pressio/blob/a6a86b649fea045e6b735a7bb0a7d28cf2960a73/.github/workflows/ci-workflow.yml#L230 there is nothing to change since it already uses raw cmake

antoinemeyer5 commented 1 year ago

Two-part solution to this issue: