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