diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2241ce5..ceeefc1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,200 +1,200 @@ .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 - timeout: 1 h 30m + - 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: BUILD_TYPE: Release CCACHE_BASEDIR: ${CI_PROJECT_DIR}/ CCACHE_DIR: ${CI_PROJECT_DIR}/ccache cache: key: ${DOCKERREPO}_${CI_COMMIT_REF_SLUG}_${BUILD_TYPE} 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 - git submodule update --init third-party/paradis script: - echo $CCACHE_DIR - echo $CCACHE_BASEDIR - echo $BUILD_TYPE - 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=$BUILD_TYPE -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 -DLIBMULTISCALE_PARADIS_PLUGIN:BOOL=ON -DLIBMULTISCALE_CADD: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:debian_bullseye_debug: variables: DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:debian_bullseye BUILD_TYPE: Debug 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 + timeout: 1h 30m 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 .test:debian_bullseye_debug: variables: BUILD_TYPE: Debug DOCKERREPO: registry.gitlab.com/libmultiscale/libmultiscale:debian_bullseye extends: - .tests - .image_lm dependencies: - build:debian_bullseye_debug 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