xref: /petsc/.gitlab-ci.yml (revision ea9ab0ba14f0f84fd0a7ccfccacd9cd4a091fe5b)
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  script:
55    - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS}
56    - make CFLAGS=-Werror
57    - make allgtests-tap search="${TEST_SEARCH}" TIMEOUT=${TIMEOUT}
58  after_script:
59    - CCACHE_DIR=$(pwd)/.ccache ccache --show-stats
60  artifacts:
61    reports:
62      junit: arch-*/tests/testresults.xml
63  cache:
64    paths:
65      - .ccache/
66    key: "${CI_JOB_NAME}"
67
68#
69# The following tests run on the cloud as part of stage-1.
70#
71
72mpich-cxx-py3:
73  extends: .stage-1
74  variables:
75    PYTHON: python3
76    CONFIG_OPTS: --with-mpi-dir=/usr/local --with-clanguage=cxx --with-fc=0
77    TEST_SEARCH: snes_tutorials-ex48%
78
79uni-complex-float-int64:
80  extends: .stage-1
81  variables:
82    PYTHON: python3
83    CONFIG_OPTS: <
84      --with-mpi=0
85      --with-scalar-type=complex --with-precision=single --with-64-bit-indices
86    TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_%
87
88c89-mlib-static-py2:
89  extends: .stage-1
90  image: jedbrown/mpich-ccache:python2
91  variables:
92    PYTHON: python2
93    CONFIG_OPTS: <
94      --with-mpi-dir=/usr/local
95      --with-single-library=0 --with-shared-libraries=0 'CFLAGS=-std=c89 -pedantic -Wno-long-long -Wno-overlength-strings'
96    TEST_SEARCH: snes_tutorials-ex48%
97
98checksource:
99  extends: .test
100  image: jedbrown/mpich-ccache
101  stage: stage-1
102  script:
103    - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0
104    - make checkbadSource SHELL=bash
105
106#
107# This provides the basic order of operations and options template for stage-2,3 tests.
108# Not all stage-2,3 need to follow this template, but most will.
109#
110.stage-23:
111  extends: .test
112  script:
113    - printf "PATH:$PATH\n"
114    - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
115    - printf "./config/examples/${TEST_ARCH}.py\n"
116    - cat ./config/examples/${TEST_ARCH}.py
117    - ./config/examples/${TEST_ARCH}.py
118    - make
119    - make check
120    - make cleantest allgtests-tap TIMEOUT=${TIMEOUT}
121  artifacts:
122    reports:
123      junit: ${TEST_ARCH}/tests/testresults.xml
124
125.stage-2:
126  extends: .stage-23
127  stage: stage-2
128  only:
129    variables:
130      - $STAGE != "1"
131      - $STAGE != "3"
132
133.stage-3:
134  extends: .stage-23
135  stage: stage-3
136  only:
137    variables:
138      - $STAGE != "1"
139      - $STAGE != "2"
140
141#
142# The following provide templates for various OSes for pre/post info
143#
144
145.linux_test:
146  before_script:
147    - hostname
148    - grep PRETTY_NAME /etc/os-release
149    - echo $(nproc)
150    - ccache --zero-stats
151  after_script:
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    - ccache --show-stats
162
163.osx_test:
164  before_script:
165    - hostname
166    - sw_vers -productVersion
167    - echo $(sysctl -n hw.ncpu)
168    - ccache --zero-stats
169  after_script:
170    - ccache --show-stats
171
172.opensolaris_test:
173  before_script:
174    - hostname
175    - uname -a
176    - echo $(nproc)
177
178.mswin_test:
179  before_script:
180    - hostname
181    - uname -a
182    - echo $(nproc)
183
184#
185# The following tests run as part of stage-2.
186#
187# The tags variable used in the tests below connects the particular test with the runners
188# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd.
189# For example the test linux-gcc-complex-opt  any runner that has the tag 'name:pj02'
190# (in a blue box beneath it)
191#
192
193linux-gcc-complex-opt:
194  extends:
195    - .stage-2
196    - .linux_test
197  tags:
198    - linux-dell
199  variables:
200    TEST_ARCH: arch-ci-linux-gcc-complex-opt
201
202linux-gcc-pkgs-opt:
203  extends:
204    - .stage-2
205    - .linux_test
206  tags:
207    - linux-dell
208  variables:
209    TEST_ARCH: arch-ci-linux-gcc-pkgs-opt
210
211linux-gcc-quad-64idx-dbg:
212  extends:
213    - .stage-2
214    - .linux_test
215  tags:
216    - linux-dell
217  variables:
218    TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg
219
220linux-cuda-double:
221  extends:
222    - .stage-2
223    - .linux_test
224  tags:
225    - name:frog
226  variables:
227    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
228    TEST_ARCH: arch-ci-linux-cuda-double
229
230freebsd-c-single-opt:
231  extends:
232    - .stage-2
233    - .freebsd_test
234  tags:
235    - os:fbsd
236  variables:
237    TEST_ARCH: arch-ci-freebsd-c-single-opt
238
239freebsd-cxx-cmplx-64idx-dbg:
240  extends:
241    - .stage-2
242    - .freebsd_test
243  tags:
244    - name:petsc-fbsd
245  variables:
246    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg
247
248opensolaris-misc:
249  extends:
250    - .stage-2
251    - .opensolaris_test
252  tags:
253    - name:n-gage
254  variables:
255    TEST_ARCH: arch-ci-opensolaris-misc
256
257osx-cxx-pkgs-opt:
258  extends:
259    - .stage-2
260    - .osx_test
261  tags:
262    - os:osx
263  variables:
264    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
265    TEST_ARCH: arch-ci-osx-cxx-pkgs-opt
266
267osx-barry:
268  extends:
269    - .stage-2
270    - .osx_test
271  tags:
272    - os:osx
273  variables:
274    TEST_ARCH: arch-ci-osx-prefix
275
276mswin-uni:
277  extends:
278    - .stage-2
279    - .mswin_test
280  tags:
281    - name:ps5
282  variables:
283    TEST_ARCH: arch-ci-mswin-uni
284
285#
286# The following tests run as part of stage-3.
287#
288
289mswin-intel-cxx-cmplx:
290  extends:
291    - .stage-3
292    - .mswin_test
293  tags:
294    - name:ps5
295  variables:
296    TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx
297
298mswin-intel:
299  extends:
300    - .stage-3
301    - .mswin_test
302  tags:
303    - name:ps5
304  variables:
305    TEST_ARCH: arch-ci-mswin-intel
306
307arch-ci-mswin-opt-impi:
308  extends:
309    - .stage-3
310    - .mswin_test
311  tags:
312    - name:ps4
313  variables:
314    TEST_ARCH: arch-ci-mswin-opt-impi
315  allow_failure: true
316
317
318opensolaris-cmplx-pkgs-dbg:
319  extends:
320    - .stage-3
321    - .opensolaris_test
322  tags:
323    - name:n-gage
324  variables:
325    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
326
327opensolaris-pkgs-opt:
328  extends:
329    - .stage-3
330    - .opensolaris_test
331  tags:
332    - name:n-gage
333  variables:
334    TEST_ARCH: arch-ci-opensolaris-pkgs-opt
335
336freebsd-pkgs-opt:
337  extends:
338    - .stage-3
339    - .freebsd_test
340  tags:
341    - os:fbsd
342  variables:
343    TEST_ARCH: arch-ci-freebsd-pkgs-opt
344
345freebsd-cxx-cmplx-pkgs-dbg:
346  extends:
347    - .stage-3
348    - .freebsd_test
349  tags:
350    - os:fbsd
351  variables:
352    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg
353
354freebsd-cxx-pkgs-opt:
355  extends:
356    - .stage-3
357    - .freebsd_test
358  tags:
359    - os:fbsd
360  variables:
361    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
362    TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt
363
364osx-cxx-cmplx-pkgs-dbg:
365  extends:
366    - .stage-3
367    - .osx_test
368  tags:
369    - os:osx
370  variables:
371    TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg
372
373osx-dbg:
374  extends:
375    - .stage-3
376    - .osx_test
377  tags:
378    - os:osx
379  variables:
380    TEST_ARCH: arch-ci-osx-dbg
381
382osx-xsdk-opt:
383  extends:
384    - .stage-3
385    - .osx_test
386  tags:
387    - os:osx
388  variables:
389    TEST_ARCH: arch-ci-osx-xsdk-opt
390
391linux-cmplx-gcov:
392  extends:
393    - .stage-3
394    - .linux_test
395  tags:
396    - mcs-nfs
397  variables:
398    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -vecscatter_mpi1 false -options_left false
399    TEST_ARCH: arch-ci-linux-cmplx-gcov
400
401linux-cmplx-single:
402  extends:
403    - .stage-3
404    - .linux_test
405  tags:
406    - name:si
407  variables:
408    TEST_ARCH: arch-ci-linux-cmplx-single
409
410linux-without-fc:
411  extends:
412    - .stage-3
413    - .linux_test
414  tags:
415    - name:si
416  variables:
417    TEST_ARCH: arch-ci-linux-without-fc
418
419linux-clang-avx:
420  extends:
421    - .stage-3
422    - .linux_test
423  tags:
424    - name:isdp001
425  variables:
426    TEST_ARCH: arch-ci-linux-clang-avx
427
428linux-gcc-cxx-avx2:
429  extends:
430    - .stage-3
431    - .linux_test
432  tags:
433    - name:isdp001
434  variables:
435    TEST_ARCH: arch-ci-linux-gcc-cxx-avx2
436
437linux-knl:
438  extends:
439    - .stage-3
440    - .linux_test
441  tags:
442    - name:isdp001
443  variables:
444    TEST_ARCH: arch-ci-linux-knl
445
446linux-c-exodus-dbg:
447  extends:
448    - .stage-3
449    - .linux_test
450  tags:
451    - name:frog
452  variables:
453    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
454    TEST_ARCH: arch-ci-linux-c-exodus-dbg
455
456linux-cuda-single:
457  extends:
458    - .stage-3
459    - .linux_test
460  tags:
461    - name:frog
462  variables:
463    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
464    TEST_ARCH: arch-ci-linux-cuda-single
465
466linux-viennacl:
467  extends:
468    - .stage-3
469    - .linux_test
470  tags:
471    - name:frog
472  variables:
473    TEST_ARCH: arch-ci-linux-viennacl
474
475linux-opt-misc:
476  extends:
477    - .stage-3
478    - .linux_test
479  tags:
480    - mcs-nfs,name:cg
481  variables:
482    TEST_ARCH: arch-ci-linux-opt-misc
483
484linux-pkgs-cxx-mlib:
485  extends:
486    - .stage-3
487    - .linux_test
488  tags:
489    - name:pj02
490  variables:
491    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
492    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
493
494linux-cxx-cmplx-pkgs-64idx:
495  extends:
496    - .stage-3
497    - .linux_test
498  tags:
499    - name:pj01
500  variables:
501    TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx
502
503linux-pkgs-dbg-ftn-interfaces:
504  extends:
505    - .stage-3
506    - .linux_test
507  tags:
508    - name:pj02
509  variables:
510    TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces
511
512linux-analyzer:
513  extends:
514    - .stage-3
515    - .linux_test
516  tags:
517    - mcs-nfs
518  variables:
519    TEST_ARCH: arch-ci-linux-analyzer
520
521linux-gcc-ifc-cmplx:
522  extends:
523    - .stage-3
524    - .linux_test
525  tags:
526    - mcs-nfs
527  variables:
528    TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx
529
530linux-gcov:
531  extends:
532    - .stage-3
533    - .linux_test
534  tags:
535    - mcs-nfs
536  variables:
537    TEST_ARCH: arch-ci-linux-gcov
538
539linux-IPL64:
540  extends:
541    - .stage-3
542    - .linux_test
543  tags:
544    - mcs-nfs,name:cg
545  variables:
546    TEST_ARCH: arch-ci-linux-IPL64
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    - mcs-nfs
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
631#
632# The following tests are experimental; more tests by users at other sites may be added below this.  Experimental test
633# that fail produce a warning, but do not block execution of a pipeline.
634#
635
636.test-experimental:
637  extends: .test
638  allow_failure: true
639
640