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