xref: /petsc/.gitlab-ci.yml (revision fdf6c4e30aafdbc795e4f76379caa977fd5cdf5a)
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-u22-stage3
632  variables:
633    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
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 -checkfunctionlist
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 -checkfunctionlist
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-3
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