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