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