Skip to content
Snippets Groups Projects
Commit 0e5e55b9 authored by Sebastian Müller's avatar Sebastian Müller 🐈
Browse files

CI: add doc template; update toolchains for new EVE OS

parent 66f2efdc
No related branches found
No related tags found
1 merge request!77CI: update gitlab-runner to new EVE OS
Pipeline #204566 canceled with stages
in 38 minutes and 59 seconds
......@@ -12,8 +12,19 @@ variables:
stages:
- info
- test
- doc
- deploy
workflow:
rules:
- if: $CI_COMMIT_REF_NAME =~ /-wip$/
when: never
- when: always
#############
### INFOS ###
#############
show-env-vars:
stage: info
variables:
......@@ -28,58 +39,18 @@ show-env-vars:
script:
- echo -e "${SEP}\n${S00}$(date)\n${SEP}\n${S01}\n${S02}\n${S03}\n${S04}\n${SEP}\n${S05}${GIT_CLONE_PATH}\n${S06}\n${SEP}"
documentation:
stage: test
script:
- source hpc-module-loads/eve.chs-conda01
- module load GCCcore/9.3.0 texlive/2020
# use doxygen from the chs conda environment
- export PROJECT_NUMBER="$(cat version.txt)"
- doxygen doc/doxygen.config > doxygen_log_dev.txt
# create pdf documentation
- cd latex/ && make > ../doxygen_latex_dev.txt
- cp refman.pdf ../html/forces_doc.pdf
- cp refman.pdf ../forces_doc_dev.pdf
- cd .. && mv html html_dev
- mv doxygen_warn.txt doxygen_warn_dev.txt
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- html_dev
- forces_doc_dev.pdf
- doxygen_log_dev.txt
- doxygen_latex_dev.txt
- doxygen_warn_dev.txt
when: always
###############
### CONFIGS ###
###############
documentation_stable:
only:
- main
stage: test
variables:
GIT_DEPTH: 0
script:
- source hpc-module-loads/eve.chs-conda01
- module load GCCcore/9.3.0 texlive/2020
# use doxygen from the chs conda environment
# doc for latest version tag
- git checkout $(git describe --match "v*" --abbrev=0 --tags $(git rev-list --tags --max-count=1))
- export PROJECT_NUMBER="$(cat version.txt)"
- doxygen doc/doxygen.config > doxygen_log_tag.txt
- cd latex/ && make > ../doxygen_latex_tag.txt
- cp refman.pdf ../html/forces_doc.pdf
- cp refman.pdf ../forces_doc_tag.pdf
- cd .. && mv html html_tag
- mv doxygen_warn.txt doxygen_warn_tag.txt
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- html_tag
- forces_doc_tag.pdf
- doxygen_log_tag.txt
- doxygen_latex_tag.txt
- doxygen_warn_tag.txt
when: always
# doc stable variables
.doc_stable_vars: &doc_stable_vars
GIT_DEPTH: 0
DOC_TYPE: stable
# doc latest variables
.doc_latest_vars: &doc_latest_vars
DOC_TYPE: latest
# debug variables
.debug_vars: &debug_vars
......@@ -101,39 +72,55 @@ documentation_stable:
CMAKE_FLAGS: '-DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_WITH_COVERAGE=ON'
BUILD_TARGET: coverage
ARTIFACT_PATH: coverage
POST_RUN_CMD: 'lcov_cobertura build_debug/coverage.info'
# module loads for intel fortran compiler
.intel_vars_18: &intel_vars_18
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.intel18
.intel_vars_19: &intel_vars_19
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.intel19
.intel_vars_19MPI: &intel_vars_19MPI
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.intel19MPI
.intel_vars_2020b: &intel_vars_2020b
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.intel2020b
.intel_vars_2023b-classic: &intel_vars_2023b-classic
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.intel2023b-classic
.intel_vars_2023b-llvm: &intel_vars_2023b-llvm
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.intel2023b-llvm
# module loads for gfortran compiler
.gnu_vars_73MPI: &gfortran_vars_73MPI
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.gfortran73MPI
.gnu_vars_83MPI: &gfortran_vars_83MPI
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.gfortran83MPI
.gnu_vars_102MPI: &gfortran_vars_102MPI
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.gfortran102MPI
.gnu_vars_122MPI: &gfortran_vars_122MPI
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.gfortran122MPI
# module loads for nag fortran compiler
.nag_vars_62: &nag_vars_62
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.nagfor62
# module loads for nag fortran compiler
.conda_vars_01: &conda_vars_01
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.chs-conda01
.conda_vars_02: &conda_vars_02
MODULE_LOAD_SCRIPT: hpc-module-loads/eve.chs-conda02
# #################
# ### TEMPLATES ###
# #################
# template for documentation
.doc_template: &doc_template
when: always
stage: doc
needs: []
script:
- source hpc-module-loads/eve.chs-conda02
# create pdf documentation (needs texlive from module system)
- module load GCC/12.2.0 texlive/20230904
# checkout latest tag if there is at least one (and only for stable docs)
- if [ $(git rev-list --tags --max-count=1) ] && [ $DOC_TYPE == "stable" ]; then git checkout $(git describe --tags $(git rev-list --tags --max-count=1)); fi
- export PROJECT_NUMBER="$(cat version.txt)"
- doxygen doc/doxygen.config > doxygen_log_${DOC_TYPE}.txt 2>&1 # doxygen_log_stable.txt
- cd latex/ && make > ../doxygen_latex_${DOC_TYPE}.txt 2>&1 # ../doxygen_latex_stable.txt
- cp refman.pdf ../html/forces_doc.pdf # same name always
- cp refman.pdf ../forces_doc_${DOC_TYPE}.pdf # ../forces_doc_stable.pdf
- cd .. && mv html html_${DOC_TYPE} # html_stable
- mv doxygen_warn.txt doxygen_warn_${DOC_TYPE}.txt # doxygen_warn_stable.txt
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- html_*
- forces_doc_*.pdf
- doxygen_*.txt
# template for test jobs
.job_template: &job_template
stage: test
......@@ -142,55 +129,16 @@ documentation_stable:
- cmake -B $BUILD_DIR $CMAKE_FLAGS
- cmake --build $BUILD_DIR --parallel
- cmake --build $BUILD_DIR --parallel --target $BUILD_TARGET
- $POST_RUN_CMD
artifacts:
when: always
paths:
- $BUILD_DIR/$ARTIFACT_PATH
# ##################
# ### BUILD JOBS ###
# ##################
# ######################
# ### ANALYTICS JOBS ###
# #####################
# #################
# ### TEST JOBS ###
# #################
# # NAG fails on forces
# test-nag62-debug:
# variables:
# <<: [*debug_vars, *nag_vars_62]
# <<: *job_template
test-nag62-release:
variables:
<<: [*release_vars, *nag_vars_62]
<<: *job_template
test-gfortran73MPI-release:
variables:
<<: [*release_vars, *gfortran_vars_73MPI]
<<: *job_template
test-gfortran73MPI-debug:
variables:
<<: [*debug_vars, *gfortran_vars_83MPI]
<<: *job_template
test-gfortran83MPI-debug:
variables:
<<: [*debug_vars, *gfortran_vars_83MPI]
<<: *job_template
test-gfortran83MPI-release:
variables:
<<: [*release_vars, *gfortran_vars_83MPI]
<<: *job_template
test-gfortran102MPI-release:
variables:
<<: [*release_vars, *gfortran_vars_102MPI]
......@@ -211,45 +159,27 @@ test-gfortran122MPI-debug:
<<: [*debug_vars, *gfortran_vars_122MPI]
<<: *job_template
test-intel18-release:
test-intel2020b-release:
variables:
<<: [*release_vars, *intel_vars_18]
<<: [*release_vars, *intel_vars_2020b]
<<: *job_template
# # intel18debug takes ages for test_mcmc
# test-intel18-debug:
# variables:
# <<: [*debug_vars, *intel_vars_18]
# <<: *job_template
test-intel19-release:
test-intel2023b-classic-release:
variables:
<<: [*release_vars, *intel_vars_19]
<<: [*release_vars, *intel_vars_2023b-classic]
<<: *job_template
test-intel19MPI-release:
test-intel2023b-llvm-release:
variables:
<<: [*release_vars, *intel_vars_19MPI]
<<: *job_template
test-intel2020b-release:
variables:
<<: [*release_vars, *intel_vars_2020b]
<<: [*release_vars, *intel_vars_2023b-llvm]
<<: *job_template
coverage:
variables:
<<: [*coverage_vars, *conda_vars_01]
stage: test
script:
- source $MODULE_LOAD_SCRIPT
- cmake -B $BUILD_DIR $CMAKE_FLAGS
- cmake --build $BUILD_DIR --parallel
- cmake --build $BUILD_DIR --parallel --target $BUILD_TARGET
- lcov_cobertura build_debug/coverage.info
<<: [*coverage_vars, *conda_vars_02]
<<: *job_template
coverage: '/lines[\.]+\: (\d+\.\d+)\%/'
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
......@@ -259,10 +189,26 @@ coverage:
conditional_coverage:
variables:
<<: [*coverage_vars, *conda_vars_01]
<<: [*coverage_vars, *conda_vars_02]
CMAKE_FLAGS: '-DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_WITH_COVERAGE=ON -DFORCES_WITH_OPTIMIZATION=OFF -DFORCES_WITH_NETCDF=OFF'
<<: *job_template
################
### DOC JOBS ###
################
documentation_stable:
only:
- main
variables:
<<: *doc_stable_vars
<<: *doc_template
documentation:
variables:
<<: *doc_latest_vars
<<: *doc_template
# ###################
# ### DEPLOY JOBS ###
# ###################
......@@ -287,8 +233,8 @@ pages:
- mkdir public/stable/
- mkdir public/latest/
# copy the doxygen generated html page to the public site
- cp html_tag/* public/stable/ -R
- cp html_dev/* public/latest/ -R
- cp html_stable/* public/stable/ -R
- cp html_latest/* public/latest/ -R
# create an index.html that redirects to the stable documentation (in stable folder)
- cp doc/html_files/index.html public/
# create the coverage site
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment