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