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