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