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 MAKE_CXXFLAGS: -Wno-deprecated-declarations -Werror 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 739# Set env vars for 'Kokkos + OpenMP' tests, so that they won't give warnings 740linux-pkgs-dbg-ftn-interfaces: 741 extends: 742 - .stage-3 743 - .linux_test 744 - .coverage-disable 745 tags: 746 - gce-u22-stage3 747 variables: 748 TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces 749 OMP_PROC_BIND: "false" 750 OMP_NUM_THREADS: 4 751 PETSC_OPTIONS: -fp_trap 752 753linux-pkgs-cxx-mlib: 754 extends: 755 - .stage-3 756 - .linux_test 757 tags: 758 - gce-u22-stage3 759 variables: 760 TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib 761 PETSC_OPTIONS: -fp_trap 762 763linux-pkgs-valgrind: 764 extends: 765 - .stage-3 766 - .linux_test 767 tags: 768 - gce-valgrind 769 variables: 770 TEST_ARCH: arch-ci-linux-pkgs-valgrind 771 TIMEOUT: 7200 772 773linux-pkgs-opt: 774 extends: 775 - .stage-3 776 - .linux_test 777 tags: 778 - gce-u22-stage3, linux-fast 779 variables: 780 TEST_ARCH: arch-ci-linux-pkgs-opt 781 LOAD_MODULES: gcc/12.1.0 782 MAKE_CXXFLAGS: -Wno-deprecated-declarations -Werror 783 784linux-pkgs-dbg: 785 extends: 786 - .stage-3 787 - .linux_test 788 tags: 789 - gce-u22-stage3, linux-gcov 790 variables: 791 TEST_ARCH: arch-ci-linux-pkgs-dbg 792 PETSC_OPTIONS: -fp_trap 793 794linux-matlab-ilp64: 795 extends: 796 - .stage-3 797 - .linux_test 798 tags: 799 - gce-u22-stage3, linux-gcov 800 variables: 801 TEST_ARCH: arch-ci-linux-matlab-ilp64 802 LOAD_MODULES: gcc/9.4.0 matlab/R2022a 803 allow_failure: true 804 805linux-pgi: 806 extends: 807 - .stage-3 808 - .linux_test_noflags 809 - .coverage-disable 810 tags: 811 - gce-u22-stage3, linux-mcpu 812 variables: 813 TEST_ARCH: arch-ci-linux-pgi 814 LOAD_MODULES: nvhpc/22.3 815 816# If the Nag license server fails then ${PETSC_DIR}/naglicenseproblem is created and the job is marked as failed but allow_failure 817linux-nagfor: 818 extends: 819 - .stage-3 820 - .linux_test_nofflags 821 tags: 822 - gce-stage2, linux-mcpu 823 variables: 824 LOAD_MODULES: nag/6.1 825 TEST_ARCH: arch-ci-linux-nagfor 826 allow_failure: 827 exit_codes: 126 828 829linux-intel-cmplx: 830 extends: 831 - .stage-3 832 - .linux_test_nofflags 833 - .coverage-disable 834 tags: 835 - gce-u22-stage3 836 variables: 837 TEST_ARCH: arch-ci-linux-intel-cmplx 838 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 839 840linux-xsdk-dbg: 841 extends: 842 - .stage-3 843 - .linux_test 844 tags: 845 - gce-u22-stage3 846 variables: 847 TEST_ARCH: arch-ci-linux-xsdk-dbg 848 LOAD_MODULES: gcc/12.1.0 849 850check-each-commit: 851 extends: 852 - .stage-2 853 - .linux_test 854 - .coverage-disable 855 tags: 856 - gce-u22-stage2 857 script: 858 - 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 859 - lib/petsc/bin/maint/check-each-commit.sh 860 except: 861 variables: 862 - $PETSC_CI_SCHEDULED =~ /yes/ 863 allow_failure: true 864 865linux-analyzer: 866 extends: 867 - .stage-2 868 - .linux_test 869 - .coverage-disable 870 tags: 871 - gce-u22-stage2 872 script: 873 - printf "PATH:$PATH\n" 874 - printf "PYTHONPATH:$PYTHONPATH\n" 875 - python3 --version 876 - git --version 877 - mypy --version 878 - vermin --version 879 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 880 - 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 881 - printf "./config/examples/${TEST_ARCH}.py\n" 882 - cat ./config/examples/${TEST_ARCH}.py 883 - ./config/examples/${TEST_ARCH}.py 884 - make LINTER_OPTIONS="${LINTER_OPTIONS}" test-lint 885 - make V=3 LINTER_OPTIONS="${LINTER_OPTIONS} -- ./src" lint 886 variables: 887 TEST_ARCH: arch-ci-linux-analyzer 888 LINTER_OPTIONS: "--PETSC_ARCH=${TEST_ARCH} --clang_lib=`llvm-config-14 --libdir`/libclang.so.1 --werror 1" 889 artifacts: 890 paths: 891 - arch-*/lib/petsc/conf/*.log 892 - ./petscLintPatches/*.patch 893 expire_in: 4 days 894 except: 895 variables: 896 - $PETSC_CI_SCHEDULED =~ /yes/ 897 898linux-intel: 899 extends: 900 - .stage-3 901 - .linux_test_nofflags 902 - .coverage-disable 903 tags: 904 - gce-u22-stage3 905 variables: 906 TEST_ARCH: arch-ci-linux-intel 907 LOAD_MODULES: intel-oneapi-compilers/2023.0.0 intel-oneapi-mkl/2022.0.2 908 909linux-clang-ubsan: 910 extends: 911 - .stage-2 912 - .linux_test 913 - .coverage-disable 914 tags: 915 - gce-u22-stage2 916 variables: 917 TEST_ARCH: arch-ci-linux-clang-ubsan 918 LOAD_MODULES: llvm/17.0.4 919 920linux-opt-arm: 921 extends: 922 - .stage-3 923 - .linux_test 924 # gcovr does not work on arm/linux 925 - .coverage-disable 926 tags: 927 - arch:arm, os:linux 928 variables: 929 TEST_ARCH: arch-ci-linux-opt-arm 930 931linux-pkgs-64idx: 932 extends: 933 - .stage-3 934 - .linux_test 935 tags: 936 - gce-u22-stage3, linux-mcpu 937 variables: 938 TEST_ARCH: arch-ci-linux-pkgs-64idx 939 LOAD_MODULES: intel-oneapi-mkl/2022.0.2 940 941linux-64idx-i8: 942 extends: 943 - .stage-3 944 - .linux_test 945 tags: 946 - gce-u22-stage3, linux-mcpu 947 variables: 948 TEST_ARCH: arch-ci-linux-64idx-i8 949 950linux-gcc-ifc-cmplx: 951 extends: 952 - .stage-3 953 - .linux_test_nofflags 954 tags: 955 - gce-u22-stage3 956 variables: 957 TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx 958 LOAD_MODULES: intel-oneapi-compilers/2022.2.1 959 960linux-opt-cxx-quad: 961 extends: 962 - .stage-3 963 - .linux_test 964 tags: 965 - gce-u22-stage3 966 variables: 967 TEST_ARCH: arch-ci-linux-opt-cxx-quad 968 969linux-ILP64: 970 extends: 971 - .stage-3 972 - .linux_test 973 tags: 974 - gce-u22-stage3 975 variables: 976 TEST_ARCH: arch-ci-linux-ILP64 977 LOAD_MODULES: gcc/8.5.0 mpich/2-1.5-gcc-8.5.0 978 MAKE_CFLAGS: -Wno-discarded-qualifiers -Werror 979 980linux-64idx-i8-uni: 981 extends: 982 - .stage-3 983 - .linux_test 984 tags: 985 - gce-u22-stage3, linux-mcpu 986 variables: 987 TEST_ARCH: arch-ci-linux-64idx-i8-uni 988 989linux-misc-32bit: 990 extends: 991 - .stage-3 992 - .linux_test 993 tags: 994 - gce-u22-stage3 995 variables: 996 TEST_ARCH: arch-ci-linux-misc-32bit 997 998mswin-intel-cxx-cmplx: 999 extends: 1000 - .stage-3 1001 - .mswin_test 1002 tags: 1003 - mswin-stage3 1004 variables: 1005 TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx 1006 TIMEOUT: 150 1007 1008mswin-uni: 1009 extends: 1010 - .stage-3 1011 - .mswin_test 1012 tags: 1013 - mswin-stage3 1014 variables: 1015 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout 1016 TEST_ARCH: arch-ci-mswin-uni 1017 1018mswin-gnu: 1019 extends: 1020 - .stage-3 1021 - .mswin_test 1022 tags: 1023 - mswin-stage3 1024 variables: 1025 TEST_ARCH: arch-ci-mswin-gnu 1026 MAKE_CFLAGS: -Werror 1027 MAKE_CXXFLAGS: -Werror 1028 MAKE_FFLAGS: -Werror 1029 DISABLE_TESTS: 1 1030 1031#mswin-intel: 1032# extends: 1033# - .stage-3 1034# - .mswin_test 1035# tags: 1036# - os:win 1037# variables: 1038# TEST_ARCH: arch-ci-mswin-intel 1039 1040osx-cxx-cmplx-pkgs-dbg: 1041 extends: 1042 - .stage-3 1043 - .osx_test 1044 - .coverage-disable 1045 tags: 1046 - os:macos-x64 1047 variables: 1048 TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg 1049 INIT_SCRIPT: .zprofile 1050 1051osx-cxx-pkgs-opt-arm: 1052 extends: 1053 - .stage-3 1054 - .osx_test 1055 - .coverage-disable 1056 tags: 1057 - os:macos-arm 1058 variables: 1059 PETSC_OPTIONS: -vecscatter_mpi1 false -options_left false 1060 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt-arm 1061 MAKE_CXXFLAGS: -Werror -Wno-pass-failed 1062 INIT_SCRIPT: .zprofile 1063 1064osx-dbg: 1065 extends: 1066 - .stage-3 1067 - .osx_test 1068 - .coverage-disable 1069 tags: 1070 - os:macos-x64 1071 variables: 1072 TEST_ARCH: arch-ci-osx-dbg 1073 ASAN_OPTIONS: log_path=stdout 1074 INIT_SCRIPT: .zprofile 1075 1076osx-xsdk-opt: 1077 extends: 1078 - .stage-3 1079 - .osx_test 1080 - .coverage-disable 1081 tags: 1082 - os:macos-x64 1083 variables: 1084 TEST_ARCH: arch-ci-osx-xsdk-opt 1085 INIT_SCRIPT: .zprofile 1086 1087# job for analyzing the coverage results and generating the various reports 1088coverage-analyze: 1089 extends: .test 1090 stage: stage-4 1091 tags: 1092 - gce-u22-short 1093 dependencies: 1094 # stage-2 1095 - linux-gcc-quad-64idx-dbg 1096 - linux-gcc-pkgs-opt 1097 - linux-gcc-complex-opt-32bit 1098 # stage-3 1099 - linux-pkgs-dbg 1100 - linux-matlab-ilp64 1101 - linux-cuda-pkgs 1102 - linux-cxx-cmplx-pkgs-64idx 1103 - linux-cuda-cmplx 1104 - linux-cuda-double-64idx 1105 - linux-cuda-uni-pkgs 1106 - linux-viennacl 1107 - linux-without-fc 1108 - linux-gcc-cxx-avx2 1109 - linux-clang-avx 1110 - linux-pkgs-cxx-mlib 1111 - linux-pkgs-valgrind 1112 - linux-nagfor 1113 - linux-xsdk-dbg 1114 - linux-pkgs-64idx 1115 - linux-pkgs-opt 1116 - linux-64idx-i8 1117 - linux-gcc-ifc-cmplx 1118 - linux-opt-cxx-quad 1119 - linux-ILP64 1120 - linux-64idx-i8-uni 1121 variables: 1122 PYTHON: python3 1123 PETSC_ARCH: arch-ci-analyze-pipeline 1124 before_script: 1125 - date 1126 - hostname 1127 script: 1128 - if [ ! -z ${LOAD_MODULES+x} ]; then module --trace load ${LOAD_MODULES}; module list; fi 1129 - ${PYTHON} --version 1130 - gcovr --version 1131 - printf "PATH:$PATH\n" 1132 - printf "PYTHONPATH:$PYTHONPATH\n" 1133 - 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 1134 - ${PYTHON} ./configure --with-mpi=0 --with-cxx=0 --download-sowing --with-fortran-bindings 1135 - make mergegcov PETSC_GCOV_OPTIONS='--ci-mode --verbose' 1136 coverage: /^\s*lines:\s*\d+.\d+\%/ 1137 artifacts: 1138 name: "$CI_JOB_NAME" 1139 when: always 1140 paths: 1141 - arch-ci-analyze-pipeline/gcovr/* 1142 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1143 expire_in: 4 days 1144 reports: 1145 coverage_report: 1146 coverage_format: cobertura 1147 path: arch-ci-analyze-pipeline/gcovr/xml/*.xml 1148 1149# template for the coverage review jobs, these must be separate jobs as you cannot deploy multiple 1150# environments from one job... 1151.coverage-review: 1152 extends: .test 1153 stage: .post 1154 tags: 1155 - gce-u22-short 1156 dependencies: 1157 - coverage-analyze 1158 script: 1159 - date 1160 - hostname 1161 artifacts: 1162 name: "$CI_JOB_NAME" 1163 when: always 1164 paths: 1165 - arch-ci-analyze-pipeline/gcovr/* 1166 - arch-ci-analyze-pipeline/lib/petsc/conf/*.log 1167 expire_in: 4 days 1168 1169coverage-total-review: 1170 extends: .coverage-review 1171 environment: 1172 name: coverage/all/$CI_COMMIT_REF_SLUG 1173 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/arch-ci-analyze-pipeline/gcovr/html/report.html 1174 auto_stop_in: one week 1175 deployment_tier: testing 1176 1177coverage-untested-review: 1178 extends: .coverage-review 1179 environment: 1180 name: coverage/untested/$CI_COMMIT_REF_SLUG 1181 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 1182 auto_stop_in: one week 1183 deployment_tier: testing 1184 1185analyze-pipeline: 1186 extends: .coverage-review 1187 script: 1188 - date 1189 - hostname 1190 # This file is created by lib/petsc/bin/maint/gcov.py. If it exists then the CI 1191 # pipeline should fail 1192 - if [ -f ./arch-ci-analyze-pipeline/gcovr/.CI_FAIL ]; then 1193 cat ./arch-ci-analyze-pipeline/gcovr/merge_gcov_errors.log; 1194 exit 1; 1195 fi 1196 allow_failure: true 1197 1198# 1199# Base job for a documentation build (runs in venv to allow installing additional packages without root) 1200# 1201.docs: 1202 stage: stage-2 1203 tags: 1204 - linux-docs 1205 before_script: 1206 - git fetch --unshallow --tags origin +release:remotes/origin/release +main:remotes/origin/main 1207 - module --trace load python-3.11.2-gcc-9.4.0-6p2ktlj 1208 - printf "PATH:$PATH\n" 1209 - printf "PYTHONPATH:$PYTHONPATH\n" 1210 - VENV=venv-petsc-docs && 1211 python3 -m venv $VENV && 1212 . $VENV/bin/activate && 1213 cd doc && 1214 python -m pip install -r requirements.txt 1215 1216# 1217# Build documentation and make available for review using GitLab pages 1218# 1219docs-review: 1220 extends: 1221 - .docs 1222 - .test-basic 1223 script: 1224 - printf "PATH:$PATH\n" 1225 - printf "PYTHONPATH:$PYTHONPATH\n" 1226 #- printf "python:${PYTHON}\n" 1227 #- ${PYTHON} -m pip list --user 1228 - printf "CONFIG_OPTS:${CONFIG_OPTS}\n" 1229 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 1230 - 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 1231 - (time make html BUILDDIR="../public" SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1232 - (time make latexpdf SPHINXOPTS="-T -E -W --keep-going -j 2") || (printf "Sphinx build failed (warnings count as errors)\n" && false) 1233 - cp _build/latex/manual.pdf ../public/html/manual/ 1234 environment: 1235 name: review/$CI_COMMIT_REF_NAME 1236 url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/html/index.html 1237 auto_stop_in: one week 1238 deployment_tier: development 1239 artifacts: 1240 paths: 1241 - public 1242 expire_in: 4 days 1243 except: 1244 variables: 1245 - $PETSC_CI_SCHEDULED =~ /yes/ 1246 1247# 1248# Deploy documentation using GitLab pages 1249# 1250pages: # this job name has special meaning to GitLab 1251 extends: .docs 1252 interruptible: true 1253 script: 1254 - mkdir -p ../public/ && cp public/* ../public/ 1255 - (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) 1256 - cd .. && git clean -fdxq -e public -e venv-petsc-docs && cd doc && rm -rf images 1257 - (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) 1258 - rm -rf ../public/*/.doctrees 1259 only: 1260 variables: 1261 - $PETSC_CI_SCHEDULED == "yes" 1262 artifacts: 1263 paths: 1264 - public 1265 expire_in: 4 days 1266 1267# 1268# 1269# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 1270# that fail produce a warning, but do not block execution of a pipeline. 1271# 1272 1273.test-experimental: 1274 extends: .test 1275 allow_failure: true 1276 1277