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