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