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