Commit 3e6d99ca authored by GILLES Sebastien's avatar GILLES Sebastien

#1360 Introduce gitlab-ci yaml file: fo the moment only a handful of cases are dealt with.

parent fb1e2f6a
stages:
- stage1
- stage2
# - analysis
# - documentation
# - deploy
# Todo: Doxygen doc should be published with pages.
build-Fedora-debug-shared-several_libs:
stage: stage1
cache:
key: "$CI_COMMIT_REF_SLUG_Fedora-debug-shared-several_libs"
untracked: true
paths:
- build
tags:
- Fedora
- debug
- shared
- several_libs
script:
- mkdir -p build
- cd build && cmake -G Ninja -C ../cmake/PreCache/ci_linux.cmake -DCMAKE_BUILD_TYPE=Debug -DLIBRARY_TYPE=SHARED -DBUILD_MOREFEM_UNIQUE_LIBRARY=False -DCMAKE_INSTALL_PREFIX=/media/suppl_drive/opt/debug/shared/several_libs/ ..
- ninja -j 4
build-Ubuntu-debug-shared-several_libs:
stage: stage1
cache:
key: "$CI_COMMIT_REF_SLUG_Ubuntu-debug-shared-several_libs"
untracked: true
paths:
- build
tags:
- Ubuntu
- debug
- shared
- several_libs
script:
- mkdir -p build
- cd build && cmake -G Ninja -C ../cmake/PreCache/ci_linux.cmake -DCMAKE_BUILD_TYPE=Debug -DLIBRARY_TYPE=SHARED -DBUILD_MOREFEM_UNIQUE_LIBRARY=False -DCMAKE_INSTALL_PREFIX=/media/suppl_drive/opt/debug/shared/several_libs/ ..
- ninja -j 4
build-Fedora-release-static-unique_lib:
stage: stage1
cache:
key: "$CI_COMMIT_REF_SLUG_Fedora-release-static-unique_lib"
untracked: true
paths:
- build
tags:
- Fedora
- release
- static
- unique_lib
script:
- mkdir -p build
- cd build && cmake -G Ninja -C ../cmake/PreCache/ci_linux.cmake -DCMAKE_BUILD_TYPE=Release -DLIBRARY_TYPE=STATIC -DBUILD_MOREFEM_UNIQUE_LIBRARY=True -DCMAKE_INSTALL_PREFIX=/media/suppl_drive/opt/release/static/unique_lib ..
- ninja -j 4
test-Fedora-debug-shared-several_libs:
stage: stage2
cache:
key: "$CI_COMMIT_REF_SLUG_Fedora-debug-shared-several_libs"
untracked: true
paths:
- build
tags:
- Fedora
- debug
- shared
- several_libs
script:
- cd build && ctest
test-Ubuntu-debug-shared-several_libs:
stage: stage2
cache:
key: "$CI_COMMIT_REF_SLUG_Ubuntu-debug-shared-several_libs"
untracked: true
paths:
- build
tags:
- Ubuntu
- debug
- shared
- several_libs
script:
- cd build && ctest
test-Fedora-release-static-unique_lib:
stage: stage2
cache:
key: "$CI_COMMIT_REF_SLUG_Fedora-release-static-unique_lib"
untracked: true
paths:
- build
tags:
- Fedora
- release
- static
- unique_lib
script:
- cd build && ctest
doxygen:
stage: stage1
cache:
key: "$CI_COMMIT_REF_SLUG_doxygen"
untracked: true
paths:
- Documentation/Doxygen
tags:
- Ubuntu
- debug
script:
- cd Documentation/Doxygen
- doxygen complete_dev_guide.dox
# Pages doesn't work as invoked from a subgroup (not supported yet in gitlab)
# pages:
# stage: deploy
# cache:
# key: "$CI_COMMIT_REF_SLUG_doxygen"
# untracked: true
# paths:
# - Documentation/Doxygen
# before_script:
# - mkdir -p public
# tags:
# - linux
# - debug
# script:
# - cd Documentation/Doxygen
# - mv Complete/* ../../public/
# artifacts:
# paths:
# - public
set(CMAKE_INSTALL_PREFIX /placeholder_value CACHE PATH "Installation directory for executables and libraries. A MoReFEM folder will be created there when install is invoked. This value should be overridden in command line!")
set(MOREFEM_THIRD_PARTY_LIBRARIES_DIR /media/suppl_drive/opt)
set(CMAKE_C_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpicc CACHE FILEPATH "C compiler. Prefer to use an openmpi wrapper.")
set(CMAKE_CXX_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpic++ CACHE FILEPATH "C++ compiler. Prefer to use an openmpi wrapper.")
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "Leave this one active.")
set(CMAKE_CXX_EXTENSIONS OFF CACHE STRING "If ON you might be using gnu++17; with OFF you'll use c++17.")
set(LIBRARY_TYPE STATIC CACHE BOOL "Choose either STATIC or SHARED.")
set(BUILD_MOREFEM_UNIQUE_LIBRARY True CACHE BOOL "Whether a unique library is built for MoReFEM core libraries or on the contrary if it is splitted in modules.")
set(MOREFEM_CHECK_UPDATE_GHOSTS_CALL_RELEVANCE False CACHE BOOL "If true, add a (costly) method that gives an hint whether an UpdateGhost() call was relevant or not.")
set(MOREFEM_EXTENDED_TIME_KEEP False CACHE BOOL "If true, TimeKeep gains the ability to track times between each call of PrintTimeElapsed(). If not, PrintTimeElapsed() is flatly ignored. False is the best choice in production!")
set(MOREFEM_NO_TRAP_SNES_EXCEPTION False CACHE BOOL "If true, exceptions aren't caught in the three SNES functions I have to define for a Petsc Newton (at least the default ones; if you define your own it's up to you to introduce the macro in your code). If not caught, an eventual exception will be written properly but the exception is not guaranteed to be caught and it might result in a rather messy output. I therefore advise not to set it to True in debug mode; in release mode it is ok to do so as such exceptios are rare.")
set(OPEN_MPI_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/include CACHE PATH "Include directory of Openmpi library.")
set(OPEN_MPI_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/lib CACHE PATH "Lib directory of Openmpi library." )
set(BLAS_CUSTOM_LINKER False CACHE BOOL "If BLAS_CUSTOM_LINKER is true, BLAS_LIB field must give the command use to link with Blas. For instance on macOS it is usually \"-framework Accelerate\" (Beware: Without the quotes CMake will mute this into -framework -Accelerate). If False, FindLibrary is used to find the Blas library to be used, as for the other libraries in this file. The difference is that the name of the .a, .so or .dylib is not known, so it must be given in BLAS_LIB_NAME field. For instance openblas to find libopenblas.a in BLAS_LIB_DIR.")
set(BLAS_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openblas/lib CACHE STRING "None or path to the lib directory of Blas (see BLAS_CUSTOM_LINKER).")
set(BLAS_LIB openblas CACHE STRING "Name of the Blas lib (e.g. openblas) or command to pass if custom linker is used; see BLAS_CUSTOM_LINKER." )
set(PETSC_DEBUG_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Petsc/debug/include CACHE PATH "Include directory of Petsc library specific to debug configuration.")
set(PETSC_RELEASE_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Petsc/release/include CACHE PATH "Include directory of Petsc library specific to release configuration.")
set(PETSC_DEBUG_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Petsc/debug/lib CACHE PATH "Library directory of Petsc in debug mode.")
set(PETSC_RELEASE_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Petsc/release/lib CACHE PATH "Library directory of Petsc in release mode.")
set(PARMETIS_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Parmetis/include CACHE PATH "Include directory of Parmetis library.")
set(PARMETIS_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Parmetis/lib CACHE PATH "Lib directory of Parmetis library.")
# Lua library.
set(LUA_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Lua/include CACHE PATH "Include directory of Lua library.")
set(LUA_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Lua/lib CACHE PATH "Lib directory of Lua library.")
set(BOOST_DEBUG_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Boost/debug/include CACHE PATH "Include directory of Boost library.")
set(BOOST_DEBUG_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Boost/debug/lib CACHE PATH "Lib directory of Boost library.")
set(BOOST_RELEASE_INCL_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Boost/release/include CACHE PATH "Include directory of Boost library.")
set(BOOST_RELEASE_LIB_DIR ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Boost/release/lib CACHE PATH "Lib directory of Boost library.")
set(PHILLIPS_DIR False CACHE BOOL "If you want to couple Morefem with Phillips library. False in most of the cases! Beware: it is not put in MOREFEM_COMMON_DEP; if you need it you must add it in your add_executable command.")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment