1# 2# stage-1 take only a few minutes; they do not run the full test suite or external packages. 3# 4# stage-2 runs on MCS systems and may take 10 to 15 minutes. They run the full test suite but with limited mixture of external packages 5# 6# stage-3 runs on MCS systems and may take an hour or more. They run the full test suite and heavily test external packages, utilize valgrind etc 7# 8# The stage-(n) tests are only started if all of the stage-(n-1) tests run without error 9# You can limit the testing by using the variable STAGE with value 1 or 2 10# 11 12stages: 13 - stage-1 14 - stage-2 15 - stage-3 16 - stage-4 17variables: 18 GIT_STRATEGY: fetch 19 GIT_CLEAN_FLAGS: -ffdxq 20 TIMEOUT: 450 21 EXTRA_OPTIONS: -nox -nox_warning -malloc_dump 22 23# 24# The most basic template that most tests will expand upon 25# 26 27.test-basic: 28 interruptible: true 29 only: 30 refs: 31# Set with CI/CD Shedules - New Schedule 32 - schedules 33 - api 34# Set with CI/CD Pipelines - Run Pipeline 35 - web 36 - merge_requests 37 dependencies: [] 38 39.test: 40 extends: .test-basic 41 except: 42 variables: 43 # Skip if the docs-only label is attached to a merge request 44 - $CI_MERGE_REQUEST_LABELS =~ /(^|,)docs-only($|,)/ 45 - $PETSC_CI_SCHEDULED =~ /yes/ 46 47check-ci-settings: 48 extends: .test-basic 49 stage: .pre 50 tags: 51 - gce-stage1 52 script: 53 - lib/petsc/bin/maint/check-ci-settings.sh 54 55# 56# This provides the basic order of operations and options template for cloud based stage 1 tests. 57# Not all test-short need to follow this template but most will. 58# 59 60.stage-1: 61 extends: .test 62 stage: stage-1 63 tags: 64 - gce-u22-stage1 65 before_script: 66 - date 67 - hostname 68 - grep PRETTY_NAME /etc/os-release 69 - nproc 70 - lscpu 71 - ccache --zero-stats 72 script: 73 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 74 - if [ ! -z ${INIT_SCRIPT+x} ]; then echo "sourcing ${INIT_SCRIPT}"; if [ -f ${HOME}/${INIT_SCRIPT} ]; then source ${HOME}/${INIT_SCRIPT}; else source ${INIT_SCRIPT}; fi; fi 75 - printf "PATH:$PATH\n" 76 - printf "PYTHONPATH:$PYTHONPATH\n" 77 - printf "python:${PYTHON}\n" 78 - ${PYTHON} -m pip list --user 79 - printf "CONFIG_OPTS:${CONFIG_OPTS}\n" 80 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 81 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 82 - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O3 -march=native' CXXOPTFLAGS='-O3 -march=native' FOPTFLAGS='-O3 -march=native' ${CONFIG_OPTS} 83 - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" 84 - if [ ! -z ${ENABLE_CHECK+x} ]; then make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" check; fi 85 - make CFLAGS="${MAKE_TEST_CFLAGS}" CXXFLAGS="${MAKE_TEST_CXXFLAGS}" FFLAGS="${MAKE_TEST_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" allgtests-tap gmakesearch="${TEST_SEARCH}" TIMEOUT=${TIMEOUT} 86 variables: 87 PYTHON: python3 88 MAKE_CFLAGS: -Werror -Wmissing-field-initializers 89 MAKE_CXXFLAGS: -Werror -Wzero-as-null-pointer-constant 90 MAKE_FFLAGS: -Werror 91 MAKE_TEST_CFLAGS: -Werror 92 MAKE_TEST_CXXFLAGS: -Werror 93 MAKE_TEST_FFLAGS: -Werror 94 after_script: 95 - date 96 - ccache --show-stats 97 artifacts: 98 reports: 99 junit: arch-*/tests/testresults.xml 100 name: "$CI_JOB_NAME" 101 when: always 102 paths: 103 - arch-*/lib/petsc/conf/*.log 104 - arch-*/lib/pkgconfig/petsc.pc 105 - arch-*/tests/testresults.xml 106 - arch-*/tests/test_*_tap.log 107 - arch-*/tests/test_*_err.log 108 expire_in: 4 days 109 110# 111# The following tests run on the cloud as part of stage-1. 112# 113 114ompi-cuda: 115 extends: .stage-1 116 tags: 117 - cuda-stage1 118 variables: 119 CONFIG_OPTS: --with-mpi-dir=/nfs/gce/software/custom/linux-ubuntu22.04-x86_64/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.3.0/openmpi-4.1.3-qrpnszy --with-cuda=1 --with-cuda-arch=all-major --CUDAPPFLAGS=-Wno-deprecated-gpu-targets --with-fc=0 120 TEST_SEARCH: snes_tutorials-ex19_cuda% 121 ENABLE_CHECK: 1 122 MAKE_CXXFLAGS: -Werror 123 MAKE_CUDAFLAGS: -Xcompiler -Wall -Xcompiler -Werror 124 125mpich-cxx-py3: 126 extends: .stage-1 127 variables: 128 CONFIG_OPTS: --with-clanguage=cxx --with-fc=0 CXXFLAGS=-std=c++11 --with-strict-petscerrorcode 129 TEST_SEARCH: snes_tutorials-ex48% 130 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 131 132mpich-cxx-mlib: 133 extends: .stage-1 134 variables: 135 CONFIG_OPTS: --with-clanguage=cxx --with-single-library=0 --with-log=0 --with-info=0 --with-ctable=0 --with-is-color-value-type=short CXXFLAGS=-std=c++14 136 TEST_SEARCH: snes_tutorials-ex48% 137 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 138 139uni-complex-float-int64: 140 extends: .stage-1 141 variables: 142 CONFIG_OPTS: --with-mpi=0 --with-scalar-type=complex --with-precision=single --with-64-bit-indices 143 TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_% 144 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 145 146c99-mlib-static-py: 147 extends: .stage-1 148 variables: 149 CONFIG_OPTS: --with-single-library=0 --with-shared-libraries=0 --with-strict-petscerrorcode CFLAGS=-std=c99 FFLAGS= CXXFLAGS= 150 ENABLE_CHECK: 1 151 TEST_SEARCH: snes_tutorials-ex19% snes_tutorials-ex5f90t% 152 MAKE_TEST_FFLAGS: -Werror -std=f2008 153 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 154 155clang-uni: 156 extends: .stage-1 157 variables: 158 CONFIG_OPTS: --with-cc=clang --with-cxx=clang++ --with-mpi=0 --with-strict-petscerrorcode 159 MAKE_CFLAGS: -Werror -Wmissing-field-initializers -Wundef -Wextra-semi-stmt 160 MAKE_CXXFLAGS: -Werror -Wzero-as-null-pointer-constant -Wundef -Wextra-semi-stmt -Wextra-semi 161 TEST_SEARCH: snes_tutorials-ex48% 162 163gcc-lto: 164 extends: .stage-1 165 variables: 166 CONFIG_OPTS: CFLAGS= CXXFLAGS= FFLAGS= 167 MAKE_CFLAGS: -Werror -flto=4 -Werror=odr -Werror=lto-type-mismatch 168 MAKE_CXXFLAGS: -Werror -Wextra-semi -flto=4 -Werror=odr -Werror=lto-type-mismatch 169 MAKE_FFLAGS: -Werror -flto=4 -Werror=odr -Werror=lto-type-mismatch 170 TEST_SEARCH: snes_tutorials-ex19% snes_tutorials-ex5f% 171 LOAD_MODULES: gcc/12.1.0 mpich/4.1-gcc-12.1.0 172 173petsc4py-install: 174 extends: .stage-2 175 tags: 176 - gce-u22-stage1 177 variables: 178 PYTHON: python3 179 T_PREFIX: petsc-install 180 T_DESTDIR: petsc-destdir 181 T_PETSC4PY: src/binding/petsc4py 182 T_VALIDATE_CMD: lib/petsc/bin/maint/validate-petsc4py.sh 183 script: 184 - printf "PATH:$PATH\n" 185 - mkdir hide 186 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 187 - ${PYTHON} ./configure --prefix="${PWD}/${T_PREFIX}" --with-petsc4py=1 --with-debugging=0 188 - make CFLAGS=-Werror CXXFLAGS="-Werror -Wzero-as-null-pointer-constant" FFLAGS=-Werror 189 - printf "====== Test A. Install into staging directory then into prefix directory (mimics distro package recipe) =====\n" 190 - make install DESTDIR="${PWD}/${T_DESTDIR}" 191 - test "$(find ${PWD}/${T_PREFIX} -mindepth 1 | wc -l)" -eq 0 192 - test "$(find ${PWD}/${T_DESTDIR} -mindepth 1 | wc -l)" -gt 0 193 - (cd "${PWD}/${T_DESTDIR}" && find * -exec install -v -D "{}" "/{}" \; ) 194 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 195 - rm -r "${PWD}/${T_PREFIX}" "${PWD}/${T_DESTDIR}" && mkdir "${PWD}/${T_PREFIX}" 196 - printf "====== Test B. Install directly into prefix directory =====\n" 197 - make install 198 - test "$(find ${PWD}/${T_PREFIX} -mindepth 1 | wc -l)" -gt 0 199 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 200 - rm -r "${PWD}/${T_PREFIX}"/*/petsc4py* 201 - printf "====== Test C. Install manually with setuptools =====\n" 202 - export PETSC_DIR="${PWD}/${T_PREFIX}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py build) 203 - export PETSC_DIR="${PWD}/${T_PREFIX}" P="${PWD}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py install --install-lib="${P}/${T_PREFIX}/lib") 204 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 205 - rm -r "${PWD}/${T_PREFIX}"/*/petsc4py* 206 - printf "====== Test D. Install manually with setuptools with staging =====\n" 207 - export PETSC_DIR="${PWD}/${T_PREFIX}" P="${PWD}" && (cd "${T_PETSC4PY}" && ${PYTHON} setup.py install --root="${P}/${T_DESTDIR}" --install-lib="${P}/${T_PREFIX}/lib") 208 - (cd "${PWD}/${T_DESTDIR}" && find * -exec install -v -D "{}" "/{}" \; ) 209 - mv arch-* hide/ && PETSC_DIR="${PWD}/${T_PREFIX}" ${T_VALIDATE_CMD} && mv hide/arch-* ./ 210 211petsc4py-pip: 212 extends: .stage-2 213 tags: 214 - gce-u22-stage1 215 variables: 216 PETSC_CONFIGURE_OPTIONS: --with-mpi=0 --with-fc=0 217 CFLAGS: -O0 218 script: 219 - python3 -m venv pip-builds 220 - source pip-builds/bin/activate 221 - python -m pip install --upgrade pip 222 - unset PETSC_DIR PETSC_ARCH 223 - export PIP_WHEEL_DIR="${PWD}/wheelhouse" 224 - export PIP_FIND_LINKS="${PIP_WHEEL_DIR}" 225 - mkdir -p "${PIP_WHEEL_DIR}" 226 - python -m pip wheel . 227 - python -m pip wheel src/binding/petsc4py 228 - python -m pip install --pre --no-index --no-cache-dir petsc4py 229 - python -m pip list 230 - python -m petsc --prefix 231 - python -m petsc4py 232 233checksource: 234 extends: .test-basic 235 stage: .pre 236 tags: 237 - gce-u22-stage1 238 script: 239 - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0 --with-x=0 --with-bison=0 --with-cmake=0 --with-pthread=0 --with-regex=0 240 - vermin --version 241 - make vermin 242 - PATH=/nfs/gce/projects/petsc/soft/u22.04/spack-2024-09-18/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.4.0/llvm-19.1.0-dqibzqq5utu2fba2me2bodbnaj5y7c36/bin:$PATH make checkclangformat SHELL=bash 243 - make checkbadSource SHELL=bash 244 - make checkbadFileChange SHELL=bash 245 - make -f gmakefile check_output SHELL=bash 246 - make check_petsc4py_rst 247 - make -C src/binding/petsc4py lint 248 artifacts: 249 name: "$CI_JOB_NAME" 250 when: always 251 paths: 252 - arch-*/lib/petsc/conf/*.patch 253 - arch-*/lib/petsc/conf/*.log 254 expire_in: 4 days 255 256pause-for-approval: 257 extends: .test 258 stage: .pre 259 tags: 260 - gce-stage1 261 only: 262 refs: 263 - merge_requests 264 variables: 265 - $CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" 266 - $CI_MERGE_REQUEST_EVENT_TYPE == "detached" 267 script: 268 - echo "pause-for-approval has no script to run" 269 variables: 270 GIT_STRATEGY: none 271 when: manual 272 allow_failure: false 273 274# 275# Basic template for code coverage generation. Tests should additionally inherit from the more 276# specialized OS-specific versions instead of this one. 277# 278 279.coverage-generate: 280 variables: 281 RUN_GCOV: 1 282 RUN_GCOV_OPTIONS: --decisions 283 284.coverage-disable: 285 variables: 286 RUN_GCOV: 0 287 288# 289# This provides the basic order of operations and options template for stage-2,3 tests. 290# Not all stage-2,3 need to follow this template, but most will. 291# 292.stage-23: 293 extends: 294 - .test 295 - .coverage-generate 296 script: 297 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 298 - if [ ! -z ${GCOV_MODULES+x} ]; then module --trace load ${GCOV_MODULES}; module list; fi 299 - if [ ! -z ${INIT_SCRIPT+x} ]; then echo "sourcing ${INIT_SCRIPT}"; if [ -f ${HOME}/${INIT_SCRIPT} ]; then source ${HOME}/${INIT_SCRIPT}; else source ${INIT_SCRIPT}; fi; fi 300 - if [ "${RUN_GCOV}" == 1 ]; then 301 printf "RUN_GCOV_OPTIONS:$RUN_GCOV_OPTIONS\n"; 302 gcovr --version; 303 fi 304 - if [ -d ${HOME}/petsc-hash-pkgs/ ]; then find ${HOME}/petsc-hash-pkgs/ -maxdepth 1 -mindepth 1 -type d -mtime +25 -exec rm -rf {} \; ; fi 305 - printf "PATH:$PATH\n" 306 - printf "PYTHONPATH:$PYTHONPATH\n" 307 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 308 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 309 - printf "./config/examples/${TEST_ARCH}.py\n" 310 - cat ./config/examples/${TEST_ARCH}.py 311 - ./config/examples/${TEST_ARCH}.py || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi 312 - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi 313 - export ASAN_OPTIONS="log_path=stdout:detect_leaks=false" UBSAN_OPTIONS="suppressions=${PWD}/share/petsc/suppressions/ubsan" # only needed for -fsanitize=undefined (but harmless otherwise) 314 - make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" check || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi 315 - make updatedatafiles 316 - if [ -z ${DISABLE_PETSC4PY_TESTS+x} ]; then if [ -z ${ENABLE_PETSC4PY_LDPRELOAD+x} ]; then echo "NOT using LD_PRELOAD"; make petsc4pytest; else echo "using LD_PRELOAD"; LD_PRELOAD=${PWD}/${TEST_ARCH}/lib/libpetsc.so make petsc4pytest; fi; fi 317 - if [ -z ${DISABLE_TESTS+x} ]; then make cleantest && make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" FFLAGS="${MAKE_FFLAGS}" CUDAFLAGS="${MAKE_CUDAFLAGS}" allgtests-tap TIMEOUT=${TIMEOUT} ${TEST_OPTS} || if [ -f naglicenseproblem ]; then exit 126; else exit 1; fi; fi 318 - if [ "${RUN_GCOV}" == 1 ]; then make gcov PETSC_GCOV_OPTIONS="${RUN_GCOV_OPTIONS}"; fi 319 artifacts: 320 reports: 321 junit: arch-*/tests/testresults.xml 322 name: "$CI_JOB_NAME" 323 when: always 324 paths: 325 - arch-*/lib/petsc/conf/*.log 326 - arch-*/lib/pkgconfig/petsc.pc 327 - arch-*/tests/testresults.xml 328 - arch-*/tests/test_arch-*_tap.log 329 - arch-*/tests/test_arch-*_err.log 330 - arch-*/arch-*-gcovr-report.json.tar.bz2 331 expire_in: 4 days 332 variables: 333 OPENBLAS_NUM_THREADS: 1 334 335.stage-2: 336 extends: .stage-23 337 stage: stage-2 338 339.stage-3: 340 extends: .stage-23 341 stage: stage-3 342 343# 344# The following provide templates for various OSes for pre/post info 345# 346 347.linux_test_noflags: 348 before_script: 349 - date 350 - hostname 351 - grep PRETTY_NAME /etc/os-release 352 - nproc 353 - lscpu 354 - ccache --zero-stats 355 after_script: 356 - date 357 - ccache --show-stats 358 359.linux_test_nofflags: 360 extends: .linux_test_noflags 361 variables: 362 MAKE_CFLAGS: -Werror 363 MAKE_CXXFLAGS: -Werror 364 365.linux_test: 366 extends: .linux_test_noflags 367 variables: 368 MAKE_CFLAGS: -Werror 369 MAKE_CXXFLAGS: -Werror 370 MAKE_FFLAGS: -Werror 371 372.freebsd_test: 373 extends: 374 - .coverage-disable 375 variables: 376 MAKE_CFLAGS: -Werror 377 MAKE_CXXFLAGS: -Werror 378 MAKE_FFLAGS: -Werror 379 before_script: 380 - date 381 - hostname 382 - freebsd-version 383 - echo $(sysctl -n hw.ncpu) 384 - ccache --zero-stats 385 after_script: 386 - date 387 - ccache --show-stats 388 389.osx_test: 390 variables: 391 MAKE_CFLAGS: -Werror 392 MAKE_CXXFLAGS: -Werror 393 MAKE_FFLAGS: -Werror 394 before_script: 395 - date 396 - hostname 397 - sw_vers -productVersion 398 - echo $(sysctl -n hw.ncpu) 399 - ccache --zero-stats 400 after_script: 401 - date 402 - ccache --show-stats 403 404.mswin_test: 405 extends: 406 - .coverage-disable 407 before_script: 408 - date 409 - hostname 410 - uname -a 411 - nproc 412 after_script: 413 - date 414 415# 416# The following tests run as part of stage-2. 417# 418# The tags variable used in the tests below connects the particular test with the runners 419# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd. 420# For example the test 'linux-sycl-double' any runner that has the tags 'gce-u22-stage3, linux-fast' 421# (in a blue box beneath it) 422# 423 424osx-arm: 425 extends: 426 - .stage-3 427 - .osx_test 428 - .coverage-disable 429 tags: 430 - os:macos-arm 431 variables: 432 TEST_ARCH: arch-ci-osx-arm 433 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout 434 INIT_SCRIPT: .zprofile 435 436freebsd-cxx-cmplx-64idx-dbg: 437 extends: 438 - .stage-2 439 - .freebsd_test 440 tags: 441 - os:fbsd 442 variables: 443 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg 444 445freebsd-c-single-opt: 446 extends: 447 - .stage-2 448 - .freebsd_test 449 tags: 450 - os:fbsd 451 variables: 452 TEST_ARCH: arch-ci-freebsd-c-single-opt 453 454mswin-opt-impi: 455 extends: 456 - .stage-3 457 - .mswin_test 458 tags: 459 - mswin-stage3 460 variables: 461 TEST_ARCH: arch-ci-mswin-opt-impi 462 TEST_OPTS: search='ksp_ksp_tests*' 463 464linux-gcc-quad-64idx-dbg: 465 extends: 466 - .stage-2 467 - .linux_test 468 tags: 469 - gce-stage2 470 variables: 471 TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg 472 473linux-gcc-pkgs-opt: 474 extends: 475 - .stage-2 476 - .linux_test 477 tags: 478 - gce-stage2 479 variables: 480 TEST_ARCH: arch-ci-linux-gcc-pkgs-opt 481 except: 482 variables: 483 - $PETSC_CI_SCHEDULED =~ /yes/ 484 485linux-gcc-complex-opt-32bit: 486 extends: 487 - .stage-2 488 - .linux_test 489 tags: 490 - gce-stage2 491 variables: 492 TEST_ARCH: arch-ci-linux-gcc-complex-opt-32bit 493 494linux-emcc: 495 extends: 496 - .stage-2 497 - .linux_test 498 - .coverage-disable 499 tags: 500 - gce-stage2 501 variables: 502 TEST_ARCH: arch-ci-linux-emcc 503 INIT_SCRIPT: /nfs/gce/projects/petsc/soft/u22.04/emsdk/emsdk_env.sh 504 DISABLE_TESTS: 1 505 506# 507# The following tests run as part of stage-3. 508# 509 510freebsd-cxx-cmplx-pkgs-dbg: 511 extends: 512 - .stage-3 513 - .freebsd_test 514 tags: 515 - os:fbsd 516 variables: 517 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg 518 519freebsd-cxx-pkgs-opt: 520 extends: 521 - .stage-3 522 - .freebsd_test 523 tags: 524 - os:fbsd 525 variables: 526 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 527 TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt 528 529freebsd-pkgs-opt: 530 extends: 531 - .stage-3 532 - .freebsd_test 533 tags: 534 - os:fbsd 535 variables: 536 TEST_ARCH: arch-ci-freebsd-pkgs-opt 537 MAKE_CFLAGS: -DPETSC_SKIP_COMPLEX -Werror 538 539linux-hip-double: 540 extends: 541 - .stage-3 542 - .linux_test_noflags 543 - .coverage-disable 544 tags: 545 - gpu:amd, os:linux 546 variables: 547 TEST_ARCH: arch-ci-linux-hip-double 548 549linux-sycl-double: 550 extends: 551 - .stage-3 552 - .linux_test_nofflags 553 - .coverage-disable 554 tags: 555 - gce-u22-stage3, linux-fast 556 variables: 557 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/oneapi/modulefiles 558 TEST_ARCH: arch-ci-linux-sycl-double 559 LOAD_MODULES: compiler/latest mpi/latest 560 TEST_OPTS: query=requires queryval=kokkos_kernels 561 MAKE_CFLAGS: -Wno-expected-file-type -Werror 562 563linux-cuda-pkgs: 564 extends: 565 - .stage-3 566 - .linux_test 567 tags: 568 - cuda-stage3 569 variables: 570 TEST_ARCH: arch-ci-linux-cuda-pkgs 571 # run all tests that: 572 # 1. require cuda, OR 573 # 2. require device, OR 574 # 3. require hypre, OR 575 # 4. require kokkos[_kernels], AND lives in the vec subdirectory 576 # 577 # need to use the alternate OR spelling since '|' is interpreted as a pipe by the 578 # shell, and I could not manage to escape it enough times... 579 TEST_OPTS: -j3 queryval='cuda,device,hypre,kokkos*,vec*' query='requires,requires,requires,requires%OR%name' 580 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 581 582linux-cuda112-omp: 583 extends: 584 - .stage-3 585 - .linux_test 586 - .coverage-disable 587 tags: 588 - cuda-stage3 589 variables: 590 TEST_ARCH: arch-ci-linux-cuda112-omp 591 TEST_OPTS: -j4 query=requires queryval=kokkos_kernels 592 LOAD_MODULES: cuda/11.2.2 u-gcc-9/9.4.0 593 OMP_PROC_BIND: "false" 594 OMP_NUM_THREADS: 1 595 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 596 597linux-cuda-cmplx: 598 extends: 599 - .stage-3 600 - .linux_test 601 tags: 602 - cuda-stage3 603 variables: 604 TEST_ARCH: arch-ci-linux-cuda-cmplx 605 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 606 607linux-cuda-double-64idx: 608 extends: 609 - .stage-3 610 - .linux_test 611 tags: 612 - cuda12 613 variables: 614 TEST_ARCH: arch-ci-linux-cuda-double-64idx 615 TEST_OPTS: -j3 query=requires queryval=cuda 616 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 617 618linux-cuda-single-cxx: 619 extends: 620 - .stage-3 621 - .linux_test_noflags 622 - .coverage-disable 623 tags: 624 - cuda-stage3 625 variables: 626 TEST_ARCH: arch-ci-linux-cuda-single-cxx 627 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2023-02-02/share/spack/modules/linux-ubuntu22.04-ivybridge 628 LOAD_MODULES: nvhpc-22.11-gcc-11.3.0-vmvmbrx 629 TEST_OPTS: -j15 query=requires queryval=cuda 630 631linux-cuda-uni-pkgs: 632 extends: 633 - .stage-3 634 - .linux_test 635 tags: 636 - cuda-stage3 637 variables: 638 TEST_ARCH: arch-ci-linux-cuda-uni-pkgs 639 TEST_OPTS: -j20 query=requires queryval=cuda 640 MAKE_CUDAFLAGS: --compiler-options -Wall,-Werror 641 642linux-clang-cuda: 643 extends: 644 - .stage-3 645 - .linux_test 646 - .coverage-disable 647 tags: 648 - cuda-stage3 649 variables: 650 TEST_ARCH: arch-ci-linux-clang-cuda 651 TEST_OPTS: -j 1 queryval='cuda*,snes*' query='requires%OR%name' 652 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2023-02-02/share/spack/modules/linux-ubuntu22.04-ivybridge 653 LOAD_MODULES: llvm-15.0.7-gcc-11.3.0-pjldtxf cuda-11.5.2-gcc-11.3.0-jkoottx gcc-11.3.0-gcc-11.3.0-pgrvke5 654 MAKE_CUDAFLAGS: -Wno-pass-failed -Werror 655 656linux-viennacl: 657 extends: 658 - .stage-3 659 - .linux_test 660 tags: 661 - cuda-stage3 662 variables: 663 TEST_ARCH: arch-ci-linux-viennacl 664 MAKE_CXXFLAGS: -Werror -Wno-ignored-attributes 665 TEST_OPTS: -j20 query=requires queryval=viennacl 666 667linux-without-fc: 668 extends: 669 - .stage-3 670 - .linux_test 671 tags: 672 - gce-u22-stage3 673 variables: 674 TEST_ARCH: arch-ci-linux-without-fc 675 676linux-cmplx-single-arm: 677 extends: 678 - .stage-3 679 - .linux_test 680 # gcovr does not work on arm/linux 681 - .coverage-disable 682 tags: 683 - arch:arm, os:linux 684 variables: 685 FLEXIBLAS: netlib 686 TEST_ARCH: arch-ci-linux-cmplx-single-arm 687 688linux-gcc-cxx-avx2: 689 extends: 690 - .stage-3 691 - .linux_test 692 tags: 693 - name:petsc-knl-01 694 variables: 695 TEST_ARCH: arch-ci-linux-gcc-cxx-avx2 696 697linux-clang-avx: 698 extends: 699 - .stage-3 700 - .linux_test 701 tags: 702 - name:petsc-knl-01 703 variables: 704 TEST_ARCH: arch-ci-linux-clang-avx 705 706linux-knl: 707 extends: 708 - .stage-3 709 - .linux_test 710 - .coverage-disable 711 tags: 712 - name:petsc-knl-01 713 variables: 714 MAKE_FFLAGS: -warn errors 715 TEST_ARCH: arch-ci-linux-knl 716 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 717 718linux-intel-mkl-single: 719 extends: 720 - .stage-3 721 - .linux_test_nofflags 722 - .coverage-disable 723 tags: 724 - name:petsc-knl-01 725 variables: 726 TEST_ARCH: arch-ci-linux-intel-mkl-single 727 LOAD_MODULES: intel-oneapi-compilers/2022.0.2 intel-oneapi-mkl/2022.0.2 intel-oneapi-mpi/2021.5.1 728 729linux-cxx-cmplx-pkgs-64idx: 730 extends: 731 - .stage-3 732 - .linux_test 733 tags: 734 - gce-u22-stage3 735 variables: 736 TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx 737 PETSC_OPTIONS: -fp_trap 738 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2024-08-30/modules/linux-ubuntu22.04-x86_64/Core 739 LOAD_MODULES: python/3.13.0rc1-rayc5m7 py-setuptools/69.2.0-6yku3zk python-venv/1.0-bnbfk2n py-pip/23.1.2-o7dlzno 740 741# Set env vars for 'Kokkos + OpenMP' tests, so that they won't give warnings 742linux-pkgs-dbg-ftn-interfaces: 743 extends: 744 - .stage-3 745 - .linux_test 746 - .coverage-disable 747 tags: 748 - gce-u22-stage3 749 variables: 750 TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces 751 OMP_PROC_BIND: "false" 752 OMP_NUM_THREADS: 4 753 PETSC_OPTIONS: -fp_trap 754 755linux-pkgs-cxx-mlib: 756 extends: 757 - .stage-3 758 - .linux_test 759 tags: 760 - gce-u22-stage3 761 variables: 762 TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib 763 PETSC_OPTIONS: -fp_trap 764 765linux-pkgs-valgrind: 766 extends: 767 - .stage-3 768 - .linux_test 769 tags: 770 - gce-valgrind 771 variables: 772 TEST_ARCH: arch-ci-linux-pkgs-valgrind 773 TIMEOUT: 7200 774 775linux-pkgs-opt: 776 extends: 777 - .stage-3 778 - .linux_test 779 tags: 780 - gce-u22-stage3, linux-fast 781 variables: 782 TEST_ARCH: arch-ci-linux-pkgs-opt 783 LOAD_MODULES: gcc/12.1.0 784 MAKE_CXXFLAGS: -Wno-deprecated-declarations -Werror 785 786linux-pkgs-dbg: 787 extends: 788 - .stage-3 789 - .linux_test 790 tags: 791 - gce-u22-stage3, linux-gcov 792 variables: 793 TEST_ARCH: arch-ci-linux-pkgs-dbg 794 PETSC_OPTIONS: -fp_trap 795 796linux-matlab-ilp64: 797 extends: 798 - .stage-3 799 - .linux_test 800 tags: 801 - gce-u22-stage3, linux-gcov 802 variables: 803 TEST_ARCH: arch-ci-linux-matlab-ilp64 804 LOAD_MODULES: gcc/9.4.0 matlab/R2022a 805 allow_failure: true 806 807linux-pgi: 808 extends: 809 - .stage-3 810 - .linux_test_noflags 811 - .coverage-disable 812 tags: 813 - gce-u22-stage3, linux-mcpu 814 variables: 815 TEST_ARCH: arch-ci-linux-pgi 816 LOAD_MODULES: nvhpc/22.3 817 818# If the Nag license server fails then ${PETSC_DIR}/naglicenseproblem is created and the job is marked as failed but allow_failure 819linux-nagfor: 820 extends: 821 - .stage-3 822 - .linux_test_nofflags 823 tags: 824 - gce-stage2, linux-mcpu 825 variables: 826 LOAD_MODULES: nag/6.1 827 TEST_ARCH: arch-ci-linux-nagfor 828 allow_failure: 829 exit_codes: 126 830 831linux-intel-cmplx: 832 extends: 833 - .stage-3 834 - .linux_test_nofflags 835 - .coverage-disable 836 tags: 837 - gce-u22-stage3 838 variables: 839 TEST_ARCH: arch-ci-linux-intel-cmplx 840 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 841 842linux-xsdk-dbg: 843 extends: 844 - .stage-3 845 - .linux_test 846 tags: 847 - gce-u22-stage3 848 variables: 849 TEST_ARCH: arch-ci-linux-xsdk-dbg 850 LOAD_MODULES: gcc/12.1.0 851 852check-each-commit: 853 extends: 854 - .stage-2 855 - .linux_test 856 - .coverage-disable 857 tags: 858 - gce-u22-stage2 859 script: 860 - export PATH=/nfs/gce/projects/petsc/soft/u22.04/spack-2024-09-18/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.4.0/llvm-19.1.0-dqibzqq5utu2fba2me2bodbnaj5y7c36/bin:$PATH 861 - lib/petsc/bin/maint/check-each-commit.sh 862 except: 863 variables: 864 - $PETSC_CI_SCHEDULED =~ /yes/ 865 allow_failure: true 866 867linux-analyzer: 868 extends: 869 - .stage-2 870 - .linux_test 871 - .coverage-disable 872 tags: 873 - gce-u22-stage2 874 script: 875 - printf "PATH:$PATH\n" 876 - printf "PYTHONPATH:$PYTHONPATH\n" 877 - python3 --version 878 - git --version 879 - mypy --version 880 - vermin --version 881 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 882 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 883 - printf "./config/examples/${TEST_ARCH}.py\n" 884 - cat ./config/examples/${TEST_ARCH}.py 885 - ./config/examples/${TEST_ARCH}.py 886 - make LINTER_OPTIONS="${LINTER_OPTIONS}" test-lint 887 - make V=3 LINTER_OPTIONS="${LINTER_OPTIONS} -- ./src" lint 888 variables: 889 TEST_ARCH: arch-ci-linux-analyzer 890 LINTER_OPTIONS: "--PETSC_ARCH=${TEST_ARCH} --clang_lib=`llvm-config-14 --libdir`/libclang.so.1 --werror 1" 891 artifacts: 892 paths: 893 - arch-*/lib/petsc/conf/*.log 894 - ./petscLintPatches/*.patch 895 expire_in: 4 days 896 except: 897 variables: 898 - $PETSC_CI_SCHEDULED =~ /yes/ 899 900linux-intel: 901 extends: 902 - .stage-3 903 - .linux_test_nofflags 904 - .coverage-disable 905 tags: 906 - gce-u22-stage3 907 variables: 908 TEST_ARCH: arch-ci-linux-intel 909 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 910 911linux-clang-ubsan: 912 extends: 913 - .stage-2 914 - .linux_test 915 - .coverage-disable 916 tags: 917 - gce-u22-stage2 918 variables: 919 TEST_ARCH: arch-ci-linux-clang-ubsan 920 LOAD_MODULES: llvm/17.0.4 921 922linux-opt-arm: 923 extends: 924 - .stage-3 925 - .linux_test 926 # gcovr does not work on arm/linux 927 - .coverage-disable 928 tags: 929 - arch:arm, os:linux 930 variables: 931 TEST_ARCH: arch-ci-linux-opt-arm 932 933linux-pkgs-64idx: 934 extends: 935 - .stage-3 936 - .linux_test 937 tags: 938 - gce-u22-stage3, linux-mcpu 939 variables: 940 TEST_ARCH: arch-ci-linux-pkgs-64idx 941 LOAD_MODULES: intel-oneapi-mkl/2022.0.2 942 943linux-64idx-i8: 944 extends: 945 - .stage-3 946 - .linux_test 947 tags: 948 - gce-u22-stage3, linux-mcpu 949 variables: 950 TEST_ARCH: arch-ci-linux-64idx-i8 951 952linux-gcc-ifc-cmplx: 953 extends: 954 - .stage-3 955 - .linux_test_nofflags 956 tags: 957 - gce-u22-stage3 958 variables: 959 TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx 960 LOAD_MODULES: intel-oneapi-compilers/2022.2.1 961 962linux-opt-cxx-quad: 963 extends: 964 - .stage-3 965 - .linux_test 966 tags: 967 - gce-u22-stage3 968 variables: 969 TEST_ARCH: arch-ci-linux-opt-cxx-quad 970 MODULEPATH: /nfs/gce/projects/petsc/soft/u22.04/spack-2024-08-30/modules/linux-ubuntu22.04-x86_64/Core 971 LOAD_MODULES: python/3.13.0rc1-rayc5m7 972 973linux-ILP64: 974 extends: 975 - .stage-3 976 - .linux_test 977 tags: 978 - gce-u22-stage3 979 variables: 980 TEST_ARCH: arch-ci-linux-ILP64 981 LOAD_MODULES: gcc/8.5.0 mpich/2-1.5-gcc-8.5.0 982 MAKE_CFLAGS: -Wno-discarded-qualifiers -Werror 983 984linux-64idx-i8-uni: 985 extends: 986 - .stage-3 987 - .linux_test 988 tags: 989 - gce-u22-stage3, linux-mcpu 990 variables: 991 TEST_ARCH: arch-ci-linux-64idx-i8-uni 992 993linux-misc-32bit: 994 extends: 995 - .stage-3 996 - .linux_test 997 tags: 998 - gce-u22-stage3 999 variables: 1000 TEST_ARCH: arch-ci-linux-misc-32bit 1001 1002mswin-intel-cxx-cmplx: 1003 extends: 1004 - .stage-3 1005 - .mswin_test 1006 tags: 1007 - mswin-stage3 1008 variables: 1009 TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx 1010 TIMEOUT: 150 1011 1012mswin-uni: 1013 extends: 1014 - .stage-3 1015 - .mswin_test 1016 tags: 1017 - mswin-stage3 1018 variables: 1019 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout 1020 TEST_ARCH: arch-ci-mswin-uni 1021 1022mswin-gnu: 1023 extends: 1024 - .stage-3 1025 - .mswin_test 1026 tags: 1027 - mswin-stage3 1028 variables: 1029 TEST_ARCH: arch-ci-mswin-gnu 1030 MAKE_CFLAGS: -Werror 1031 MAKE_CXXFLAGS: -Werror 1032 MAKE_FFLAGS: -Werror 1033 DISABLE_TESTS: 1 1034 1035#mswin-intel: 1036# extends: 1037# - .stage-3 1038# - .mswin_test 1039# tags: 1040# - os:win 1041# variables: 1042# TEST_ARCH: arch-ci-mswin-intel 1043 1044osx-cxx-cmplx-pkgs-dbg: 1045 extends: 1046 - .stage-3 1047 - .osx_test 1048 - .coverage-disable 1049 tags: 1050 - os:macos-x64 1051 variables: 1052 TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg 1053 INIT_SCRIPT: .zprofile 1054 1055osx-cxx-pkgs-opt-arm: 1056 extends: 1057 - .stage-3 1058 - .osx_test 1059 - .coverage-disable 1060 tags: 1061 - os:macos-arm 1062 variables: 1063 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 1064 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt-arm 1065 MAKE_CXXFLAGS: -Werror -Wno-pass-failed 1066 INIT_SCRIPT: .zprofile 1067 1068osx-dbg: 1069 extends: 1070 - .stage-3 1071 - .osx_test 1072 - .coverage-disable 1073 tags: 1074 - os:macos-x64 1075 variables: 1076 TEST_ARCH: arch-ci-osx-dbg 1077 ASAN_OPTIONS: log_path=stdout 1078 INIT_SCRIPT: .zprofile 1079 1080osx-xsdk-opt: 1081 extends: 1082 - .stage-3 1083 - .osx_test 1084 - .coverage-disable 1085 tags: 1086 - os:macos-x64 1087 variables: 1088 TEST_ARCH: arch-ci-osx-xsdk-opt 1089 INIT_SCRIPT: .zprofile 1090 1091# job for analyzing the coverage results and generating the various reports 1092coverage-analyze: 1093 extends: .test 1094 stage: stage-4 1095 tags: 1096 - gce-u22-short 1097 dependencies: 1098 # stage-2 1099 - linux-gcc-quad-64idx-dbg 1100 - linux-gcc-pkgs-opt 1101 - linux-gcc-complex-opt-32bit 1102 # stage-3 1103 - linux-pkgs-dbg 1104 - linux-matlab-ilp64 1105 - linux-cuda-pkgs 1106 - linux-cxx-cmplx-pkgs-64idx 1107 - linux-cuda-cmplx 1108 - linux-cuda-double-64idx 1109 - linux-cuda-uni-pkgs 1110 - linux-viennacl 1111 - linux-without-fc 1112 - linux-gcc-cxx-avx2 1113 - linux-clang-avx 1114 - linux-pkgs-cxx-mlib 1115 - linux-pkgs-valgrind 1116 - linux-nagfor 1117 - linux-xsdk-dbg 1118 - linux-pkgs-64idx 1119 - linux-pkgs-opt 1120 - linux-64idx-i8 1121 - linux-gcc-ifc-cmplx 1122 - linux-opt-cxx-quad 1123 - linux-ILP64 1124 - linux-64idx-i8-uni 1125 variables: 1126 PYTHON: python3 1127 PETSC_ARCH: arch-ci-analyze-pipeline 1128 before_script: 1129 - date 1130 - hostname 1131 script: 1132 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 1133 - ${PYTHON} --version 1134 - gcovr --version 1135 - printf "PATH:$PATH\n" 1136 - printf "PYTHONPATH:$PYTHONPATH\n" 1137 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 1138 - ${PYTHON} ./configure --with-mpi=0 --with-cxx=0 --download-sowing --with-fortran-bindings 1139 - make mergegcov PETSC_GCOV_OPTIONS='--ci-mode --verbose' 1140 coverage: /^\s*lines:\s*\d+.\d+\%/ 1141 artifacts: 1142 name: "$CI_JOB_NAME" 1143 when: always 1144 paths: 1145 - arch-ci-analyze-pipeline/gcovr/* 1146 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1147 expire_in: 4 days 1148 reports: 1149 coverage_report: 1150 coverage_format: cobertura 1151 path: arch-ci-analyze-pipeline/gcovr/xml/*.xml 1152 1153# template for the coverage review jobs, these must be separate jobs as you cannot deploy multiple 1154# environments from one job... 1155.coverage-review: 1156 extends: .test 1157 stage: .post 1158 tags: 1159 - gce-u22-short 1160 dependencies: 1161 - coverage-analyze 1162 script: 1163 - date 1164 - hostname 1165 artifacts: 1166 name: "$CI_JOB_NAME" 1167 when: always 1168 paths: 1169 - arch-ci-analyze-pipeline/gcovr/* 1170 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1171 expire_in: 4 days 1172 1173coverage-total-review: 1174 extends: .coverage-review 1175 environment: 1176 name: coverage/all/$CI_COMMIT_REF_SLUG 1177 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html/report.html 1178 auto_stop_in: one week 1179 deployment_tier: testing 1180 1181coverage-untested-review: 1182 extends: .coverage-review 1183 environment: 1184 name: coverage/untested/$CI_COMMIT_REF_SLUG 1185 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html_untested/report_untested.html 1186 auto_stop_in: one week 1187 deployment_tier: testing 1188 1189analyze-pipeline: 1190 extends: .coverage-review 1191 script: 1192 - date 1193 - hostname 1194 # This file is created by lib/petsc/bin/maint/gcov.py. If it exists then the CI 1195 # pipeline should fail 1196 - if [ -f ./arch-ci-analyze-pipeline/gcovr/.CI_FAIL ]; then 1197 cat ./arch-ci-analyze-pipeline/gcovr/merge_gcov_errors.log; 1198 exit 1; 1199 fi 1200 allow_failure: true 1201 1202# 1203# Base job for a documentation build (runs in venv to allow installing additional packages without root) 1204# 1205.docs: 1206 stage: stage-2 1207 tags: 1208 - linux-docs 1209 before_script: 1210 - git fetch --unshallow --tags origin +release:remotes/origin/release +main:remotes/origin/main 1211 - module --trace load python-3.11.2-gcc-9.4.0-6p2ktlj 1212 - printf "PATH:$PATH\n" 1213 - printf "PYTHONPATH:$PYTHONPATH\n" 1214 - VENV=venv-petsc-docs && 1215 python3 -m venv $VENV && 1216 . $VENV/bin/activate && 1217 cd doc && 1218 python -m pip install -r requirements.txt 1219 1220# 1221# Build documentation and make available for review using GitLab pages 1222# 1223docs-review: 1224 extends: 1225 - .docs 1226 - .test-basic 1227 script: 1228 - printf "PATH:$PATH\n" 1229 - printf "PYTHONPATH:$PYTHONPATH\n" 1230 #- printf "python:${PYTHON}\n" 1231 #- ${PYTHON} -m pip list --user 1232 - printf "CONFIG_OPTS:${CONFIG_OPTS}\n" 1233 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 1234 - if [ ! -z ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME+x} ]; then printf "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME\n" ;fi 1235 - (time make html BUILDDIR="../public" SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1236 - (time make latexpdf SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1237 - cp _build/latex/manual.pdf ../public/html/manual/ 1238 environment: 1239 name: review/$CI_COMMIT_REF_NAME 1240 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/html/index.html 1241 auto_stop_in: one week 1242 deployment_tier: development 1243 artifacts: 1244 paths: 1245 - public 1246 expire_in: 4 days 1247 except: 1248 variables: 1249 - $PETSC_CI_SCHEDULED =~ /yes/ 1250 1251# 1252# Deploy documentation using GitLab pages 1253# 1254pages: # this job name has special meaning to GitLab 1255 extends: .docs 1256 interruptible: true 1257 script: 1258 - mkdir -p ../public/ && cp public/* ../public/ 1259 - (git checkout origin/main && pip install -r requirements.txt && make website-deploy SPHINXOPTS="-j 1" BUILDDIR="../public/main" && make latexpdf && mkdir -p ../public/main/manual && cp _build/latex/manual.pdf ../public/main/manual/) || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1260 - cd .. && git clean -fdxq -e public -e venv-petsc-docs && cd doc && rm -rf images 1261 - (git checkout origin/release && pip install -r requirements.txt && make website-deploy SPHINXOPTS="-j 1" BUILDDIR="../public/release" && make latexpdf && mkdir -p ../public/release/manual && cp _build/latex/manual.pdf ../public/release/manual/) || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1262 - rm -rf ../public/*/.doctrees 1263 only: 1264 variables: 1265 - $PETSC_CI_SCHEDULED == "yes" 1266 artifacts: 1267 paths: 1268 - public 1269 expire_in: 4 days 1270 1271# 1272# 1273# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 1274# that fail produce a warning, but do not block execution of a pipeline. 1275# 1276 1277.test-experimental: 1278 extends: .test 1279 allow_failure: true 1280 1281