xref: /petsc/.gitlab-ci.yml (revision b1fbbf018d08a64bddf9bff87ef00f415e1bb3be)
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
267mswin-uni:
268  extends:
269    - .stage-2
270    - .mswin_test
271  tags:
272    - name:ps5
273  variables:
274    TEST_ARCH: arch-ci-mswin-uni
275
276#
277# The following tests run as part of stage-3.
278#
279
280mswin-intel-cxx-cmplx:
281  extends:
282    - .stage-3
283    - .mswin_test
284  tags:
285    - name:ps5
286  variables:
287    TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx
288
289mswin-intel:
290  extends:
291    - .stage-3
292    - .mswin_test
293  tags:
294    - name:ps5
295  variables:
296    TEST_ARCH: arch-ci-mswin-intel
297
298arch-ci-mswin-opt-impi:
299  extends:
300    - .stage-3
301    - .mswin_test
302  tags:
303    - name:ps4
304  variables:
305    TEST_ARCH: arch-ci-mswin-opt-impi
306  allow_failure: true
307
308
309opensolaris-cmplx-pkgs-dbg:
310  extends:
311    - .stage-3
312    - .opensolaris_test
313  tags:
314    - name:n-gage
315  variables:
316    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
317
318opensolaris-pkgs-opt:
319  extends:
320    - .stage-3
321    - .opensolaris_test
322  tags:
323    - name:n-gage
324  variables:
325    TEST_ARCH: arch-ci-opensolaris-pkgs-opt
326
327freebsd-pkgs-opt:
328  extends:
329    - .stage-3
330    - .freebsd_test
331  tags:
332    - os:fbsd
333  variables:
334    TEST_ARCH: arch-ci-freebsd-pkgs-opt
335
336freebsd-cxx-cmplx-pkgs-dbg:
337  extends:
338    - .stage-3
339    - .freebsd_test
340  tags:
341    - os:fbsd
342  variables:
343    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg
344
345freebsd-cxx-pkgs-opt:
346  extends:
347    - .stage-3
348    - .freebsd_test
349  tags:
350    - os:fbsd
351  variables:
352    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
353    TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt
354
355osx-cxx-cmplx-pkgs-dbg:
356  extends:
357    - .stage-3
358    - .osx_test
359  tags:
360    - os:osx
361  variables:
362    TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg
363
364osx-dbg:
365  extends:
366    - .stage-3
367    - .osx_test
368  tags:
369    - os:osx
370  variables:
371    TEST_ARCH: arch-ci-osx-dbg
372
373osx-xsdk-opt:
374  extends:
375    - .stage-3
376    - .osx_test
377  tags:
378    - os:osx
379  variables:
380    TEST_ARCH: arch-ci-osx-xsdk-opt
381
382linux-cmplx-gcov:
383  extends:
384    - .stage-3
385    - .linux_test
386  tags:
387    - mcs-nfs
388  variables:
389    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -vecscatter_mpi1 false -options_left false
390    TEST_ARCH: arch-ci-linux-cmplx-gcov
391
392linux-cmplx-single:
393  extends:
394    - .stage-3
395    - .linux_test
396  tags:
397    - name:si
398  variables:
399    TEST_ARCH: arch-ci-linux-cmplx-single
400
401linux-without-fc:
402  extends:
403    - .stage-3
404    - .linux_test
405  tags:
406    - name:si
407  variables:
408    TEST_ARCH: arch-ci-linux-without-fc
409
410linux-clang-avx:
411  extends:
412    - .stage-3
413    - .linux_test
414  tags:
415    - name:isdp001
416  variables:
417    TEST_ARCH: arch-ci-linux-clang-avx
418
419linux-gcc-cxx-avx2:
420  extends:
421    - .stage-3
422    - .linux_test
423  tags:
424    - name:isdp001
425  variables:
426    TEST_ARCH: arch-ci-linux-gcc-cxx-avx2
427
428linux-knl:
429  extends:
430    - .stage-3
431    - .linux_test
432  tags:
433    - name:isdp001
434  variables:
435    TEST_ARCH: arch-ci-linux-knl
436
437linux-c-exodus-dbg:
438  extends:
439    - .stage-3
440    - .linux_test
441  tags:
442    - name:frog
443  variables:
444    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
445    TEST_ARCH: arch-ci-linux-c-exodus-dbg
446
447linux-cuda-single:
448  extends:
449    - .stage-3
450    - .linux_test
451  tags:
452    - name:frog
453  variables:
454    OPENBLAS_NUM_THREADS: 1
455    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
456    TEST_ARCH: arch-ci-linux-cuda-single
457
458linux-viennacl:
459  extends:
460    - .stage-3
461    - .linux_test
462  tags:
463    - name:frog
464  variables:
465    TEST_ARCH: arch-ci-linux-viennacl
466
467linux-opt-misc:
468  extends:
469    - .stage-3
470    - .linux_test
471  tags:
472    - mcs-nfs,name:cg
473  variables:
474    OPENBLAS_NUM_THREADS: 1
475    TEST_ARCH: arch-ci-linux-opt-misc
476
477linux-pkgs-cxx-mlib:
478  extends:
479    - .stage-3
480    - .linux_test
481  tags:
482    - name:pj02
483  variables:
484    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
485    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
486
487linux-cxx-cmplx-pkgs-64idx:
488  extends:
489    - .stage-3
490    - .linux_test
491  tags:
492    - name:pj01
493  variables:
494    TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx
495
496linux-pkgs-dbg-ftn-interfaces:
497  extends:
498    - .stage-3
499    - .linux_test
500  tags:
501    - name:pj02
502  variables:
503    TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces
504
505linux-analyzer:
506  extends:
507    - .stage-3
508    - .linux_test
509  tags:
510    - mcs-nfs
511  variables:
512    TEST_ARCH: arch-ci-linux-analyzer
513
514linux-gcc-ifc-cmplx:
515  extends:
516    - .stage-3
517    - .linux_test
518  tags:
519    - mcs-nfs
520  variables:
521    TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx
522
523linux-gcov:
524  extends:
525    - .stage-3
526    - .linux_test
527  tags:
528    - mcs-nfs
529  variables:
530    TEST_ARCH: arch-ci-linux-gcov
531
532linux-IPL64:
533  extends:
534    - .stage-3
535    - .linux_test
536  tags:
537    - mcs-nfs,name:cg
538  variables:
539    OPENBLAS_NUM_THREADS: 1
540    TEST_ARCH: arch-ci-linux-IPL64
541
542linux-matlab-ilp64-gcov:
543  extends:
544    - .stage-3
545    - .linux_test
546  tags:
547    - mcs-nfs
548  variables:
549    TEST_ARCH: arch-ci-linux-matlab-ilp64-gcov
550
551linux-opt-cxx-quad:
552  extends:
553    - .stage-3
554    - .linux_test
555  tags:
556    - mcs-nfs
557  variables:
558    TEST_ARCH: arch-ci-linux-opt-cxx-quad
559
560linux-pgi:
561  extends:
562    - .stage-3
563    - .linux_test
564  tags:
565    - mcs-nfs,name:petsc
566  variables:
567    TEST_ARCH: arch-ci-linux-pgi
568
569linux-pkgs-64idx:
570  extends:
571    - .stage-3
572    - .linux_test
573  tags:
574    - mcs-nfs
575  variables:
576    TEST_ARCH: arch-ci-linux-pkgs-64idx
577
578linux-pkgs-gcov:
579  extends:
580    - .stage-3
581    - .linux_test
582  tags:
583    - mcs-nfs
584  variables:
585    TEST_ARCH: arch-ci-linux-pkgs-gcov
586
587linux-pkgs-opt:
588  extends:
589    - .stage-3
590    - .linux_test
591  tags:
592    - mcs-nfs
593  variables:
594    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
595    TEST_ARCH: arch-ci-linux-pkgs-opt
596
597linux-pkgs-valgrind:
598  extends:
599    - .stage-3
600    - .linux_test
601  tags:
602    - mcs-nfs,server
603  variables:
604    TEST_ARCH: arch-ci-linux-pkgs-valgrind
605    TIMEOUT: 7200
606
607linux-xsdk-dbg:
608  extends:
609    - .stage-3
610    - .linux_test
611  tags:
612    - mcs-nfs
613  variables:
614    TEST_ARCH: arch-ci-linux-xsdk-dbg
615
616linux-pardiso:
617  extends:
618    - .stage-3
619    - .linux_test
620  tags:
621    - mcs-nfs
622  variables:
623    TEST_ARCH: arch-ci-linux-pardiso
624
625#
626# The following tests are experimental; more tests by users at other sites may be added below this.  Experimental test
627# that fail produce a warning, but do not block execution of a pipeline.
628#
629
630.test-experimental:
631  extends: .test
632  allow_failure: true
633
634