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