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