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