xref: /petsc/.gitlab-ci.yml (revision 4e4bbfaa3814cc83b5851d85be69070845f5653e)
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 CXXFLAGS=-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 CFLAGS=${MAKE_CFLAGS} CXXFLAGS=${MAKE_CXXFLAGS}
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  variables:
124    OPENBLAS_NUM_THREADS: 1
125
126.stage-2:
127  extends: .stage-23
128  stage: stage-2
129  only:
130    variables:
131      - $STAGE != "1"
132      - $STAGE != "3"
133
134.stage-3:
135  extends: .stage-23
136  stage: stage-3
137  only:
138    variables:
139      - $STAGE != "1"
140      - $STAGE != "2"
141
142#
143# The following provide templates for various OSes for pre/post info
144#
145
146.linux_test_noflags:
147  before_script:
148    - hostname
149    - grep PRETTY_NAME /etc/os-release
150    - echo $(nproc)
151    - ccache --zero-stats
152  after_script:
153    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
154    - ccache --show-stats
155
156.linux_test:
157  extends: .linux_test_noflags
158  variables:
159    MAKE_CFLAGS: -Werror
160    MAKE_CXXFLAGS: -Werror
161
162.freebsd_test:
163  variables:
164    MAKE_CFLAGS: -Werror
165    MAKE_CXXFLAGS: -Werror
166  before_script:
167    - hostname
168    - freebsd-version
169    - echo $(sysctl -n hw.ncpu)
170    - ccache --zero-stats
171  after_script:
172    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
173    - ccache --show-stats
174
175.osx_test:
176  variables:
177    MAKE_CFLAGS: -Werror
178    MAKE_CXXFLAGS: -Werror
179  before_script:
180    - hostname
181    - sw_vers -productVersion
182    - echo $(sysctl -n hw.ncpu)
183    - ccache --zero-stats
184  after_script:
185    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
186    - ccache --show-stats
187
188.opensolaris_test:
189  before_script:
190    - hostname
191    - uname -a
192    - echo $(nproc)
193  after_script:
194    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
195
196.mswin_test:
197  before_script:
198    - hostname
199    - uname -a
200    - echo $(nproc)
201  after_script:
202    - cp configure.log ../configure.log-${CI_JOB_NAME}-${CI_PIPELINE_ID}-${CI_JOB_ID}
203
204#
205# The following tests run as part of stage-2.
206#
207# The tags variable used in the tests below connects the particular test with the runners
208# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd.
209# For example the test linux-gcc-complex-opt  any runner that has the tag 'name:pj02'
210# (in a blue box beneath it)
211#
212
213linux-gcc-complex-opt:
214  extends:
215    - .stage-2
216    - .linux_test
217  tags:
218    - linux-dell
219  variables:
220    TEST_ARCH: arch-ci-linux-gcc-complex-opt
221
222linux-gcc-pkgs-opt:
223  extends:
224    - .stage-2
225    - .linux_test
226  tags:
227    - linux-dell
228  variables:
229    TEST_ARCH: arch-ci-linux-gcc-pkgs-opt
230
231linux-gcc-quad-64idx-dbg:
232  extends:
233    - .stage-2
234    - .linux_test
235  tags:
236    - linux-dell
237  variables:
238    TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg
239
240linux-cuda-double:
241  extends:
242    - .stage-2
243    - .linux_test
244  tags:
245    - name:frog
246  variables:
247    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
248    TEST_ARCH: arch-ci-linux-cuda-double
249
250freebsd-c-single-opt:
251  extends:
252    - .stage-2
253    - .freebsd_test
254  tags:
255    - os:fbsd
256  variables:
257    TEST_ARCH: arch-ci-freebsd-c-single-opt
258
259freebsd-cxx-cmplx-64idx-dbg:
260  extends:
261    - .stage-2
262    - .freebsd_test
263  tags:
264    - name:petsc-fbsd
265  variables:
266    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg
267
268opensolaris-misc:
269  extends:
270    - .stage-3
271    - .opensolaris_test
272  tags:
273    - name:n-gage
274  variables:
275    TEST_ARCH: arch-ci-opensolaris-misc
276
277osx-cxx-pkgs-opt:
278  extends:
279    - .stage-2
280    - .osx_test
281  tags:
282    - os:osx
283  variables:
284    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
285    TEST_ARCH: arch-ci-osx-cxx-pkgs-opt
286
287mswin-uni:
288  extends:
289    - .stage-2
290    - .mswin_test
291  tags:
292    - name:ps5-2
293  variables:
294    TEST_ARCH: arch-ci-mswin-uni
295
296#
297# The following tests run as part of stage-3.
298#
299
300mswin-intel-cxx-cmplx:
301  extends:
302    - .stage-3
303    - .mswin_test
304  tags:
305    - name:ps5
306  variables:
307    TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx
308
309mswin-intel:
310  extends:
311    - .stage-3
312    - .mswin_test
313  tags:
314    - name:ps5
315  variables:
316    TEST_ARCH: arch-ci-mswin-intel
317
318arch-ci-mswin-opt-impi:
319  extends:
320    - .stage-3
321    - .mswin_test
322  tags:
323    - name:ps4
324  variables:
325    TEST_ARCH: arch-ci-mswin-opt-impi
326  allow_failure: true
327
328
329opensolaris-cmplx-pkgs-dbg:
330  extends:
331    - .stage-3
332    - .opensolaris_test
333  tags:
334    - name:n-gage
335  variables:
336    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
337
338opensolaris-pkgs-opt:
339  extends:
340    - .stage-3
341    - .opensolaris_test
342  tags:
343    - name:n-gage
344  variables:
345    TEST_ARCH: arch-ci-opensolaris-pkgs-opt
346
347freebsd-pkgs-opt:
348  extends:
349    - .stage-3
350    - .freebsd_test
351  tags:
352    - os:fbsd
353  variables:
354    TEST_ARCH: arch-ci-freebsd-pkgs-opt
355
356freebsd-cxx-cmplx-pkgs-dbg:
357  extends:
358    - .stage-3
359    - .freebsd_test
360  tags:
361    - os:fbsd
362  variables:
363    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg
364
365freebsd-cxx-pkgs-opt:
366  extends:
367    - .stage-3
368    - .freebsd_test
369  tags:
370    - os:fbsd
371  variables:
372    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
373    TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt
374
375osx-cxx-cmplx-pkgs-dbg:
376  extends:
377    - .stage-3
378    - .osx_test
379  tags:
380    - os:osx
381  variables:
382    TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg
383
384osx-dbg:
385  extends:
386    - .stage-3
387    - .osx_test
388  tags:
389    - os:osx
390  variables:
391    TEST_ARCH: arch-ci-osx-dbg
392
393osx-xsdk-opt:
394  extends:
395    - .stage-3
396    - .osx_test
397  tags:
398    - os:osx
399  variables:
400    TEST_ARCH: arch-ci-osx-xsdk-opt
401
402linux-cmplx-gcov:
403  extends:
404    - .stage-3
405    - .linux_test
406  tags:
407    - mcs-nfs
408  variables:
409    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -vecscatter_mpi1 false -options_left false
410    TEST_ARCH: arch-ci-linux-cmplx-gcov
411
412linux-cmplx-single:
413  extends:
414    - .stage-3
415    - .linux_test
416  tags:
417    - name:si
418  variables:
419    TEST_ARCH: arch-ci-linux-cmplx-single
420
421linux-without-fc:
422  extends:
423    - .stage-3
424    - .linux_test
425  tags:
426    - name:si
427  variables:
428    TEST_ARCH: arch-ci-linux-without-fc
429
430linux-clang-avx:
431  extends:
432    - .stage-3
433    - .linux_test
434  tags:
435    - name:isdp001
436  variables:
437    TEST_ARCH: arch-ci-linux-clang-avx
438
439linux-gcc-cxx-avx2:
440  extends:
441    - .stage-3
442    - .linux_test
443  tags:
444    - name:isdp001
445  variables:
446    TEST_ARCH: arch-ci-linux-gcc-cxx-avx2
447
448linux-knl:
449  extends:
450    - .stage-3
451    - .linux_test
452  tags:
453    - name:isdp001
454  variables:
455    TEST_ARCH: arch-ci-linux-knl
456
457linux-c-exodus-dbg:
458  extends:
459    - .stage-3
460    - .linux_test
461  tags:
462    - name:frog
463  variables:
464    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
465    TEST_ARCH: arch-ci-linux-c-exodus-dbg
466
467linux-cuda-single:
468  extends:
469    - .stage-3
470    - .linux_test
471  tags:
472    - name:frog
473  variables:
474    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
475    TEST_ARCH: arch-ci-linux-cuda-single
476
477linux-viennacl:
478  extends:
479    - .stage-3
480    - .linux_test
481  tags:
482    - name:frog
483  variables:
484    TEST_ARCH: arch-ci-linux-viennacl
485
486linux-opt-misc:
487  extends:
488    - .stage-3
489    - .linux_test
490  tags:
491    - name:compute004
492  variables:
493    TEST_ARCH: arch-ci-linux-opt-misc
494
495linux-pkgs-cxx-mlib:
496  extends:
497    - .stage-3
498    - .linux_test
499  tags:
500    - name:pj02
501  variables:
502    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
503    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
504
505linux-cxx-cmplx-pkgs-64idx:
506  extends:
507    - .stage-3
508    - .linux_test
509  tags:
510    - name:pj01
511  variables:
512    TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx
513
514linux-pkgs-dbg-ftn-interfaces:
515  extends:
516    - .stage-3
517    - .linux_test
518  tags:
519    - name:pj02
520  variables:
521    TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces
522
523linux-analyzer:
524  extends:
525    - .stage-3
526    - .linux_test
527  tags:
528    - mcs-nfs
529  variables:
530    TEST_ARCH: arch-ci-linux-analyzer
531
532linux-gcc-ifc-cmplx:
533  extends:
534    - .stage-3
535    - .linux_test
536  tags:
537    - mcs-nfs
538  variables:
539    TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx
540
541linux-gcov:
542  extends:
543    - .stage-3
544    - .linux_test
545  tags:
546    - mcs-nfs
547  variables:
548    TEST_ARCH: arch-ci-linux-gcov
549
550linux-ILP64:
551  extends:
552    - .stage-3
553    - .linux_test
554  tags:
555    - name:compute004
556  variables:
557    TEST_ARCH: arch-ci-linux-ILP64
558
559linux-matlab-ilp64-gcov:
560  extends:
561    - .stage-3
562    - .linux_test
563  tags:
564    - mcs-nfs
565  variables:
566    TEST_ARCH: arch-ci-linux-matlab-ilp64-gcov
567
568linux-opt-cxx-quad:
569  extends:
570    - .stage-3
571    - .linux_test
572  tags:
573    - mcs-nfs
574  variables:
575    TEST_ARCH: arch-ci-linux-opt-cxx-quad
576
577linux-pgi:
578  extends:
579    - .stage-3
580    - .linux_test_noflags
581  tags:
582    - mcs-nfs,name:petsc
583  variables:
584    TEST_ARCH: arch-ci-linux-pgi
585
586linux-pkgs-64idx:
587  extends:
588    - .stage-3
589    - .linux_test
590  tags:
591    - mcs-nfs
592  variables:
593    TEST_ARCH: arch-ci-linux-pkgs-64idx
594
595linux-pkgs-gcov:
596  extends:
597    - .stage-3
598    - .linux_test
599  tags:
600    - mcs-nfs
601  variables:
602    TEST_ARCH: arch-ci-linux-pkgs-gcov
603
604linux-pkgs-opt:
605  extends:
606    - .stage-3
607    - .linux_test
608  tags:
609    - name:compute004
610  variables:
611    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
612    TEST_ARCH: arch-ci-linux-pkgs-opt
613
614linux-pkgs-valgrind:
615  extends:
616    - .stage-3
617    - .linux_test
618  tags:
619    - mcs-nfs,server
620  variables:
621    TEST_ARCH: arch-ci-linux-pkgs-valgrind
622    TIMEOUT: 7200
623
624linux-xsdk-dbg:
625  extends:
626    - .stage-3
627    - .linux_test
628  tags:
629    - mcs-nfs
630  variables:
631    TEST_ARCH: arch-ci-linux-xsdk-dbg
632
633linux-pardiso:
634  extends:
635    - .stage-3
636    - .linux_test
637  tags:
638    - mcs-nfs
639  variables:
640    TEST_ARCH: arch-ci-linux-pardiso
641
642linux-nagfor:
643  extends:
644    - .stage-3
645    - .linux_test
646  tags:
647    - mcs-nfs
648  variables:
649    TEST_ARCH: arch-ci-linux-nagfor
650
651#
652# The following tests are experimental; more tests by users at other sites may be added below this.  Experimental test
653# that fail produce a warning, but do not block execution of a pipeline.
654#
655
656.test-experimental:
657  extends: .test
658  allow_failure: true
659
660