diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f5edd8..68e95a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,176 +1,175 @@ .build_docker: image: 'docker:19.03.11' services: - docker:19.03.11-dind variables: # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled DOCKER_HOST: tcp://docker:2376 DOCKER_TLS_CERTDIR: "/certs" stage: .pre before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - echo ${DOCKERFILE} - cd ${DOCKERFILE} - docker build -t ${DOCKERREPO} . - docker push ${DOCKERREPO} when: manual docker build:debian_bullseye: extends: .build_docker variables: DOCKERFILE: dockerfiles/debian:bullseye/ DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:debian_bullseye docker build:ubuntu_19_10: extends: .build_docker variables: DOCKERFILE: dockerfiles/ubuntu:19.10/ DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:ubuntu_19_10 docker build:ubuntu_20_04: extends: .build_docker variables: DOCKERFILE: dockerfiles/ubuntu:20.04/ DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:ubuntu_20_04 .image_lm: variables: CCACHE_BASEDIR: ${CI_PROJECT_DIR}/ CCACHE_DIR: ${CI_PROJECT_DIR}/ccache cache: key: ${DOCKERREPO}_${CI_COMMIT_REF_SLUG} paths: - ${CI_PROJECT_DIR}/ccache - third-party - .git/modules/third-party image: ${DOCKERREPO} artifacts: paths: - build expire_in: 1 day .build_lm: extends: - .image_lm stage: build before_script: - git submodule update --init third-party/eigen - git submodule update --init third-party/akantu - git submodule update --init third-party/lammps script: - echo $CCACHE_DIR - echo $CCACHE_BASEDIR - echo "free -h" - free -h - echo "grep -c ^processor /proc/cpuinfo" - grep -c ^processor /proc/cpuinfo - mkdir -p build - cd build - cmake -DCMAKE_BUILD_TYPE:STRING=Release -DLIBMULTISCALE_AKANTU_PLUGIN:BOOL=ON -DLIBMULTISCALE_MD1D:BOOL=ON -DLIBMULTISCALE_MECA1D:BOOL=ON -DLIBMULTISCALE_LAMMPS_PLUGIN:BOOL=ON -DLIBMULTISCALE_DOCUMENTATION:BOOL=ON -DLIBMULTISCALE_TESTS:BOOL=ON .. - cmake . - make - ls ../ccache .tests: stage: test variables: OMPI_MCA_plm: 'isolated' OMPI_MCA_btl: 'tcp,self' OMPI_ALLOW_RUN_AS_ROOT: 1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 OMPI_MCA_rmaps_base_oversubscribe: 1 script: - cd build/test - export PYTHONPATH=$PYTHONPATH:$CI_PROJECT_DIR/build/python:$CI_PROJECT_DIR/test/python ; ctest -T test --no-compress-output --timeout 300 after_script: - cd build/test - tag=$(head -n 1 < Testing/TAG) - if [ -e Testing/${tag}/Test.xml ]; then - xsltproc -o ./juint.xml ${CI_PROJECT_DIR}/test/ctest2junit.xsl Testing/${tag}/Test.xml; - fi artifacts: when: always paths: - build/test/juint.xml reports: junit: - build/test/juint.xml build:debian_bullseye: variables: DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:debian_bullseye extends: - .build_lm build:ubuntu_19_10: variables: DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:ubuntu_19_10 extends: - .build_lm build:ubuntu_20_04: variables: DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:ubuntu_20_04 extends: - .build_lm test:debian_bullseye: - allow_failure: true variables: DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:debian_bullseye extends: - .tests - .image_lm dependencies: - build:debian_bullseye pages: extends: - .image_lm variables: DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:debian_bullseye stage: deploy script: - cd build - rm -r doc - export PYTHONPATH=$PYTHONPATH:$CI_PROJECT_DIR/build/python ; make libmultiscale-doc - mv doc/build/html ../public artifacts: paths: - public only: - master package: extends: - .image_lm variables: DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:debian_bullseye stage: deploy script: - cd build/python - python3 setup.py sdist bdist_wheel artifacts: paths: - build/python/dist only: - master diff --git a/TODO b/TODO index 6140b43..f0ad735 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,2 @@ -check that these are really testing something - -- test_Dislo_angle_LAMMPS -- test_GEOMETRY (it looks a little slow/long for a test on geometry) - -fix these - -- test_compute_add_loop_PARADIS (Failed) -- test_compute_add_segment_PARADIS (Failed) -- test_parallel_PARADIS (Failed) +- CADD algorithm still needs to be wired with new code design +- Dislocation dynamics advanced tests need to be corrected \ No newline at end of file diff --git a/test/python/CMakeLists.txt b/test/python/CMakeLists.txt index d5a3c4a..7e9de4d 100644 --- a/test/python/CMakeLists.txt +++ b/test/python/CMakeLists.txt @@ -1,82 +1,82 @@ #Copyright EPFL and INRIA # #author : Guillaume ANCIAUX (guillaume.anciaux@epfl.fr, g.anciaux@laposte.net) # #The LibMultiScale is a C++ parallel framework for the multiscale #coupling methods dedicated to material simulations. This framework #provides an API which makes it possible to program coupled simulations #and integration of already existing codes. # #This Project is done in a collaboration between #EPFL within ENAC-LSMS (http://lsms.epfl.ch/) and #INRIA Bordeaux, ScAlApplix (http://www.labri.fr/projet/scalapplix/). # #This software is governed by the CeCILL-C license under French law and #abiding by the rules of distribution of free software. You can use, #modify and/ or redistribute the software under the terms of the CeCILL-C #license as circulated by CEA, CNRS and INRIA at the following URL #"http://www.cecill.info". # #As a counterpart to the access to the source code and rights to copy, #modify and redistribute granted by the license, users are provided only #with a limited warranty and the software's author, the holder of the #economic rights, and the successive licensors have only limited #liability. # #In this respect, the user's attention is drawn to the risks associated #with loading, using, modifying and/or developing or reproducing the #software by the user in light of its specific status of free software, #that may mean that it is complicated to manipulate, and that also #therefore means that it is reserved for developers and experienced #professionals having in-depth computer knowledge. Users are therefore #encouraged to load and test the software's suitability as regards their #requirements in conditions enabling the security of their systems and/or #data to be ensured and, more generally, to use and operate it in the #same conditions as regards security. # #The fact that you are presently reading this means that you have had #knowledge of the CeCILL-C license and that you accept its terms. package_get_all_include_directories( LIBMULTISCALE_INCLUDE_DIRS ) package_get_all_external_informations( PRIVATE_INCLUDE LIBMULTISCALE_EXTERNAL_INCLUDE_DIR LIBRARIES LIBMULTISCALE_EXTERNAL_LIBRARIES ) include_directories(${LIBMULTISCALE_INCLUDE_DIRS} ${LIBMULTISCALE_EXTERNAL_INCLUDE_DIR}) package_get_all_definitions(LIBMULTISCALE_DEFINITIONS) foreach(_dep ${LIBMULTISCALE_DEFINITIONS}) add_definitions(-D${_dep}) endforeach() add_library(test_python MODULE test_python.cc) target_link_libraries(test_python PRIVATE pybind11::module ${LIBMULTISCALE_EXTERNAL_LIBRARIES}) set_target_properties(test_python PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}" SUFFIX "${PYTHON_MODULE_EXTENSION}" ) function(register_pytest name filename) add_test( NAME ${name} - COMMAND python3 -m pytest ${filename} -v + COMMAND python3 -m pytest ${filename} -v -s WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) set_property(TEST ${name} PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/python" ) endfunction(register_pytest) register_pytest(PythonBindings test_bindings.py) register_pytest(Lammps test_lammps.py) register_pytest(CADD test_cadd.py) register_pytest(BRIDGING test_bridging.py) register_pytest(Akantu test_akantu.py) register_pytest(AkantuStatic test_static_akantu.py)