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