DAMASK_EICMD/.gitlab-ci.yml

220 lines
8.1 KiB
YAML
Raw Normal View History

2017-05-17 13:45:30 +05:30
---
2017-04-12 16:46:27 +05:30
stages:
2021-03-26 21:45:56 +05:30
- prepare
- python
- compile
2021-06-15 23:08:01 +05:30
- setup
2021-03-26 17:54:11 +05:30
- fortran
2017-05-09 03:22:07 +05:30
- performance
2021-03-26 21:45:56 +05:30
- deploy
- update_master
- clean
2017-04-12 16:46:27 +05:30
###################################################################################################
default:
before_script:
- ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --nonblocking
- source $DAMASKROOT/env/DAMASK.sh
- export PATH=${BINDIR}:$PATH
- cd $DAMASKROOT/PRIVATE/testing
- echo Job start:" $(date)"
after_script:
- ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --unregister
- echo Job end:" $(date)"
2017-04-12 16:46:27 +05:30
###################################################################################################
variables:
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2017-04-12 16:46:27 +05:30
# GitLab Settings
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2021-11-13 18:33:06 +05:30
GIT_SUBMODULE_STRATEGY: normal
2017-04-12 16:46:27 +05:30
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2017-04-12 16:46:27 +05:30
# Shortcut names
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2020-11-01 15:22:43 +05:30
DAMASKROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
2020-11-01 17:28:41 +05:30
TESTROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/tests"
BINDIR: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/bin"
2017-04-12 16:46:27 +05:30
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2017-04-12 16:46:27 +05:30
# Names of module files to load
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2019-03-09 22:00:29 +05:30
# ++++++++++++ Compiler +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
IntelCompiler: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
GNUCompiler: "Compiler/GNU/10"
2019-03-09 22:00:29 +05:30
# ++++++++++++ MPI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MPI_Intel: "MPI/Intel/19.1.2/IntelMPI/2019"
MPI_GNU: "MPI/GNU/10/OpenMPI/4.1.1"
2019-03-09 22:00:29 +05:30
# ++++++++++++ PETSc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PETSc_Intel: "Libraries/PETSc/3.16.1/Intel-19.1.2-IntelMPI-2019"
PETSc_GNU: "Libraries/PETSc/3.16.1/GNU-10-OpenMPI-4.1.1"
# ++++++++++++ MSC Marc +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MSC: "FEM/MSC/2021.2"
IntelMarc: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
HDF5Marc: "HDF5/1.12.1/Intel-19.1.2"
2017-04-12 16:46:27 +05:30
2017-04-12 16:46:27 +05:30
###################################################################################################
2017-05-17 13:45:30 +05:30
checkout:
2021-03-26 21:45:56 +05:30
stage: prepare
2017-05-17 13:45:30 +05:30
before_script:
- ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --nonblocking
- echo Job start:" $(date)"
2017-04-12 16:46:27 +05:30
script:
- mkdir -p ${DAMASKROOT}
- mkdir -p ${TESTROOT}
- mkdir -p ${BINDIR}
- cd ${DAMASKROOT}
2021-07-15 18:59:21 +05:30
- git clone -q git@git.damask.mpie.de:damask/DAMASK.git .
- git checkout ${CI_COMMIT_SHA}
2017-04-15 16:28:13 +05:30
- git submodule update --init
2017-04-12 16:46:27 +05:30
###################################################################################################
2021-11-01 03:13:06 +05:30
pytest:
stage: python
script:
- PYTHONPATH=${CI_PROJECT_DIR}/python
- cd ${CI_PROJECT_DIR}/python
- pytest --basetemp ${TESTROOT}/python -v --cov --cov-report=term
2021-03-28 16:16:26 +05:30
- coverage report --fail-under=90
2021-11-01 03:13:06 +05:30
mypy:
stage: python
script:
- cd ${CI_PROJECT_DIR}/python
- mypy -m damask
2021-11-01 03:13:06 +05:30
###################################################################################################
compile_grid_Intel:
stage: compile
script:
2020-11-28 03:42:54 +05:30
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
2020-10-05 22:36:19 +05:30
- cd pytest
- pytest -k 'compile and grid' --basetemp ${TESTROOT}/compile_grid_Intel
compile_mesh_Intel:
stage: compile
2018-08-20 12:43:20 +05:30
script:
2020-11-28 03:42:54 +05:30
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
2020-10-05 22:36:19 +05:30
- cd pytest
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_Intel
2018-08-20 12:43:20 +05:30
compile_grid_GNU:
stage: compile
script:
2020-11-28 03:42:54 +05:30
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
2020-10-05 22:36:19 +05:30
- cd pytest
- pytest -k 'compile and grid' --basetemp ${TESTROOT}/compile_grid_GNU
compile_mesh_GNU:
stage: compile
2018-08-20 12:43:20 +05:30
script:
2020-11-28 03:42:54 +05:30
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
2020-10-05 22:36:19 +05:30
- cd pytest
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_GNU
2018-08-20 12:43:20 +05:30
2021-03-26 21:45:56 +05:30
compile_Marc:
stage: compile
script:
- module load $IntelMarc $HDF5Marc $MSC
- cd pytest
- pytest -k 'compile and Marc' --basetemp ${TESTROOT}/compile_Marc
2021-06-15 23:08:01 +05:30
###################################################################################################
setup_grid:
2021-06-15 23:08:01 +05:30
stage: setup
2017-04-19 14:20:07 +05:30
script:
2020-11-28 03:42:54 +05:30
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
- cd $(mktemp -d)
- cmake -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${LOCAL_HOME}/GitLabCI_Pipeline_${CI_PIPELINE_ID} ${CI_PROJECT_DIR}
- make -j2 all install
setup_mesh:
2021-06-15 23:08:01 +05:30
stage: setup
script:
2020-11-28 03:42:54 +05:30
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
- cd $(mktemp -d)
- cmake -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${LOCAL_HOME}/GitLabCI_Pipeline_${CI_PIPELINE_ID} ${CI_PROJECT_DIR}
- make -j2 all install
2017-05-17 13:45:30 +05:30
###################################################################################################
2021-03-26 21:45:56 +05:30
core:
2021-03-26 17:54:11 +05:30
stage: fortran
2020-09-25 11:45:22 +05:30
script:
2020-11-28 03:42:54 +05:30
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
2020-09-25 11:45:22 +05:30
- cd pytest
- pytest -k 'not compile' --basetemp ${TESTROOT}/fortran -v
2020-09-25 11:45:22 +05:30
2021-06-22 03:55:27 +05:30
# Needs closer look
# Phenopowerlaw_singleSlip:
# stage: fortran
# script: Phenopowerlaw_singleSlip/test.py
2021-06-22 03:55:27 +05:30
2017-05-09 03:22:07 +05:30
###################################################################################################
grid_runtime:
2017-05-09 03:22:07 +05:30
stage: performance
2017-04-12 16:46:27 +05:30
script:
2020-11-28 03:42:54 +05:30
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
- cd $DAMASKROOT
2021-03-26 17:37:05 +05:30
- make clean grid OPTIMIZATION=AGGRESSIVE
- REPO_DIR=$(mktemp -d)
- git clone -q git@git.damask.mpie.de:damask/performance.git ${REPO_DIR}
- cd ${DAMASKROOT}/PRIVATE/testing/
- ./runtime.py --input_dir $DAMASKROOT/examples/grid --output_dir ${REPO_DIR} --tag ${CI_COMMIT_SHA}
- if [ ${CI_COMMIT_BRANCH} == development ]; then git commit -am ${CI_PIPELINE_ID}_${CI_COMMIT_SHA}; git push; fi
resource_group: runtime
before_script:
- ${LOCAL_HOME}/bin/manage_pool -j ${CI_JOB_ID} -p ${CI_PIPELINE_ID} --blocking
2021-11-13 23:09:19 +05:30
- source $DAMASKROOT/env/DAMASK.sh
2017-05-17 13:45:30 +05:30
###################################################################################################
2021-03-26 21:45:56 +05:30
source_distribution:
stage: deploy
script:
- cd $(mktemp -d)
- ${CI_PROJECT_DIR}/PRIVATE/releasing/tar.xz/create.sh ${CI_PROJECT_DIR} ${CI_COMMIT_SHA}
###################################################################################################
2021-03-26 21:45:56 +05:30
merge_into_master:
stage: update_master
2017-05-09 03:22:07 +05:30
script:
- cd ${DAMASKROOT}
2017-05-09 03:22:07 +05:30
- export TESTEDREV=$(git describe) # might be detached from development branch
- echo ${TESTEDREV} > python/damask/VERSION
2021-10-07 18:17:38 +05:30
- git add python/damask/VERSION
- >
git diff-index --quiet HEAD ||
2021-10-07 18:17:38 +05:30
git commit -m "[skip ci] updated version information after successful test of $TESTEDREV"
2017-05-09 03:22:07 +05:30
- export UPDATEDREV=$(git describe) # tested state + 1 commit
- git checkout master
- git pull
2017-05-09 03:22:07 +05:30
- git merge $UPDATEDREV -s recursive -X ours # conflicts occur only for inconsistent state
- git push origin master # master is now tested version and has updated VERSION file
- git checkout development
- git pull
- git merge master -s recursive -X ours -m "[skip ci] Merge branch 'master' into development" # only possible conflict is in VERSION file
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
only:
- development
###################################################################################################
clean_pool:
stage: clean
script:
- ${LOCAL_HOME}/bin/manage_pool -p ${CI_PIPELINE_ID} --clean
when: always
before_script:
- echo Job start:" $(date)"
after_script:
- echo Job end:" $(date)"