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