400 lines
12 KiB
YAML
400 lines
12 KiB
YAML
---
|
|
stages:
|
|
- prepareAll
|
|
- python
|
|
- deprecated
|
|
- compile
|
|
- grid
|
|
- marc
|
|
- performance
|
|
- createPackage
|
|
- createDocumentation
|
|
- saveDocumentation
|
|
- updateMaster
|
|
- clean
|
|
- releaseLock
|
|
|
|
###################################################################################################
|
|
before_script:
|
|
- if [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue)x == 'x' ];
|
|
then echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue;
|
|
fi
|
|
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
|
|
do sleep 5m;
|
|
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
|
|
done
|
|
- source $DAMASKROOT/env/DAMASK.sh
|
|
- cd $DAMASKROOT/PRIVATE/testing
|
|
- echo Job start:" $(date)"
|
|
|
|
###################################################################################################
|
|
after_script:
|
|
- echo Job end:" $(date)"
|
|
|
|
###################################################################################################
|
|
variables:
|
|
# ===============================================================================================
|
|
# GitLab Settings
|
|
# ===============================================================================================
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
|
|
# ===============================================================================================
|
|
# Shortcut names
|
|
# ===============================================================================================
|
|
DAMASKROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
|
|
TESTROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/tests"
|
|
|
|
# ===============================================================================================
|
|
# Names of module files to load
|
|
# ===============================================================================================
|
|
# ++++++++++++ Compiler +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
IntelCompiler19_1: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
|
|
GNUCompiler10: "Compiler/GNU/10"
|
|
# ------------ Defaults ----------------------------------------------
|
|
IntelCompiler: "$IntelCompiler19_1"
|
|
GNUCompiler: "$GNUCompiler10"
|
|
# ++++++++++++ MPI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
IMPI2020Intel19_1: "MPI/Intel/19.1.2/IntelMPI/2019"
|
|
OMPI4_0GNU10: "MPI/GNU/10/OpenMPI/4.0.5"
|
|
# ------------ Defaults ----------------------------------------------
|
|
MPI_Intel: "$IMPI2020Intel19_1"
|
|
MPI_GNU: "$OMPI4_0GNU10"
|
|
# ++++++++++++ PETSc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
PETSc3_14_2IMPI2020Intel19_1: "Libraries/PETSc/3.14.2/Intel-19.1.2-IntelMPI-2019"
|
|
PETSc3_14_2OMPI4_0GNU10: "Libraries/PETSc/3.14.2/GNU-10-OpenMPI-4.0.5"
|
|
# ------------ Defaults ----------------------------------------------
|
|
PETSc_Intel: "$PETSc3_14_2IMPI2020Intel19_1"
|
|
PETSc_GNU: "$PETSc3_14_2OMPI4_0GNU10"
|
|
# ++++++++++++ commercial FEM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
MSC2020: "FEM/MSC/2020"
|
|
# ------------ Defaults ----------------------------------------------
|
|
MSC: "$MSC2020"
|
|
IntelMarc: "$IntelCompiler19_1"
|
|
HDF5Marc: "HDF5/1.12.0/Intel-19.1.2"
|
|
|
|
###################################################################################################
|
|
checkout:
|
|
stage: prepareAll
|
|
before_script:
|
|
- echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue
|
|
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
|
|
do sleep 5m;
|
|
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
|
|
done
|
|
script:
|
|
- mkdir -p $DAMASKROOT
|
|
- mkdir -p $TESTROOT
|
|
- cd $DAMASKROOT
|
|
- git clone -q git@magit1.mpie.de:damask/DAMASK.git .
|
|
- git checkout $CI_COMMIT_SHA
|
|
- git submodule update --init
|
|
- source env/DAMASK.sh
|
|
- make processing
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Pytest_python:
|
|
stage: python
|
|
script:
|
|
- cd $DAMASKROOT/python
|
|
- pytest --basetemp=${TESTROOT}/python -v
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Pre_SeedGeneration:
|
|
stage: deprecated
|
|
script: PreProcessing_SeedGeneration/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Pre_GeomGeneration:
|
|
stage: deprecated
|
|
script: PreProcessing_GeomGeneration/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Pre_GeomModification:
|
|
stage: deprecated
|
|
script: PreProcessing_GeomModification/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Pre_General:
|
|
stage: deprecated
|
|
script: PreProcessing/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Post_General:
|
|
stage: deprecated
|
|
script: PostProcessing/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Post_GeometryReconstruction:
|
|
stage: deprecated
|
|
script: spectral_geometryReconstruction/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Post_addCurl:
|
|
stage: deprecated
|
|
script: addCurl/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Post_addDivergence:
|
|
stage: deprecated
|
|
script: addDivergence/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Post_addGradient:
|
|
stage: deprecated
|
|
script: addGradient/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Post_OrientationAverageMisorientation:
|
|
stage: deprecated
|
|
script:
|
|
- OrientationAverageMisorientation/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
compile_grid_Intel:
|
|
stage: compile
|
|
script:
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
|
- cd pytest
|
|
- pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_Intel
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
compile_mesh_Intel:
|
|
stage: compile
|
|
script:
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
|
- cd pytest
|
|
- pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_Intel
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
compile_grid_GNU:
|
|
stage: compile
|
|
script:
|
|
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
|
- cd pytest
|
|
- pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_GNU
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
compile_mesh_GNU:
|
|
stage: compile
|
|
script:
|
|
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
|
- cd pytest
|
|
- pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_GNU
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
compile_MARC:
|
|
stage: compile
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- cd pytest
|
|
- pytest -k 'compile and Marc' --basetemp=${TESTROOT}/compile_Marc
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
setup_grid:
|
|
stage: compile
|
|
script:
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
|
- BUILD_DIR=$(mktemp -d)
|
|
- cd ${BUILD_DIR}
|
|
- cmake -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
|
|
- make -j2 all install
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
setup_mesh:
|
|
stage: compile
|
|
script:
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
|
- BUILD_DIR=$(mktemp -d)
|
|
- cd ${BUILD_DIR}
|
|
- cmake -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
|
|
- make -j2 all install
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Pytest_grid:
|
|
stage: grid
|
|
script:
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
|
- cd pytest
|
|
- pytest -k 'not compile' --basetemp=${TESTROOT}/fortran -v
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Thermal:
|
|
stage: grid
|
|
script: Thermal/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Nonlocal_Damage_DetectChanges:
|
|
stage: grid
|
|
script: Nonlocal_Damage_DetectChanges/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Plasticity_DetectChanges:
|
|
stage: grid
|
|
script: Plasticity_DetectChanges/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Phenopowerlaw_singleSlip:
|
|
stage: grid
|
|
script: Phenopowerlaw_singleSlip/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
|
|
###################################################################################################
|
|
J2_plasticBehavior:
|
|
stage: marc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- J2_plasticBehavior/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Marc_elementLib:
|
|
stage: marc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- Marc_elementLib/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
SpectralRuntime:
|
|
stage: performance
|
|
script:
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
|
- cd $DAMASKROOT
|
|
- make clean grid processing OPTIMIZATION=AGGRESSIVE
|
|
- cd $LOCAL_HOME/performance # location of old results
|
|
- git checkout . # undo any changes (i.e. run time data from non-development branch)
|
|
- cd $DAMASKROOT/PRIVATE/testing
|
|
- SpectralAll_runtime/test.py -d $LOCAL_HOME/performance
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
createTar:
|
|
stage: createPackage
|
|
script:
|
|
- cd $(mktemp -d)
|
|
- $DAMASKROOT/PRIVATE/releasing/deployMe.sh $CI_COMMIT_SHA
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Python:
|
|
stage: createDocumentation
|
|
script:
|
|
- echo 'tbd one matesting1'
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
##################################################################################################
|
|
backupData:
|
|
stage: saveDocumentation
|
|
script:
|
|
- cd $LOCAL_HOME/performance # location of new runtime results
|
|
- git commit -am"${CI_PIPELINE_ID}_${CI_COMMIT_SHA}"
|
|
- mkdir $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}
|
|
- mv $LOCAL_HOME/performance/time.png $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
|
|
- mv $LOCAL_HOME/performance/memory.png $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
|
|
only:
|
|
- development
|
|
|
|
##################################################################################################
|
|
mergeIntoMaster:
|
|
stage: updateMaster
|
|
script:
|
|
- cd $DAMASKROOT
|
|
- export TESTEDREV=$(git describe) # might be detached from development branch
|
|
- echo $TESTEDREV > VERSION
|
|
- git commit VERSION -m "[skip ci] updated version information after successful test of $TESTEDREV"
|
|
- export UPDATEDREV=$(git describe) # tested state + 1 commit
|
|
- git checkout master
|
|
- 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
|
|
|
|
###################################################################################################
|
|
removeData:
|
|
stage: clean
|
|
before_script:
|
|
- echo "Removing data and lock of pipeline $CI_PIPELINE_ID"
|
|
script:
|
|
- rm -rf $LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID
|
|
- sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue # in case pipeline was manually (web GUI) restarted and releaseLock was performed already
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
removeLock:
|
|
stage: releaseLock
|
|
before_script:
|
|
- echo "Removing lock of pipeline $CI_PIPELINE_ID"
|
|
when: always
|
|
script: sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue
|
|
except:
|
|
- master
|
|
- release
|