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