xref: /petsc/.gitlab-ci.yml (revision 9e1e7a81fae12e15014bc1b3dc4799e2f7a0586c)
1stages:
2  - test
3  - test-long
4variables:
5  GIT_STRATEGY: fetch
6  GIT_DEPTH: 1
7  GIT_CLEAN_FLAGS: -ffdxq
8  PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump
9
10.test:
11  stage: test
12  image: jedbrown/mpich-ccache
13  only:
14    - branches
15    - tags
16    - merge_requests
17  before_script:
18    - echo nproc=$(nproc)
19    - cat /proc/cpuinfo
20    - ccache --zero-stats
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 -j$(nproc) -l$(nproc) -f gmakefile.test PETSC_DIR=$PWD test 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