xref: /petsc/.gitlab-ci.yml (revision bf2f0e955ae359bacd98a58ebc95d508ec2d9ed1)
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  dependencies: []
38
39#
40#  This provides the basic order of operations and options template for cloud based stage 1 tests.
41#  Not all test-short need to follow this template but most will.
42#
43
44.stage-1:
45  extends: .test
46  stage: stage-1
47  image: jedbrown/mpich-ccache
48  tags:
49    - docker
50  before_script:
51    - date
52    - echo nproc=$(nproc)
53    - cat /proc/cpuinfo
54    - export CCACHE_COMPILERCHECK=content
55    - export CCACHE_DIR=$(pwd)/.ccache
56    - ccache --show-stats
57    - ccache --zero-stats
58    - echo CONFIG_OPTS=$(CONFIG_OPTS)
59  script:
60    - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS}
61    - make CFLAGS=-Werror CXXFLAGS=-Werror
62    - make CFLAGS=-Werror CXXFLAGS=-Werror allgtests-tap search="${TEST_SEARCH}" TIMEOUT=${TIMEOUT}
63  after_script:
64    - date
65    - CCACHE_DIR=$(pwd)/.ccache ccache --show-stats
66  artifacts:
67    reports:
68      junit: arch-*/tests/testresults.xml
69    name: "$CI_JOB_NAME"
70    when: always
71    paths:
72    - arch-*/lib/petsc/conf/configure.log
73    - arch-*/lib/petsc/conf/make.log
74    - arch-*/tests/testresults.xml
75    - arch-*/tests/test_*_tap.log
76    - arch-*/tests/test_*_err.log
77    expire_in: 4 days
78  cache:
79    paths:
80      - .ccache/
81    key: "${CI_JOB_NAME}"
82
83#
84# The following tests run on the cloud as part of stage-1.
85#
86
87mpich-cxx-py3:
88  extends: .stage-1
89  variables:
90    PYTHON: python3
91    CONFIG_OPTS: --with-mpi-dir=/usr/local --with-clanguage=cxx --with-fc=0
92    TEST_SEARCH: snes_tutorials-ex48%
93
94uni-complex-float-int64:
95  extends: .stage-1
96  variables:
97    PYTHON: python3
98    CONFIG_OPTS: --with-mpi=0 --with-scalar-type=complex --with-precision=single --with-64-bit-indices
99    TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_%
100
101c89-mlib-static-py2:
102  extends: .stage-1
103  image: jedbrown/mpich-ccache:python2
104  variables:
105    PYTHON: python2
106    CONFIG_OPTS: --with-mpi-dir=/usr/local --with-single-library=0 --with-shared-libraries=0 CFLAGS=-std=c89
107    TEST_SEARCH: snes_tutorials-ex19%
108
109checksource:
110  extends: .test
111  image: jedbrown/mpich-ccache
112  stage: stage-1
113  script:
114    - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0
115    - make checkbadSource SHELL=bash
116    - make check_output SHELL=bash
117
118#
119# This provides the basic order of operations and options template for stage-2,3 tests.
120# Not all stage-2,3 need to follow this template, but most will.
121#
122.stage-23:
123  extends: .test
124  script:
125    - printf "PATH:$PATH\n"
126    - printf "PETSC_OPTIONS:$PETSC_OPTIONS\n"
127    - printf "./config/examples/${TEST_ARCH}.py\n"
128    - cat ./config/examples/${TEST_ARCH}.py
129    - ./config/examples/${TEST_ARCH}.py
130    - make CFLAGS=${MAKE_CFLAGS} CXXFLAGS=${MAKE_CXXFLAGS}
131    - make CFLAGS=${MAKE_CFLAGS} CXXFLAGS=${MAKE_CXXFLAGS} check
132    - make updatedatafiles
133    - make CFLAGS=${MAKE_CFLAGS} CXXFLAGS=${MAKE_CXXFLAGS} cleantest allgtests-tap TIMEOUT=${TIMEOUT}
134  artifacts:
135    reports:
136      junit: ${TEST_ARCH}/tests/testresults.xml
137    name: "$CI_JOB_NAME"
138    when: always
139    paths:
140    - ${TEST_ARCH}/lib/petsc/conf/configure.log
141    - ${TEST_ARCH}/lib/petsc/conf/make.log
142    - ${TEST_ARCH}/tests/testresults.xml
143    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log
144    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log
145    expire_in: 4 days
146  variables:
147    OPENBLAS_NUM_THREADS: 1
148
149.stage-2:
150  extends: .stage-23
151  stage: stage-2
152  only:
153    variables:
154      - $STAGE != "1"
155      - $STAGE != "3"
156
157.stage-3:
158  extends: .stage-23
159  stage: stage-3
160  only:
161    variables:
162      - $STAGE != "1"
163      - $STAGE != "2"
164
165#
166# The following provide templates for various OSes for pre/post info
167#
168
169.linux_test_noflags:
170  before_script:
171    - date
172    - hostname
173    - grep PRETTY_NAME /etc/os-release
174    - echo $(nproc)
175    - ccache --zero-stats
176  after_script:
177    - date
178    - ccache --show-stats
179
180.linux_test:
181  extends: .linux_test_noflags
182  variables:
183    MAKE_CFLAGS: -Werror
184    MAKE_CXXFLAGS: -Werror
185
186.freebsd_test:
187  variables:
188    MAKE_CFLAGS: -Werror
189    MAKE_CXXFLAGS: -Werror
190  before_script:
191    - date
192    - hostname
193    - freebsd-version
194    - echo $(sysctl -n hw.ncpu)
195    - ccache --zero-stats
196  after_script:
197    - date
198    - ccache --show-stats
199
200.osx_test:
201  variables:
202    MAKE_CFLAGS: -Werror
203    MAKE_CXXFLAGS: -Werror
204  before_script:
205    - date
206    - hostname
207    - sw_vers -productVersion
208    - echo $(sysctl -n hw.ncpu)
209    - ccache --zero-stats
210  after_script:
211    - date
212    - ccache --show-stats
213
214.opensolaris_test:
215  before_script:
216    - date
217    - hostname
218    - uname -a
219    - echo $(nproc)
220  after_script:
221    - date
222
223.mswin_test:
224  before_script:
225    - date
226    - hostname
227    - uname -a
228    - echo $(nproc)
229  after_script:
230    - date
231
232#
233# The following tests run as part of stage-2.
234#
235# The tags variable used in the tests below connects the particular test with the runners
236# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd.
237# For example the test linux-gcc-complex-opt  any runner that has the tag 'name:pj02'
238# (in a blue box beneath it)
239#
240
241linux-gcc-complex-opt:
242  extends:
243    - .stage-2
244    - .linux_test
245  tags:
246    - linux-dell
247  variables:
248    TEST_ARCH: arch-ci-linux-gcc-complex-opt
249
250linux-gcc-pkgs-opt:
251  extends:
252    - .stage-2
253    - .linux_test
254  tags:
255    - linux-dell
256  variables:
257    TEST_ARCH: arch-ci-linux-gcc-pkgs-opt
258
259linux-gcc-quad-64idx-dbg:
260  extends:
261    - .stage-2
262    - .linux_test
263  tags:
264    - linux-dell
265  variables:
266    TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg
267
268linux-cuda-double:
269  extends:
270    - .stage-2
271    - .linux_test
272  tags:
273    - gpu:nvidia, os:linux
274  variables:
275    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
276    TEST_ARCH: arch-ci-linux-cuda-double
277
278freebsd-c-single-opt:
279  extends:
280    - .stage-2
281    - .freebsd_test
282  tags:
283    - os:fbsd
284  variables:
285    TEST_ARCH: arch-ci-freebsd-c-single-opt
286
287freebsd-cxx-cmplx-64idx-dbg:
288  extends:
289    - .stage-2
290    - .freebsd_test
291  tags:
292    - os:fbsd
293  variables:
294    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg
295
296opensolaris-misc:
297  extends:
298    - .stage-3
299    - .opensolaris_test
300  tags:
301    - name:n-gage
302  variables:
303    TEST_ARCH: arch-ci-opensolaris-misc
304
305osx-cxx-pkgs-opt:
306  extends:
307    - .stage-3
308    - .osx_test
309  tags:
310    - os:macos
311  variables:
312    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
313    TEST_ARCH: arch-ci-osx-cxx-pkgs-opt
314
315mswin-uni:
316  extends:
317    - .stage-2
318    - .mswin_test
319  tags:
320    - name:ps5-2
321  variables:
322    TEST_ARCH: arch-ci-mswin-uni
323
324#
325# The following tests run as part of stage-3.
326#
327
328mswin-intel-cxx-cmplx:
329  extends:
330    - .stage-3
331    - .mswin_test
332  tags:
333    - name:ps5
334  variables:
335    TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx
336
337mswin-intel:
338  extends:
339    - .stage-3
340    - .mswin_test
341  tags:
342    - name:ps5
343  variables:
344    TEST_ARCH: arch-ci-mswin-intel
345
346mswin-opt-impi:
347  extends:
348    - .stage-3
349    - .mswin_test
350  tags:
351    - name:ps4
352  variables:
353    TEST_ARCH: arch-ci-mswin-opt-impi
354
355opensolaris-cmplx-pkgs-dbg:
356  extends:
357    - .stage-3
358    - .opensolaris_test
359  tags:
360    - name:n-gage
361  variables:
362    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
363
364opensolaris-pkgs-opt:
365  extends:
366    - .stage-3
367    - .opensolaris_test
368  tags:
369    - name:n-gage
370  variables:
371    TEST_ARCH: arch-ci-opensolaris-pkgs-opt
372
373freebsd-pkgs-opt:
374  extends:
375    - .stage-3
376    - .freebsd_test
377  tags:
378    - os:fbsd
379  variables:
380    TEST_ARCH: arch-ci-freebsd-pkgs-opt
381
382freebsd-cxx-cmplx-pkgs-dbg:
383  extends:
384    - .stage-3
385    - .freebsd_test
386  tags:
387    - os:fbsd
388  variables:
389    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-pkgs-dbg
390
391freebsd-cxx-pkgs-opt:
392  extends:
393    - .stage-3
394    - .freebsd_test
395  tags:
396    - os:fbsd
397  variables:
398    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
399    TEST_ARCH: arch-ci-freebsd-cxx-pkgs-opt
400
401osx-cxx-cmplx-pkgs-dbg:
402  extends:
403    - .stage-3
404    - .osx_test
405  tags:
406    - os:macos
407  variables:
408    TEST_ARCH: arch-ci-osx-cxx-cmplx-pkgs-dbg
409
410osx-dbg:
411  extends:
412    - .stage-3
413    - .osx_test
414  tags:
415    - os:macos
416  variables:
417    TEST_ARCH: arch-ci-osx-dbg
418
419osx-xsdk-opt:
420  extends:
421    - .stage-3
422    - .osx_test
423  tags:
424    - os:macos
425  variables:
426    TEST_ARCH: arch-ci-osx-xsdk-opt
427
428linux-cmplx-gcov:
429  extends:
430    - .stage-3
431    - .linux_test
432  tags:
433    - mcs-nfs
434  variables:
435    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -vecscatter_mpi1 false -options_left false
436    TEST_ARCH: arch-ci-linux-cmplx-gcov
437  after_script:
438    - make gcov
439  artifacts:
440    when: always
441    paths:
442    - ${TEST_ARCH}/lib/petsc/conf/configure.log
443    - ${TEST_ARCH}/lib/petsc/conf/make.log
444    - ${TEST_ARCH}/tests/testresults.xml
445    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log
446    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log
447    - gcov.tar.gz
448    expire_in: 4 days
449
450
451linux-cmplx-single:
452  extends:
453    - .stage-3
454    - .linux_test
455  tags:
456    - name:si
457  variables:
458    TEST_ARCH: arch-ci-linux-cmplx-single
459
460linux-without-fc:
461  extends:
462    - .stage-3
463    - .linux_test
464  tags:
465    - name:si
466  variables:
467    TEST_ARCH: arch-ci-linux-without-fc
468
469linux-clang-avx:
470  extends:
471    - .stage-3
472    - .linux_test
473  tags:
474    - name:isdp001
475  variables:
476    TEST_ARCH: arch-ci-linux-clang-avx
477
478linux-gcc-cxx-avx2:
479  extends:
480    - .stage-3
481    - .linux_test
482  tags:
483    - name:isdp001
484  variables:
485    TEST_ARCH: arch-ci-linux-gcc-cxx-avx2
486
487linux-knl:
488  extends:
489    - .stage-3
490    - .linux_test
491  tags:
492    - name:isdp001
493  variables:
494    TEST_ARCH: arch-ci-linux-knl
495
496linux-c-exodus-dbg:
497  extends:
498    - .stage-3
499    - .linux_test
500  tags:
501    - gpu:nvidia, os:linux
502  variables:
503    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
504    TEST_ARCH: arch-ci-linux-c-exodus-dbg
505
506linux-cuda-single:
507  extends:
508    - .stage-3
509    - .linux_test
510  tags:
511    - gpu:nvidia, os:linux
512  variables:
513    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -cuda_initialize 0
514    TEST_ARCH: arch-ci-linux-cuda-single
515
516linux-viennacl:
517  extends:
518    - .stage-3
519    - .linux_test
520  tags:
521    - gpu:nvidia, os:linux, name:frog
522  variables:
523    TEST_ARCH: arch-ci-linux-viennacl
524
525linux-opt-misc:
526  extends:
527    - .stage-3
528    - .linux_test
529  tags:
530    - name:compute004
531  variables:
532    TEST_ARCH: arch-ci-linux-opt-misc
533
534linux-pkgs-cxx-mlib:
535  extends:
536    - .stage-3
537    - .linux_test
538  tags:
539    - name:pj02
540  variables:
541    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
542    TEST_ARCH: arch-ci-linux-pkgs-cxx-mlib
543
544linux-cxx-cmplx-pkgs-64idx:
545  extends:
546    - .stage-3
547    - .linux_test
548  tags:
549    - name:pj01
550  variables:
551    TEST_ARCH: arch-ci-linux-cxx-cmplx-pkgs-64idx
552
553linux-pkgs-dbg-ftn-interfaces:
554  extends:
555    - .stage-3
556    - .linux_test
557  tags:
558    - name:pj02
559  variables:
560    TEST_ARCH: arch-ci-linux-pkgs-dbg-ftn-interfaces
561
562linux-analyzer:
563  extends:
564    - .stage-3
565    - .linux_test
566  tags:
567    - mcs-nfs
568  variables:
569    TEST_ARCH: arch-ci-linux-analyzer
570
571linux-gcc-ifc-cmplx:
572  extends:
573    - .stage-3
574    - .linux_test
575  tags:
576    - mcs-nfs
577  variables:
578    TEST_ARCH: arch-ci-linux-gcc-ifc-cmplx
579
580linux-gcov:
581  extends:
582    - .stage-3
583    - .linux_test
584  tags:
585    - mcs-nfs
586  variables:
587    TEST_ARCH: arch-ci-linux-gcov
588  after_script:
589    - make gcov
590  artifacts:
591    when: always
592    paths:
593    - ${TEST_ARCH}/lib/petsc/conf/configure.log
594    - ${TEST_ARCH}/lib/petsc/conf/make.log
595    - ${TEST_ARCH}/tests/testresults.xml
596    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log
597    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log
598    - gcov.tar.gz
599    expire_in: 4 days
600
601
602linux-ILP64:
603  extends:
604    - .stage-3
605    - .linux_test
606  tags:
607    - name:compute004
608  variables:
609    TEST_ARCH: arch-ci-linux-ILP64
610
611linux-matlab-ilp64-gcov:
612  extends:
613    - .stage-3
614    - .linux_test
615  tags:
616    - mcs-nfs
617  variables:
618    TEST_ARCH: arch-ci-linux-matlab-ilp64-gcov
619  after_script:
620    - make gcov
621  artifacts:
622    when: always
623    paths:
624    - ${TEST_ARCH}/lib/petsc/conf/configure.log
625    - ${TEST_ARCH}/lib/petsc/conf/make.log
626    - ${TEST_ARCH}/tests/testresults.xml
627    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log
628    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log
629    - gcov.tar.gz
630    expire_in: 4 days
631
632
633linux-opt-cxx-quad:
634  extends:
635    - .stage-3
636    - .linux_test
637  tags:
638    - mcs-nfs
639  variables:
640    TEST_ARCH: arch-ci-linux-opt-cxx-quad
641
642linux-pgi:
643  extends:
644    - .stage-3
645    - .linux_test_noflags
646  tags:
647    - mcs-nfs,name:petsc
648  variables:
649    TEST_ARCH: arch-ci-linux-pgi
650
651linux-pkgs-64idx:
652  extends:
653    - .stage-3
654    - .linux_test
655  tags:
656    - mcs-nfs
657  variables:
658    TEST_ARCH: arch-ci-linux-pkgs-64idx
659
660linux-pkgs-gcov:
661  extends:
662    - .stage-3
663    - .linux_test
664  tags:
665    - mcs-nfs
666  variables:
667    TEST_ARCH: arch-ci-linux-pkgs-gcov
668  after_script:
669    - make gcov
670  artifacts:
671    when: always
672    paths:
673    - ${TEST_ARCH}/lib/petsc/conf/configure.log
674    - ${TEST_ARCH}/lib/petsc/conf/make.log
675    - ${TEST_ARCH}/tests/testresults.xml
676    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_tap.log
677    - ${TEST_ARCH}/tests/test_${TEST_ARCH}_err.log
678    - gcov.tar.gz
679    expire_in: 4 days
680
681linux-pkgs-opt:
682  extends:
683    - .stage-3
684    - .linux_test
685  tags:
686    - name:compute004
687  variables:
688    PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump -saws_port_auto_select -saws_port_auto_select_silent
689    TEST_ARCH: arch-ci-linux-pkgs-opt
690
691linux-pkgs-valgrind:
692  extends:
693    - .stage-3
694    - .linux_test
695  tags:
696    - valgrind
697  variables:
698    TEST_ARCH: arch-ci-linux-pkgs-valgrind
699    TIMEOUT: 7200
700  allow_failure: true
701
702linux-xsdk-dbg:
703  extends:
704    - .stage-3
705    - .linux_test
706  tags:
707    - mcs-nfs
708  variables:
709    TEST_ARCH: arch-ci-linux-xsdk-dbg
710
711linux-pardiso:
712  extends:
713    - .stage-3
714    - .linux_test
715  tags:
716    - mcs-nfs
717  variables:
718    TEST_ARCH: arch-ci-linux-pardiso
719
720linux-nagfor:
721  extends:
722    - .stage-3
723    - .linux_test
724  tags:
725    - mcs-nfs
726  variables:
727    TEST_ARCH: arch-ci-linux-nagfor
728
729#
730# The following tests are experimental; more tests by users at other sites may be added below this.  Experimental test
731# that fail produce a warning, but do not block execution of a pipeline.
732#
733
734.test-experimental:
735  extends: .test
736  allow_failure: true
737
738