xref: /petsc/.gitlab-ci.yml (revision 4f89072d003233996a794c6ede74a5033f002eed)
1stages:
2  - test
3  - test-long
4variables:
5  GIT_STRATEGY: fetch
6  GIT_CLEAN_FLAGS: -ffdxq
7  PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump
8
9.test:
10  stage: test
11  image: jedbrown/mpich-ccache
12  only:
13    - branches
14    - tags
15    - merge_requests
16  before_script:
17    - echo nproc=$(nproc)
18    - cat /proc/cpuinfo
19    - ccache --zero-stats
20    - echo "${CI_JOB_NAME}"
21    - export CCACHE_COMPILERCHECK=content
22  script:
23    - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS}
24    - make -j$(nproc) -l$(nproc) CFLAGS=-Werror
25    - make allgtests-tap search="${TEST_SEARCH}"
26  after_script:
27    - ccache --show-stats
28  artifacts:
29    reports:
30      junit: arch-*/tests/testresults.xml
31  cache:
32    paths:
33      - /ccache/
34    key: "${CI_JOB_NAME}"
35
36mpich-cxx-py3:
37  extends: .test
38  variables:
39    PYTHON: python3
40    CONFIG_OPTS: --with-mpi-dir=/usr/local --with-clanguage=cxx --with-fc=0
41    TEST_SEARCH: snes_tutorials-ex48%
42
43uni-complex-float-int64:
44  extends: .test
45  variables:
46    PYTHON: python3
47    CONFIG_OPTS: <
48      --with-mpi=0
49      --with-scalar-type=complex --with-precision=single --with-64-bit-indices
50    TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_%
51
52c89-mlib-static-py2:
53  extends: .test
54  image: jedbrown/mpich-ccache:python2
55  variables:
56    PYTHON: python2
57    CONFIG_OPTS: <
58      --with-mpi-dir=/usr/local
59      --with-single-library=0 --with-shared-libraries=0 'CFLAGS=-std=c89 -pedantic -Wno-long-long -Wno-overlength-strings'
60    TEST_SEARCH: snes_tutorials-ex48%
61
62
63.mcs_test:
64  stage: test-long
65  only:
66    - tags
67    - merge_requests
68  script:
69    - ./config/examples/${TEST_ARCH}.py
70    - make
71    - make check
72    - make cleantest allgtests-tap TIMEOUT=300
73  artifacts:
74    reports:
75      junit: ${TEST_ARCH}/tests/testresults.xml
76
77.linux_mcs_test:
78  extends: .mcs_test
79  tags:
80    - mcs-linux
81  before_script:
82    - hostname
83    - grep PRETTY_NAME /etc/os-release
84    - echo $(nproc)
85    - ccache --zero-stats
86  after_script:
87    - ccache --show-stats
88
89.freebsd_mcs_test:
90  extends: .mcs_test
91  tags:
92    - mcs-freebsd
93  before_script:
94    - hostname
95    - freebsd-version
96    - echo $(sysctl -n hw.ncpu)
97    - ccache --zero-stats
98  after_script:
99    - ccache --show-stats
100
101.osx_mcs_test:
102  extends: .mcs_test
103  tags:
104    - mcs-osx
105  variables:
106    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
107  before_script:
108    - hostname
109    - sw_vers -productVersion
110    - echo $(sysctl -n hw.ncpu)
111    - ccache --zero-stats
112  after_script:
113    - ccache --show-stats
114
115.opensolaris_mcs_test:
116  extends: .mcs_test
117  tags:
118    - mcs-opensolaris
119  before_script:
120    - hostname
121    - uname -a
122    - echo $(nproc)
123
124linux-gcc-complex-opt:
125  extends: .linux_mcs_test
126  variables:
127    TEST_ARCH: arch-ci-linux-gcc-complex-opt
128
129linux-gcc-pkgs-opt:
130  extends: .linux_mcs_test
131  variables:
132    TEST_ARCH: arch-ci-linux-gcc-pkgs-opt
133
134linux-gcc-quad-64idx-dbg:
135  extends: .linux_mcs_test
136  variables:
137    TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg
138
139freebsd-c-single-opt:
140  extends: .freebsd_mcs_test
141  variables:
142    TEST_ARCH: arch-ci-freebsd-c-single-opt
143
144freebsd-cxx-cmplx-64idx-dbg:
145  extends: .freebsd_mcs_test
146  variables:
147    TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg
148
149osx-cxx-pkgs-opt:
150  extends: .osx_mcs_test
151  variables:
152    TEST_ARCH: arch-ci-osx-cxx-pkgs-opt
153
154opensolaris-cmplx-pkgs-dbg:
155  extends: .opensolaris_mcs_test
156  variables:
157    TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg
158
159barry-checksource:
160  tags:
161    - barry
162  script:
163    - git config user.email "petsc@gitlab.none"
164    - git config user.name "petsc gitlab-ci"
165    - git fetch origin master
166    - make checkbadSource
167