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