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