1# 2# stage-1 take only a few minutes and generally run on the cloud; 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# (not yet implemented) 8# 9# The stage-(n) tests are only started if all of the stage-(n-1) tests run without error 10# You can limit the testing by using the variable STAGE with value 1 or 2 11# 12# By default the test branch is merged to master before testing. (not yet implemented) 13# You can limite this by using the variable MERGETOMASTER with value 0 (not yet implemented) 14# 15 16stages: 17 - stage-1 18 - stage-2 19 - stage-3 20variables: 21 GIT_STRATEGY: fetch 22 GIT_CLEAN_FLAGS: -ffdxq 23 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 24 TIMEOUT: 600 25 26# 27# The most basic template that most tests will expand upon. In particular merge requests and branch pushes DO NOT trigger testing 28# 29 30.test: 31 only: 32 refs: 33# Set with CI/CD Shedules - New Schedule 34 - schedules 35# Set with CI/CD Pipelines - Run Pipeline 36 - web 37 dependencies: [] 38 39# 40# This provides the basic order of operations and options template for cloud based stage 1 tests. 41# Not all test-short need to follow this template but most will. 42# 43 44.stage-1: 45 extends: .test 46 stage: stage-1 47 image: jedbrown/mpich-ccache 48 tags: 49 - docker 50 before_script: 51 - date 52 - echo nproc=$(nproc) 53 - cat /proc/cpuinfo 54 - export CCACHE_COMPILERCHECK=content 55 - export CCACHE_DIR=$(pwd)/.ccache 56 - ccache --show-stats 57 - ccache --zero-stats 58 - echo CONFIG_OPTS=$(CONFIG_OPTS) 59 script: 60 - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS} 61 - make CFLAGS=-Werror CXXFLAGS=-Werror 62 - make CFLAGS=-Werror CXXFLAGS=-Werror allgtests-tap search="${TEST_SEARCH}" TIMEOUT=${TIMEOUT} 63 after_script: 64 - date 65 - CCACHE_DIR=$(pwd)/.ccache ccache --show-stats 66 artifacts: 67 reports: 68 junit: arch-*/tests/testresults.xml 69 name: "$CI_JOB_NAME" 70 when: always 71 paths: 72 - arch-*/lib/petsc/conf/*.log 73 - arch-*/tests/testresults.xml 74 - arch-*/tests/test_*_tap.log 75 - arch-*/tests/test_*_err.log 76 expire_in: 4 days 77 cache: 78 paths: 79 - .ccache/ 80 key: "${CI_JOB_NAME}" 81 82# 83# The following tests run on the cloud as part of stage-1. 84# 85 86mpich-cxx-py3: 87 extends: .stage-1 88 variables: 89 PYTHON: python3 90 CONFIG_OPTS: --with-mpi-dir=/usr/local --with-clanguage=cxx --with-fc=0 91 TEST_SEARCH: snes_tutorials-ex48% 92 93uni-complex-float-int64: 94 extends: .stage-1 95 variables: 96 PYTHON: python3 97 CONFIG_OPTS: --with-mpi=0 --with-scalar-type=complex --with-precision=single --with-64-bit-indices 98 TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_% 99 100c89-mlib-static-py2: 101 extends: .stage-1 102 image: jedbrown/mpich-ccache:python2 103 variables: 104 PYTHON: python2 105 CONFIG_OPTS: --with-mpi-dir=/usr/local --with-single-library=0 --with-shared-libraries=0 CFLAGS=-std=c89 106 TEST_SEARCH: snes_tutorials-ex19% 107 108checksource: 109 extends: .test 110 image: jedbrown/mpich-ccache 111 stage: stage-1 112 script: 113 - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0 114 - make checkbadSource SHELL=bash 115 - make check_output SHELL=bash 116 117# 118# This provides the basic order of operations and options template for stage-2,3 tests. 119# Not all stage-2,3 need to follow this template, but most will. 120# 121.stage-23: 122 extends: .test 123 script: 124 - printf "PATH:$PATH\n" 125 - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n" 126 - printf "./config/examples/${TEST_ARCH}.py\n" 127 - cat ./config/examples/${TEST_ARCH}.py 128 - ./config/examples/${TEST_ARCH}.py 129 - make CFLAGS=${MAKE_CFLAGS} CXXFLAGS=${MAKE_CXXFLAGS} 130 - make CFLAGS=${MAKE_CFLAGS} CXXFLAGS=${MAKE_CXXFLAGS} check 131 - make updatedatafiles 132 - make CFLAGS=${MAKE_CFLAGS} CXXFLAGS=${MAKE_CXXFLAGS} cleantest allgtests-tap TIMEOUT=${TIMEOUT} 133 artifacts: 134 reports: 135 junit: ${TEST_ARCH}/tests/testresults.xml 136 name: "$CI_JOB_NAME" 137 when: always 138 paths: 139 - ${TEST_ARCH}/lib/petsc/conf/*.log 140 - ${TEST_ARCH}/tests/testresults.xml 141 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log 142 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log 143 expire_in: 4 days 144 variables: 145 OPENBLAS_NUM_THREADS: 1 146 147.stage-2: 148 extends: .stage-23 149 stage: stage-2 150 only: 151 variables: 152 - $STAGE != "1" 153 - $STAGE != "3" 154 155.stage-3: 156 extends: .stage-23 157 stage: stage-3 158 only: 159 variables: 160 - $STAGE != "1" 161 - $STAGE != "2" 162 163# 164# The following provide templates for various OSes for pre/post info 165# 166 167.linux_test_noflags: 168 before_script: 169 - date 170 - hostname 171 - grep PRETTY_NAME /etc/os-release 172 - echo $(nproc) 173 - ccache --zero-stats 174 - if [ ! -z ${LOAD_MODULES+x} ]; then module load ${LOAD_MODULES}; module list; fi 175 after_script: 176 - date 177 - ccache --show-stats 178 179.linux_test: 180 extends: .linux_test_noflags 181 variables: 182 MAKE_CFLAGS: -Werror 183 MAKE_CXXFLAGS: -Werror 184 185.freebsd_test: 186 variables: 187 MAKE_CFLAGS: -Werror 188 MAKE_CXXFLAGS: -Werror 189 before_script: 190 - date 191 - hostname 192 - freebsd-version 193 - echo $(sysctl -n hw.ncpu) 194 - ccache --zero-stats 195 after_script: 196 - date 197 - ccache --show-stats 198 199.osx_test: 200 variables: 201 MAKE_CFLAGS: -Werror 202 MAKE_CXXFLAGS: -Werror 203 before_script: 204 - date 205 - hostname 206 - sw_vers -productVersion 207 - echo $(sysctl -n hw.ncpu) 208 - ccache --zero-stats 209 after_script: 210 - date 211 - ccache --show-stats 212 213.opensolaris_test: 214 before_script: 215 - date 216 - hostname 217 - uname -a 218 - echo $(nproc) 219 after_script: 220 - date 221 222.mswin_test: 223 before_script: 224 - date 225 - hostname 226 - uname -a 227 - echo $(nproc) 228 after_script: 229 - date 230 231# 232# The following tests run as part of stage-2. 233# 234# The tags variable used in the tests below connects the particular test with the runners 235# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd. 236# For example the test linux-gcc-complex-opt any runner that has the tag 'name:pj02' 237# (in a blue box beneath it) 238# 239 240linux-gcc-complex-opt: 241 extends: 242 - .stage-2 243 - .linux_test 244 tags: 245 - linux-dell 246 variables: 247 TEST_ARCH: arch-ci-linux-gcc-complex-opt 248 249linux-gcc-pkgs-opt: 250 extends: 251 - .stage-2 252 - .linux_test 253 tags: 254 - linux-dell 255 variables: 256 TEST_ARCH: arch-ci-linux-gcc-pkgs-opt 257 258linux-gcc-quad-64idx-dbg: 259 extends: 260 - .stage-2 261 - .linux_test 262 tags: 263 - linux-dell 264 variables: 265 TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg 266 267linux-cuda-double: 268 extends: 269 - .stage-2 270 - .linux_test 271 tags: 272 - gpu:nvidia, os:linux 273 variables: 274 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0 275 TEST_ARCH: arch-ci-linux-cuda-double 276 277freebsd-c-single-opt: 278 extends: 279 - .stage-2 280 - .freebsd_test 281 tags: 282 - os:fbsd 283 variables: 284 TEST_ARCH: arch-ci-freebsd-c-single-opt 285 286freebsd-cxx-cmplx-64idx-dbg: 287 extends: 288 - .stage-2 289 - .freebsd_test 290 tags: 291 - os:fbsd 292 variables: 293 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg 294 295opensolaris-misc: 296 extends: 297 - .stage-3 298 - .opensolaris_test 299 tags: 300 - name:n-gage 301 variables: 302 TEST_ARCH: arch-ci-opensolaris-misc 303 304osx-cxx-pkgs-opt: 305 extends: 306 - .stage-3 307 - .osx_test 308 tags: 309 - os:macos 310 variables: 311 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent -vecscatter_mpi1 false -options_left false 312 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt 313 314mswin-uni: 315 extends: 316 - .stage-2 317 - .mswin_test 318 tags: 319 - name:ps5-2 320 variables: 321 TEST_ARCH: arch-ci-mswin-uni 322 323# 324# The following tests run as part of stage-3. 325# 326 327mswin-intel-cxx-cmplx: 328 extends: 329 - .stage-3 330 - .mswin_test 331 tags: 332 - name:ps5 333 variables: 334 TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx 335 336mswin-intel: 337 extends: 338 - .stage-3 339 - .mswin_test 340 tags: 341 - name:ps5 342 variables: 343 TEST_ARCH: arch-ci-mswin-intel 344 345mswin-opt-impi: 346 extends: 347 - .stage-3 348 - .mswin_test 349 tags: 350 - name:ps4 351 variables: 352 TEST_ARCH: arch-ci-mswin-opt-impi 353 354opensolaris-cmplx-pkgs-dbg: 355 extends: 356 - .stage-3 357 - .opensolaris_test 358 tags: 359 - name:n-gage 360 variables: 361 TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg 362 363opensolaris-pkgs-opt: 364 extends: 365 - .stage-3 366 - .opensolaris_test 367 tags: 368 - name:n-gage 369 variables: 370 TEST_ARCH: arch-ci-opensolaris-pkgs-opt 371 372freebsd-pkgs-opt: 373 extends: 374 - .stage-3 375 - .freebsd_test 376 tags: 377 - os:fbsd 378 variables: 379 TEST_ARCH: arch-ci-freebsd-pkgs-opt 380 381freebsd-cxx-cmplx-pkgs-dbg: 382 extends: 383 - .stage-3 384 - .freebsd_test 385 tags: 386 - os:fbsd 387 variables: 388 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg 389 390freebsd-cxx-pkgs-opt: 391 extends: 392 - .stage-3 393 - .freebsd_test 394 tags: 395 - os:fbsd 396 variables: 397 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent -vecscatter_mpi1 false -options_left false 398 TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt 399 400osx-cxx-cmplx-pkgs-dbg: 401 extends: 402 - .stage-3 403 - .osx_test 404 tags: 405 - os:macos 406 variables: 407 TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg 408 409osx-dbg: 410 extends: 411 - .stage-3 412 - .osx_test 413 tags: 414 - os:macos 415 variables: 416 TEST_ARCH: arch-ci-osx-dbg 417 418osx-xsdk-opt: 419 extends: 420 - .stage-3 421 - .osx_test 422 tags: 423 - os:macos 424 variables: 425 TEST_ARCH: arch-ci-osx-xsdk-opt 426 427linux-cmplx-gcov: 428 extends: 429 - .stage-3 430 - .linux_test 431 tags: 432 - mcs-nfs 433 variables: 434 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -vecscatter_mpi1 false -options_left false 435 TEST_ARCH: arch-ci-linux-cmplx-gcov 436 after_script: 437 - make gcov 438 artifacts: 439 when: always 440 paths: 441 - ${TEST_ARCH}/lib/petsc/conf/*.log 442 - ${TEST_ARCH}/tests/testresults.xml 443 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log 444 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log 445 - ${TEST_ARCH}/gcov.tar.gz 446 expire_in: 4 days 447 448 449linux-cmplx-single: 450 extends: 451 - .stage-3 452 - .linux_test 453 tags: 454 - name:si 455 variables: 456 TEST_ARCH: arch-ci-linux-cmplx-single 457 458linux-without-fc: 459 extends: 460 - .stage-3 461 - .linux_test 462 tags: 463 - name:si 464 variables: 465 TEST_ARCH: arch-ci-linux-without-fc 466 467linux-clang-avx: 468 extends: 469 - .stage-3 470 - .linux_test 471 tags: 472 - name:isdp001 473 variables: 474 TEST_ARCH: arch-ci-linux-clang-avx 475 476linux-gcc-cxx-avx2: 477 extends: 478 - .stage-3 479 - .linux_test 480 tags: 481 - name:isdp001 482 variables: 483 TEST_ARCH: arch-ci-linux-gcc-cxx-avx2 484 485linux-knl: 486 extends: 487 - .stage-3 488 - .linux_test 489 tags: 490 - name:isdp001 491 variables: 492 TEST_ARCH: arch-ci-linux-knl 493 494linux-c-exodus-dbg: 495 extends: 496 - .stage-3 497 - .linux_test 498 tags: 499 - gpu:nvidia, os:linux 500 variables: 501 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0 502 TEST_ARCH: arch-ci-linux-c-exodus-dbg 503 504linux-cuda-single: 505 extends: 506 - .stage-3 507 - .linux_test 508 tags: 509 - gpu:nvidia, os:linux 510 variables: 511 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0 512 TEST_ARCH: arch-ci-linux-cuda-single 513 514linux-viennacl: 515 extends: 516 - .stage-3 517 - .linux_test 518 tags: 519 - gpu:nvidia, os:linux, name:frog 520 variables: 521 TEST_ARCH: arch-ci-linux-viennacl 522 523linux-opt-misc: 524 extends: 525 - .stage-3 526 - .linux_test 527 tags: 528 - gce-nfs 529 variables: 530 TEST_ARCH: arch-ci-linux-opt-misc 531 532linux-pkgs-cxx-mlib: 533 extends: 534 - .stage-3 535 - .linux_test 536 tags: 537 - name:pj02 538 variables: 539 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent 540 TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib 541 542linux-cxx-cmplx-pkgs-64idx: 543 extends: 544 - .stage-3 545 - .linux_test 546 tags: 547 - name:pj01 548 variables: 549 TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx 550 551linux-pkgs-dbg-ftn-interfaces: 552 extends: 553 - .stage-3 554 - .linux_test 555 tags: 556 - name:pj02 557 variables: 558 TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces 559 560linux-analyzer: 561 extends: 562 - .stage-3 563 - .linux_test 564 tags: 565 - mcs-nfs 566 variables: 567 TEST_ARCH: arch-ci-linux-analyzer 568 569linux-gcc-ifc-cmplx: 570 extends: 571 - .stage-3 572 - .linux_test 573 tags: 574 - mcs-nfs 575 variables: 576 TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx 577 578linux-gcov: 579 extends: 580 - .stage-3 581 - .linux_test 582 tags: 583 - mcs-nfs 584 variables: 585 TEST_ARCH: arch-ci-linux-gcov 586 after_script: 587 - make gcov 588 artifacts: 589 when: always 590 paths: 591 - ${TEST_ARCH}/lib/petsc/conf/*.log 592 - ${TEST_ARCH}/tests/testresults.xml 593 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log 594 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log 595 - ${TEST_ARCH}/gcov.tar.gz 596 expire_in: 4 days 597 598 599linux-ILP64: 600 extends: 601 - .stage-3 602 - .linux_test 603 tags: 604 - gce-nfs 605 variables: 606 TEST_ARCH: arch-ci-linux-ILP64 607 608linux-matlab-ilp64-gcov: 609 extends: 610 - .stage-3 611 - .linux_test 612 tags: 613 - mcs-nfs 614 variables: 615 TEST_ARCH: arch-ci-linux-matlab-ilp64-gcov 616 after_script: 617 - make gcov 618 artifacts: 619 when: always 620 paths: 621 - ${TEST_ARCH}/lib/petsc/conf/*.log 622 - ${TEST_ARCH}/tests/testresults.xml 623 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log 624 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log 625 - ${TEST_ARCH}/gcov.tar.gz 626 expire_in: 4 days 627 628 629linux-opt-cxx-quad: 630 extends: 631 - .stage-3 632 - .linux_test 633 tags: 634 - mcs-nfs 635 variables: 636 TEST_ARCH: arch-ci-linux-opt-cxx-quad 637 638linux-pgi: 639 extends: 640 - .stage-3 641 - .linux_test_noflags 642 tags: 643 - mcs-nfs,name:petsc 644 variables: 645 TEST_ARCH: arch-ci-linux-pgi 646 647linux-pkgs-64idx: 648 extends: 649 - .stage-3 650 - .linux_test 651 tags: 652 - mcs-nfs 653 variables: 654 TEST_ARCH: arch-ci-linux-pkgs-64idx 655 656linux-pkgs-gcov: 657 extends: 658 - .stage-3 659 - .linux_test 660 tags: 661 - mcs-nfs 662 variables: 663 TEST_ARCH: arch-ci-linux-pkgs-gcov 664 after_script: 665 - make gcov 666 artifacts: 667 when: always 668 paths: 669 - ${TEST_ARCH}/lib/petsc/conf/*.log 670 - ${TEST_ARCH}/tests/testresults.xml 671 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log 672 - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log 673 - ${TEST_ARCH}/gcov.tar.gz 674 expire_in: 4 days 675 676linux-pkgs-opt: 677 extends: 678 - .stage-3 679 - .linux_test 680 tags: 681 - gce-nfs 682 variables: 683 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent 684 TEST_ARCH: arch-ci-linux-pkgs-opt 685 686linux-pkgs-valgrind: 687 extends: 688 - .stage-3 689 - .linux_test 690 tags: 691 - valgrind 692 variables: 693 TEST_ARCH: arch-ci-linux-pkgs-valgrind 694 TIMEOUT: 7200 695 696linux-xsdk-dbg: 697 extends: 698 - .stage-3 699 - .linux_test 700 tags: 701 - mcs-nfs 702 variables: 703 TEST_ARCH: arch-ci-linux-xsdk-dbg 704 705linux-intel: 706 extends: 707 - .stage-3 708 - .linux_test_noflags 709 tags: 710 - gce-nfs 711 variables: 712 TEST_ARCH: arch-ci-linux-intel 713 LOAD_MODULES: intel-mkl/19.5 intel/19.0 714 715linux-intel-cmplx: 716 extends: 717 - .stage-3 718 - .linux_test_noflags 719 tags: 720 - gce-nfs 721 variables: 722 TEST_ARCH: arch-ci-linux-intel-cmplx 723 LOAD_MODULES: intel-mkl/19.5 intel/19.0 724 725linux-nagfor: 726 extends: 727 - .stage-3 728 - .linux_test 729 tags: 730 - mcs-nfs 731 variables: 732 TEST_ARCH: arch-ci-linux-nagfor 733 734# job for analyzing the final coverage results 735analyze-pipeline: 736 stage: .post 737 image: jedbrown/mpich-ccache 738 variables: 739 PYTHON: python3 740 # Need a dummy TEST_ARCH that comes from artifacts 741 TEST_ARCH: arch-ci-linux-pkgs-gcov 742 only: 743 refs: 744# Set with CI/CD Shedules - New Schedule 745 - schedules 746# Set with CI/CD Pipelines - Run Pipeline 747 - web 748 allow_failure: true 749 before_script: 750 - date 751 script: 752 - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0 753# - make mergegcov LOC=$PWD 754 - ${PYTHON} lib/petsc/bin/maint/gcov.py --merge_gcov --loc=${PWD} --petsc_arch ${TEST_ARCH} 755 - ls 756 - ls arch*/* 757 artifacts: 758 name: "$CI_JOB_NAME" 759 when: always 760 paths: 761 - i*.html 762 - arch-*-gcov/* 763 expire_in: 4 days 764# 765# 766# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 767# that fail produce a warning, but do not block execution of a pipeline. 768# 769 770.test-experimental: 771 extends: .test 772 allow_failure: true 773 774