xref: /petsc/.gitlab-ci.yml (revision 7cb4dcb2e8dcf4ed37b1f4e44b21876e59b5992a)
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
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-basic
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.6- -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
383mswin-uni:
384  extends:
385    - .stage-2
386    - .mswin_test
387  tags:
388    - win-stage2
389  variables:
390    TEST_ARCH: arch-ci-mswin-uni
391
392mswin-gnu:
393  extends:
394    - .stage-2
395    - .mswin_test
396  tags:
397    - win-stage2
398  variables:
399    TEST_ARCH: arch-ci-mswin-gnu
400    MAKE_CFLAGS: -Werror
401    MAKE_CXXFLAGS: -Werror
402    MAKE_FFLAGS: -Werror
403    DISABLE_TESTS: 1
404  artifacts:
405    reports:
406    paths:
407    - arch-*/lib/petsc/conf/*.log
408    expire_in: 4 days
409
410#
411# The following tests run as part of stage-3.
412#
413
414freebsd-cxx-cmplx-pkgs-dbg:
415  extends:
416    - .stage-3
417    - .freebsd_test
418  tags:
419    - os:fbsd
420  variables:
421    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg
422
423freebsd-cxx-pkgs-opt:
424  extends:
425    - .stage-3
426    - .freebsd_test
427  tags:
428    - os:fbsd
429  variables:
430    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
431    TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt
432
433freebsd-pkgs-opt:
434  extends:
435    - .stage-3
436    - .freebsd_test
437  tags:
438    - os:fbsd
439  variables:
440    TEST_ARCH: arch-ci-freebsd-pkgs-opt
441
442linux-hip-double:
443  extends:
444    - .stage-3
445    - .linux_test
446  tags:
447    - gpu:amd, os:linux, name:hip-txcorp
448  variables:
449    PATH: /opt/rh/devtoolset-7/root/usr/bin:/opt/rocm/bin:/opt/rocm/llvm/bin:/usr/sbin:/usr/bin:/sbin:/bin
450    TEST_ARCH: arch-ci-linux-hip-double
451
452linux-sycl-double:
453  extends:
454    - .stage-3
455    - .linux_test_nofflags
456  tags:
457    - os:linux, name:pj01
458  variables:
459    TEST_ARCH: arch-ci-linux-sycl-double
460    INIT_SCRIPT: /home/glci/bin/ci-inteloneapi.sh
461    DISABLE_TESTS: 1
462
463linux-c-exodus-dbg:
464  extends:
465    - .stage-3
466    - .linux_test
467  tags:
468    - gpu:nvidia, os:linux, name:frog
469  variables:
470    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -use_gpu_aware_mpi 0
471    TEST_ARCH: arch-ci-linux-c-exodus-dbg
472    RUN_GCOV: 1
473    TEST_OPTS: -j1 query=requires queryval=cuda
474
475linux-cuda11-double:
476  extends:
477    - .stage-3
478    - .linux_test
479  tags:
480    - gpu:nvidia, os:linux, name:frog
481  variables:
482    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -use_gpu_aware_mpi 0
483    TEST_ARCH: arch-ci-linux-cuda11-double
484    TEST_OPTS: -j1 query=requires queryval=cuda
485
486linux-cuda11-complex:
487  extends:
488    - .stage-3
489    - .linux_test
490  tags:
491    - gpu:nvidia, os:linux, name:frog
492  variables:
493    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -use_gpu_aware_mpi 0
494    TEST_ARCH: arch-ci-linux-cuda11-complex
495    TEST_OPTS: -j1 query=requires queryval=cuda
496
497linux-cuda-double-64idx:
498  extends:
499    - .stage-2
500    - .linux_test
501  tags:
502    - gpu:nvidia, os:linux, name:p1
503  variables:
504    TEST_ARCH: arch-ci-linux-cuda-double-64idx
505    TEST_OPTS: -j1 query=requires queryval=cuda
506
507linux-cuda-single-cxx:
508  extends:
509    - .stage-3
510    - .linux_test
511  tags:
512    - gpu:nvidia, os:linux
513  variables:
514    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -use_gpu_aware_mpi 0
515    TEST_ARCH: arch-ci-linux-cuda-single-cxx
516    TEST_OPTS: -j1 query=requires queryval=cuda
517
518linux-cuda-uni-pkgs:
519  extends:
520    - .stage-3
521    - .linux_test
522  tags:
523    - gpu:nvidia, os:linux
524  variables:
525    TEST_ARCH: arch-ci-linux-cuda-uni-pkgs
526    TEST_OPTS: -j4 query=requires queryval=cuda
527
528linux-viennacl:
529  extends:
530    - .stage-3
531    - .linux_test
532  tags:
533    - gpu:nvidia, os:linux
534  variables:
535    TEST_ARCH: arch-ci-linux-viennacl
536    MAKE_CXXFLAGS: -Werror -Wno-ignored-attributes
537    TEST_OPTS: -j1 query=requires queryval=viennacl
538
539linux-without-fc:
540  extends:
541    - .stage-3
542    - .linux_test
543  tags:
544    - gce-nfs
545  variables:
546    TEST_ARCH: arch-ci-linux-without-fc
547
548linux-cmplx-single:
549  extends:
550    - .stage-3
551    - .linux_test
552  tags:
553    - name:si
554  variables:
555    TEST_ARCH: arch-ci-linux-cmplx-single
556
557linux-gcc-cxx-avx2:
558  extends:
559    - .stage-3
560    - .linux_test
561  tags:
562    - name:isdp001
563  variables:
564    TEST_ARCH: arch-ci-linux-gcc-cxx-avx2
565
566linux-clang-avx:
567  extends:
568    - .stage-3
569    - .linux_test
570  tags:
571    - name:isdp001
572  variables:
573    TEST_ARCH: arch-ci-linux-clang-avx
574
575linux-knl:
576  extends:
577    - .stage-3
578    - .linux_test
579  tags:
580    - name:isdp001
581  variables:
582    TEST_ARCH: arch-ci-linux-knl
583
584linux-intel-mkl-single:
585  extends:
586    - .stage-3
587    - .linux_test_nofflags
588  tags:
589    - name:isdp001
590  variables:
591    TEST_ARCH: arch-ci-linux-intel-mkl-single
592
593linux-cxx-cmplx-pkgs-64idx:
594  extends:
595    - .stage-3
596    - .linux_test
597  tags:
598    - gce-nfs
599  variables:
600    TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx
601    LOAD_MODULES: llvm/9.0.0-7fyffox gcc/8.3.0-fjpc5ys cmake/3.14.2-rl3q676
602
603# Set env vars for 'Kokkos + OpenMP' tests, so that they won't give warnings
604linux-pkgs-dbg-ftn-interfaces:
605  extends:
606    - .stage-3
607    - .linux_test
608  tags:
609    - gce-nfs
610  variables:
611    TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces
612    OMP_PROC_BIND: "false"
613    OMP_NUM_THREADS: 4
614
615linux-pkgs-cxx-mlib:
616  extends:
617    - .stage-3
618    - .linux_test
619  tags:
620    - gce-nfs
621  variables:
622    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
623    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
624
625linux-pkgs-valgrind:
626  extends:
627    - .stage-3
628    - .linux_test
629  tags:
630    - gce-nfs, linux-fast
631  variables:
632    TEST_ARCH: arch-ci-linux-pkgs-valgrind
633    TIMEOUT: 7200
634
635linux-pkgs-opt:
636  extends:
637    - .stage-3
638    - .linux_test
639  tags:
640    - gce-nfs, linux-fast
641  variables:
642    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
643    TEST_ARCH: arch-ci-linux-pkgs-opt
644    LOAD_MODULES: gcc/10.1.0-5hiqhdh
645
646linux-pkgs-gcov:
647  extends:
648    - .stage-3
649    - .linux_test
650  tags:
651    - gce-nfs, linux-gcov
652  variables:
653    TEST_ARCH: arch-ci-linux-pkgs-gcov
654    RUN_GCOV: 1
655
656linux-cmplx-gcov:
657  extends:
658    - .stage-3
659    - .linux_test
660  tags:
661    - gce-nfs, linux-gcov
662  variables:
663    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -vecscatter_mpi1 false -options_left false
664    TEST_ARCH: arch-ci-linux-cmplx-gcov
665    LOAD_MODULES: gcc/8.3.0-fjpc5ys
666    RUN_GCOV: 1
667
668linux-matlab-ilp64-gcov:
669  extends:
670    - .stage-3
671    - .linux_test
672  tags:
673    - gce-nfs, linux-gcov
674  variables:
675    TEST_ARCH: arch-ci-linux-matlab-ilp64-gcov
676    LOAD_MODULES: matlab/R2018a
677    RUN_GCOV: 1
678  allow_failure: true
679
680linux-gcov:
681  extends:
682    - .stage-3
683    - .linux_test
684  tags:
685    - gce-nfs, linux-gcov
686  variables:
687    TEST_ARCH: arch-ci-linux-gcov
688    RUN_GCOV: 1
689
690linux-pgi:
691  extends:
692    - .stage-3
693    - .linux_test_noflags
694  tags:
695    - gce-nfs, linux-mcpu
696  variables:
697    TEST_ARCH: arch-ci-linux-pgi
698    LOAD_MODULES: hpc_sdk/20.9
699
700linux-nagfor:
701  extends:
702    - .stage-3
703    - .linux_test_nofflags
704  tags:
705    - gce-nfs, linux-mcpu
706  variables:
707    LOAD_MODULES: nag/6.1
708    TEST_ARCH: arch-ci-linux-nagfor
709
710linux-intel-cmplx:
711  extends:
712    - .stage-3
713    - .linux_test_nofflags
714  tags:
715    - gce-nfs
716  variables:
717    TEST_ARCH: arch-ci-linux-intel-cmplx
718    LOAD_MODULES: intel-mkl/19.5 intel/19.0-nompilib
719    ENABLE_PETSC4PY_LDPRELOAD: 1
720
721linux-xsdk-dbg:
722  extends:
723    - .stage-3
724    - .linux_test
725  tags:
726    - gce-nfs
727  variables:
728    TEST_ARCH: arch-ci-linux-xsdk-dbg
729    LOAD_MODULES: gcc/8.3.0-fjpc5ys
730
731linux-analyzer:
732  extends:
733    - .stage-3
734    - .linux_test
735  tags:
736    - gce-nfs
737  script:
738    - printf "PATH:$PATH\n"
739    - printf "PYTHONPATH:$PYTHONPATH\n"
740    - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
741    - 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
742    - printf "./config/examples/${TEST_ARCH}.py\n"
743    - cat ./config/examples/${TEST_ARCH}.py
744    - ./config/examples/${TEST_ARCH}.py
745    - make LINTER_OPTIONS="${LINTER_OPTIONS}" test-lint
746    - make LINTER_OPTIONS="${LINTER_OPTIONS}" lint
747  variables:
748    TEST_ARCH: arch-ci-linux-analyzer
749    LOAD_MODULES: llvm/11.0.0-snbtima cmake/3.20.0-vov726r
750    LINTER_OPTIONS: "--PETSC_ARCH=${TEST_ARCH} --clang_lib=`llvm-config --libdir`/libclang.so.11 --verbose"
751  artifacts:
752    paths:
753    - ${TEST_ARCH}/lib/petsc/conf/*.log
754    - ./petscLintPatches/*.patch
755
756linux-intel:
757  extends:
758    - .stage-3
759    - .linux_test_nofflags
760  tags:
761    - gce-nfs
762  variables:
763    TEST_ARCH: arch-ci-linux-intel
764    LOAD_MODULES: intel-mkl/19.5 intel/19.0-nompilib
765
766linux-opt-misc:
767  extends:
768    - .stage-3
769    - .linux_test
770  tags:
771    - gce-nfs, linux-fast
772  variables:
773    TEST_ARCH: arch-ci-linux-opt-misc
774    LOAD_MODULES: gcc/6.5.0-57usejd
775
776linux-pkgs-64idx:
777  extends:
778    - .stage-3
779    - .linux_test
780  tags:
781    - gce-nfs, linux-mcpu
782  variables:
783    TEST_ARCH: arch-ci-linux-pkgs-64idx
784    LOAD_MODULES: cmake/3.15.5-fh74toq intel-mkl/19.5
785
786linux-64idx-i8:
787  extends:
788    - .stage-3
789    - .linux_test
790  tags:
791    - gce-nfs
792  variables:
793    TEST_ARCH: arch-ci-linux-64idx-i8
794
795linux-gcc-ifc-cmplx:
796  extends:
797    - .stage-3
798    - .linux_test_nofflags
799  tags:
800    - gce-nfs
801  variables:
802    TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx
803    LOAD_MODULES: intel/19.0-nompilib cmake/3.20.0-vov726r
804
805linux-opt-cxx-quad:
806  extends:
807    - .stage-3
808    - .linux_test
809  tags:
810    - gce-nfs
811  variables:
812    TEST_ARCH: arch-ci-linux-opt-cxx-quad
813
814linux-ILP64:
815  extends:
816    - .stage-3
817    - .linux_test
818  tags:
819    - gce-nfs
820  variables:
821    TEST_ARCH: arch-ci-linux-ILP64
822    LOAD_MODULES: mpich/2-1.5-gcc750
823
824linux-64idx-i8-uni:
825  extends:
826    - .stage-3
827    - .linux_test
828  tags:
829    - gce-nfs
830  variables:
831    TEST_ARCH: arch-ci-linux-64idx-i8-uni
832
833mswin-intel-cxx-cmplx:
834  extends:
835    - .stage-3
836    - .mswin_test
837  tags:
838    - os:win
839  variables:
840    TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx
841
842#mswin-intel:
843#  extends:
844#    - .stage-3
845#    - .mswin_test
846#  tags:
847#    - os:win
848#  variables:
849#    TEST_ARCH: arch-ci-mswin-intel
850
851#mswin-opt-impi:
852#  extends:
853#    - .stage-3
854#    - .mswin_test
855#  tags:
856#    - os:win
857#  variables:
858#    TEST_ARCH: arch-ci-mswin-opt-impi
859#    DISABLE_TESTS: 1
860
861opensolaris-pkgs-opt:
862  extends:
863    - .stage-3
864    - .opensolaris_test
865  tags:
866    - name:n-gage
867  variables:
868    TEST_ARCH: arch-ci-opensolaris-pkgs-opt
869
870opensolaris-cmplx-pkgs-dbg:
871  extends:
872    - .stage-3
873    - .opensolaris_test
874  tags:
875    - name:n-gage
876  variables:
877    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
878
879opensolaris-misc:
880  extends:
881    - .stage-3
882    - .opensolaris_test
883  tags:
884    - name:n-gage
885  variables:
886    TEST_ARCH: arch-ci-opensolaris-misc
887
888osx-cxx-cmplx-pkgs-dbg:
889  extends:
890    - .stage-3
891    - .osx_test
892  tags:
893    - os:macos
894  variables:
895    TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg
896
897osx-cxx-pkgs-opt:
898  extends:
899    - .stage-3
900    - .osx_test
901  tags:
902    - os:macos, opt
903  variables:
904    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
905    TEST_ARCH: arch-ci-osx-cxx-pkgs-opt
906    MAKE_CXXFLAGS: -Werror -Wno-pass-failed
907
908osx-dbg:
909  extends:
910    - .stage-3
911    - .osx_test
912  tags:
913    - os:macos
914  variables:
915    TEST_ARCH: arch-ci-osx-dbg
916
917osx-xsdk-opt:
918  extends:
919    - .stage-3
920    - .osx_test
921  tags:
922    - os:macos, opt
923  variables:
924    TEST_ARCH: arch-ci-osx-xsdk-opt
925
926# job for analyzing the final coverage results
927analyze-pipeline:
928  extends: .test
929  stage: .post
930  tags:
931    - gce-nfs
932  dependencies:
933    - linux-c-exodus-dbg
934    - linux-pkgs-gcov
935    - linux-cmplx-gcov
936    - linux-matlab-ilp64-gcov
937    - linux-gcov
938  variables:
939    PETSC_ARCH: arch-ci-analyze-pipeline
940  before_script:
941    - date
942    - hostname
943  script:
944  - ./configure --with-mpi=0 --with-cxx=0 --with-c2html
945  - make srchtml
946  - make mergegcov
947  artifacts:
948    name: "$CI_JOB_NAME"
949    when: always
950    paths:
951    - arch-ci-analyze-pipeline/*
952    expire_in: 4 days
953
954
955#
956# Base job for a documentation build
957#
958.docs:
959  stage: stage-2
960  tags:
961    - name:pj02
962  before_script:
963    - VENV=venv-petsc-docs &&
964      python3 -m venv $VENV &&
965      . $VENV/bin/activate &&
966      cd doc &&
967      pip install -r requirements.txt
968  allow_failure: true
969
970#
971# Build documentation and make available for review using GitLab pages
972#
973docs-review:
974  extends:
975    - .docs
976    - .test-basic
977  script:
978    - sphinx-build -T -E -b html -D language=en -j auto . ../public
979  environment:
980    name: review/$CI_COMMIT_REF_NAME
981    url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/index.html
982  artifacts:
983    paths:
984      - public
985  except:
986    variables:
987      - $PETSC_CI_SCHEDULED =~ /yes/
988
989#
990# Deploy documentation using GitLab pages
991#
992pages:  # this job name has special meaning to GitLab
993  extends: .docs
994  interruptible: true
995  script:
996    - mkdir -p ../public/ && cp public/* ../public/
997    - git fetch --unshallow --no-tags origin +release:remotes/origin/release +main:remotes/origin/main
998    - git checkout origin/main && make website-deploy BUILDDIR="../public/main"
999    - make clean BUILDDIR="../public/release"
1000    - git checkout origin/release && make website-deploy BUILDDIR="../public/release"
1001  only:
1002    variables:
1003      - $PETSC_CI_SCHEDULED == "yes"
1004  artifacts:
1005    paths:
1006      - public
1007
1008#
1009#
1010# The following tests are experimental; more tests by users at other sites may be added below this.  Experimental test
1011# that fail produce a warning, but do not block execution of a pipeline.
1012#
1013
1014.test-experimental:
1015  extends: .test
1016  allow_failure: true
1017
1018