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