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