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