xref: /petsc/.gitlab-ci.yml (revision ef4cbfc57b743c069a9bb95ee55a36652ef52b58)
1#
2# stage-1 take only a few minutes and generally run on the cloud; 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#         (not yet implemented)
8#
9# The stage-(n) tests are only started if all of the stage-(n-1) tests run without error
10#   You can limit the testing by using the variable STAGE with value 1 or 2
11#
12# By default the test branch is merged to master before testing. (not yet implemented)
13#   You can limite this by using the variable MERGETOMASTER with value 0 (not yet implemented)
14#
15
16stages:
17  - stage-1
18  - stage-2
19  - stage-3
20variables:
21  GIT_STRATEGY: fetch
22  GIT_CLEAN_FLAGS: -ffdxq
23  PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump
24  TIMEOUT: 600
25
26#
27# The most basic template that most tests will expand upon. In particular merge requests and branch pushes DO NOT trigger testing
28#
29
30.test:
31  only:
32    refs:
33#     Set with CI/CD Shedules - New Schedule
34      - schedules
35#     Set with CI/CD Pipelines - Run Pipeline
36      - web
37
38#
39#  This provides the basic order of operations and options template for cloud based stage 1 tests.
40#  Not all test-short need to follow this template but most will.
41#
42
43.stage-1:
44  extends: .test
45  stage: stage-1
46  image: jedbrown/mpich-ccache
47  before_script:
48    - echo nproc=$(nproc)
49    - cat /proc/cpuinfo
50    - export CCACHE_COMPILERCHECK=content
51    - export CCACHE_DIR=$(pwd)/.ccache
52    - ccache --show-stats
53    - ccache --zero-stats
54    - echo CONFIG_OPTS=$(CONFIG_OPTS)
55  script:
56    - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS}
57    - make CFLAGS=-Werror
58    - make allgtests-tap search="${TEST_SEARCH}" TIMEOUT=${TIMEOUT}
59  after_script:
60    - CCACHE_DIR=$(pwd)/.ccache ccache --show-stats
61  artifacts:
62    reports:
63      junit: arch-*/tests/testresults.xml
64  cache:
65    paths:
66      - .ccache/
67    key: "${CI_JOB_NAME}"
68
69#
70# The following tests run on the cloud as part of stage-1.
71#
72
73mpich-cxx-py3:
74  extends: .stage-1
75  variables:
76    PYTHON: python3
77    CONFIG_OPTS: --with-mpi-dir=/usr/local --with-clanguage=cxx --with-fc=0
78    TEST_SEARCH: snes_tutorials-ex48%
79
80uni-complex-float-int64:
81  extends: .stage-1
82  variables:
83    PYTHON: python3
84    CONFIG_OPTS: --with-mpi=0 --with-scalar-type=complex --with-precision=single --with-64-bit-indices
85    TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_%
86
87c89-mlib-static-py2:
88  extends: .stage-1
89  image: jedbrown/mpich-ccache:python2
90  variables:
91    PYTHON: python2
92    CONFIG_OPTS: --with-mpi-dir=/usr/local --with-single-library=0 --with-shared-libraries=0 CFLAGS=-std=c89
93    TEST_SEARCH: snes_tutorials-ex19%
94
95checksource:
96  extends: .test
97  image: jedbrown/mpich-ccache
98  stage: stage-1
99  script:
100    - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0
101    - make checkbadSource SHELL=bash
102    - make check_output SHELL=bash
103
104#
105# This provides the basic order of operations and options template for stage-2,3 tests.
106# Not all stage-2,3 need to follow this template, but most will.
107#
108.stage-23:
109  extends: .test
110  script:
111    - printf "PATH:$PATH\n"
112    - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
113    - printf "./config/examples/${TEST_ARCH}.py\n"
114    - cat ./config/examples/${TEST_ARCH}.py
115    - ./config/examples/${TEST_ARCH}.py
116    - make
117    - make check
118    - make updatedatafiles
119    - make cleantest allgtests-tap TIMEOUT=${TIMEOUT}
120  artifacts:
121    reports:
122      junit: ${TEST_ARCH}/tests/testresults.xml
123
124.stage-2:
125  extends: .stage-23
126  stage: stage-2
127  only:
128    variables:
129      - $STAGE != "1"
130      - $STAGE != "3"
131
132.stage-3:
133  extends: .stage-23
134  stage: stage-3
135  only:
136    variables:
137      - $STAGE != "1"
138      - $STAGE != "2"
139
140#
141# The following provide templates for various OSes for pre/post info
142#
143
144.linux_test:
145  before_script:
146    - hostname
147    - grep PRETTY_NAME /etc/os-release
148    - echo $(nproc)
149    - ccache --zero-stats
150  after_script:
151    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
152    - ccache --show-stats
153
154.freebsd_test:
155  before_script:
156    - hostname
157    - freebsd-version
158    - echo $(sysctl -n hw.ncpu)
159    - ccache --zero-stats
160  after_script:
161    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
162    - ccache --show-stats
163
164.osx_test:
165  before_script:
166    - hostname
167    - sw_vers -productVersion
168    - echo $(sysctl -n hw.ncpu)
169    - ccache --zero-stats
170  after_script:
171    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
172    - ccache --show-stats
173
174.opensolaris_test:
175  before_script:
176    - hostname
177    - uname -a
178    - echo $(nproc)
179  after_script:
180    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
181
182.mswin_test:
183  before_script:
184    - hostname
185    - uname -a
186    - echo $(nproc)
187  after_script:
188    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
189
190#
191# The following tests run as part of stage-2.
192#
193# The tags variable used in the tests below connects the particular test with the runners
194# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd.
195# For example the test linux-gcc-complex-opt  any runner that has the tag 'name:pj02'
196# (in a blue box beneath it)
197#
198
199linux-gcc-complex-opt:
200  extends:
201    - .stage-2
202    - .linux_test
203  tags:
204    - linux-dell
205  variables:
206    TEST_ARCH: arch-ci-linux-gcc-complex-opt
207
208linux-gcc-pkgs-opt:
209  extends:
210    - .stage-2
211    - .linux_test
212  tags:
213    - linux-dell
214  variables:
215    TEST_ARCH: arch-ci-linux-gcc-pkgs-opt
216
217linux-gcc-quad-64idx-dbg:
218  extends:
219    - .stage-2
220    - .linux_test
221  tags:
222    - linux-dell
223  variables:
224    TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg
225
226linux-cuda-double:
227  extends:
228    - .stage-2
229    - .linux_test
230  tags:
231    - name:frog
232  variables:
233    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
234    TEST_ARCH: arch-ci-linux-cuda-double
235
236freebsd-c-single-opt:
237  extends:
238    - .stage-2
239    - .freebsd_test
240  tags:
241    - os:fbsd
242  variables:
243    TEST_ARCH: arch-ci-freebsd-c-single-opt
244
245freebsd-cxx-cmplx-64idx-dbg:
246  extends:
247    - .stage-2
248    - .freebsd_test
249  tags:
250    - name:petsc-fbsd
251  variables:
252    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg
253
254opensolaris-misc:
255  extends:
256    - .stage-3
257    - .opensolaris_test
258  tags:
259    - name:n-gage
260  variables:
261    TEST_ARCH: arch-ci-opensolaris-misc
262
263osx-cxx-pkgs-opt:
264  extends:
265    - .stage-2
266    - .osx_test
267  tags:
268    - os:osx
269  variables:
270    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent -vecscatter_mpi1 false -options_left false
271    TEST_ARCH: arch-ci-osx-cxx-pkgs-opt
272
273mswin-uni:
274  extends:
275    - .stage-2
276    - .mswin_test
277  tags:
278    - name:ps5-2
279  variables:
280    TEST_ARCH: arch-ci-mswin-uni
281
282#
283# The following tests run as part of stage-3.
284#
285
286mswin-intel-cxx-cmplx:
287  extends:
288    - .stage-3
289    - .mswin_test
290  tags:
291    - name:ps5
292  variables:
293    TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx
294
295mswin-intel:
296  extends:
297    - .stage-3
298    - .mswin_test
299  tags:
300    - name:ps5
301  variables:
302    TEST_ARCH: arch-ci-mswin-intel
303
304arch-ci-mswin-opt-impi:
305  extends:
306    - .stage-3
307    - .mswin_test
308  tags:
309    - name:ps4
310  variables:
311    TEST_ARCH: arch-ci-mswin-opt-impi
312  allow_failure: true
313
314
315opensolaris-cmplx-pkgs-dbg:
316  extends:
317    - .stage-3
318    - .opensolaris_test
319  tags:
320    - name:n-gage
321  variables:
322    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
323
324opensolaris-pkgs-opt:
325  extends:
326    - .stage-3
327    - .opensolaris_test
328  tags:
329    - name:n-gage
330  variables:
331    TEST_ARCH: arch-ci-opensolaris-pkgs-opt
332
333freebsd-pkgs-opt:
334  extends:
335    - .stage-3
336    - .freebsd_test
337  tags:
338    - os:fbsd
339  variables:
340    TEST_ARCH: arch-ci-freebsd-pkgs-opt
341
342freebsd-cxx-cmplx-pkgs-dbg:
343  extends:
344    - .stage-3
345    - .freebsd_test
346  tags:
347    - os:fbsd
348  variables:
349    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg
350
351freebsd-cxx-pkgs-opt:
352  extends:
353    - .stage-3
354    - .freebsd_test
355  tags:
356    - os:fbsd
357  variables:
358    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent -vecscatter_mpi1 false -options_left false
359    TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt
360
361osx-cxx-cmplx-pkgs-dbg:
362  extends:
363    - .stage-3
364    - .osx_test
365  tags:
366    - os:osx
367  variables:
368    TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg
369
370osx-dbg:
371  extends:
372    - .stage-3
373    - .osx_test
374  tags:
375    - os:osx
376  variables:
377    TEST_ARCH: arch-ci-osx-dbg
378
379osx-xsdk-opt:
380  extends:
381    - .stage-3
382    - .osx_test
383  tags:
384    - os:osx
385  variables:
386    TEST_ARCH: arch-ci-osx-xsdk-opt
387
388linux-cmplx-gcov:
389  extends:
390    - .stage-3
391    - .linux_test
392  tags:
393    - mcs-nfs
394  variables:
395    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -vecscatter_mpi1 false -options_left false
396    TEST_ARCH: arch-ci-linux-cmplx-gcov
397
398linux-cmplx-single:
399  extends:
400    - .stage-3
401    - .linux_test
402  tags:
403    - name:si
404  variables:
405    TEST_ARCH: arch-ci-linux-cmplx-single
406
407linux-without-fc:
408  extends:
409    - .stage-3
410    - .linux_test
411  tags:
412    - name:si
413  variables:
414    TEST_ARCH: arch-ci-linux-without-fc
415
416linux-clang-avx:
417  extends:
418    - .stage-3
419    - .linux_test
420  tags:
421    - name:isdp001
422  variables:
423    TEST_ARCH: arch-ci-linux-clang-avx
424
425linux-gcc-cxx-avx2:
426  extends:
427    - .stage-3
428    - .linux_test
429  tags:
430    - name:isdp001
431  variables:
432    TEST_ARCH: arch-ci-linux-gcc-cxx-avx2
433
434linux-knl:
435  extends:
436    - .stage-3
437    - .linux_test
438  tags:
439    - name:isdp001
440  variables:
441    TEST_ARCH: arch-ci-linux-knl
442
443linux-c-exodus-dbg:
444  extends:
445    - .stage-3
446    - .linux_test
447  tags:
448    - name:frog
449  variables:
450    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
451    TEST_ARCH: arch-ci-linux-c-exodus-dbg
452
453linux-cuda-single:
454  extends:
455    - .stage-3
456    - .linux_test
457  tags:
458    - name:frog
459  variables:
460    OPENBLAS_NUM_THREADS: 1
461    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
462    TEST_ARCH: arch-ci-linux-cuda-single
463
464linux-viennacl:
465  extends:
466    - .stage-3
467    - .linux_test
468  tags:
469    - name:frog
470  variables:
471    TEST_ARCH: arch-ci-linux-viennacl
472
473linux-opt-misc:
474  extends:
475    - .stage-3
476    - .linux_test
477  tags:
478    - name:compute004
479  variables:
480    OPENBLAS_NUM_THREADS: 1
481    TEST_ARCH: arch-ci-linux-opt-misc
482
483linux-pkgs-cxx-mlib:
484  extends:
485    - .stage-3
486    - .linux_test
487  tags:
488    - name:pj02
489  variables:
490    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
491    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
492
493linux-cxx-cmplx-pkgs-64idx:
494  extends:
495    - .stage-3
496    - .linux_test
497  tags:
498    - name:pj01
499  variables:
500    TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx
501
502linux-pkgs-dbg-ftn-interfaces:
503  extends:
504    - .stage-3
505    - .linux_test
506  tags:
507    - name:pj02
508  variables:
509    TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces
510
511linux-analyzer:
512  extends:
513    - .stage-3
514    - .linux_test
515  tags:
516    - mcs-nfs
517  variables:
518    TEST_ARCH: arch-ci-linux-analyzer
519
520linux-gcc-ifc-cmplx:
521  extends:
522    - .stage-3
523    - .linux_test
524  tags:
525    - mcs-nfs
526  variables:
527    TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx
528
529linux-gcov:
530  extends:
531    - .stage-3
532    - .linux_test
533  tags:
534    - mcs-nfs
535  variables:
536    TEST_ARCH: arch-ci-linux-gcov
537
538linux-ILP64:
539  extends:
540    - .stage-3
541    - .linux_test
542  tags:
543    - name:compute004
544  variables:
545    OPENBLAS_NUM_THREADS: 1
546    TEST_ARCH: arch-ci-linux-ILP64
547
548linux-matlab-ilp64-gcov:
549  extends:
550    - .stage-3
551    - .linux_test
552  tags:
553    - mcs-nfs
554  variables:
555    TEST_ARCH: arch-ci-linux-matlab-ilp64-gcov
556
557linux-opt-cxx-quad:
558  extends:
559    - .stage-3
560    - .linux_test
561  tags:
562    - mcs-nfs
563  variables:
564    TEST_ARCH: arch-ci-linux-opt-cxx-quad
565
566linux-pgi:
567  extends:
568    - .stage-3
569    - .linux_test
570  tags:
571    - mcs-nfs,name:petsc
572  variables:
573    TEST_ARCH: arch-ci-linux-pgi
574
575linux-pkgs-64idx:
576  extends:
577    - .stage-3
578    - .linux_test
579  tags:
580    - mcs-nfs
581  variables:
582    TEST_ARCH: arch-ci-linux-pkgs-64idx
583
584linux-pkgs-gcov:
585  extends:
586    - .stage-3
587    - .linux_test
588  tags:
589    - mcs-nfs
590  variables:
591    TEST_ARCH: arch-ci-linux-pkgs-gcov
592
593linux-pkgs-opt:
594  extends:
595    - .stage-3
596    - .linux_test
597  tags:
598    - name:compute004
599  variables:
600    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
601    TEST_ARCH: arch-ci-linux-pkgs-opt
602
603linux-pkgs-valgrind:
604  extends:
605    - .stage-3
606    - .linux_test
607  tags:
608    - mcs-nfs,server
609  variables:
610    TEST_ARCH: arch-ci-linux-pkgs-valgrind
611    TIMEOUT: 7200
612
613linux-xsdk-dbg:
614  extends:
615    - .stage-3
616    - .linux_test
617  tags:
618    - mcs-nfs
619  variables:
620    TEST_ARCH: arch-ci-linux-xsdk-dbg
621
622linux-pardiso:
623  extends:
624    - .stage-3
625    - .linux_test
626  tags:
627    - mcs-nfs
628  variables:
629    TEST_ARCH: arch-ci-linux-pardiso
630
631linux-nagfor:
632  extends:
633    - .stage-3
634    - .linux_test
635  tags:
636    - mcs-nfs
637  variables:
638    TEST_ARCH: arch-ci-linux-nagfor
639
640#
641# The following tests are experimental; more tests by users at other sites may be added below this.  Experimental test
642# that fail produce a warning, but do not block execution of a pipeline.
643#
644
645.test-experimental:
646  extends: .test
647  allow_failure: true
648
649