1# 2# stage-1 take only a few minutes and generally run on the cloud; they do not run the full test suite or external packages. 3# 4# stage-2 runs on MCS systems and may take 10 to 15 minutes. They run the full test suite but with limited mixture of external packages 5# 6# stage-3 runs on MCS systems and may take an hour or more. They run the full test suite and heavily test external packages, utilize valgrind etc 7# (not yet implemented) 8# 9# The stage-(n) tests are only started if all of the stage-(n-1) tests run without error 10# You can limit the testing by using the variable STAGE with value 1 or 2 11# 12# By default the test branch is merged to master before testing. (not yet implemented) 13# You can limite this by using the variable MERGETOMASTER with value 0 (not yet implemented) 14# 15 16stages: 17 - stage-1 18 - stage-2 19 - stage-3 20variables: 21 GIT_STRATEGY: fetch 22 GIT_CLEAN_FLAGS: -ffdxq 23 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 24 25# 26# The most basic template that most tests will expand upon. In particular merge requests and branch pushes DO NOT trigger testing 27# 28 29.test: 30 only: 31 refs: 32# Set with CI/CD Shedules - New Schedule 33 - schedules 34# Set with CI/CD Pipelines - Run Pipeline 35 - web 36 37# 38# This provides the basic order of operations and options template for cloud based stage 1 tests. 39# Not all test-short need to follow this template but most will. 40# 41 42.stage-1: 43 extends: .test 44 stage: stage-1 45 image: jedbrown/mpich-ccache 46 before_script: 47 - echo nproc=$(nproc) 48 - cat /proc/cpuinfo 49 - export CCACHE_COMPILERCHECK=content 50 - export CCACHE_DIR=$(pwd)/.ccache 51 - ccache --show-stats 52 - ccache --zero-stats 53 script: 54 - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS} 55 - make CFLAGS=-Werror 56 - make allgtests-tap search="${TEST_SEARCH}" TIMEOUT=300 57 after_script: 58 - CCACHE_DIR=$(pwd)/.ccache ccache --show-stats 59 artifacts: 60 reports: 61 junit: arch-*/tests/testresults.xml 62 cache: 63 paths: 64 - .ccache/ 65 key: "${CI_JOB_NAME}" 66 67# 68# The following tests run on the cloud as part of stage-1. 69# 70 71mpich-cxx-py3: 72 extends: .stage-1 73 variables: 74 PYTHON: python3 75 CONFIG_OPTS: --with-mpi-dir=/usr/local --with-clanguage=cxx --with-fc=0 76 TEST_SEARCH: snes_tutorials-ex48% 77 78uni-complex-float-int64: 79 extends: .stage-1 80 variables: 81 PYTHON: python3 82 CONFIG_OPTS: < 83 --with-mpi=0 84 --with-scalar-type=complex --with-precision=single --with-64-bit-indices 85 TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_% 86 87c89-mlib-static-py2: 88 extends: .stage-1 89 image: jedbrown/mpich-ccache:python2 90 variables: 91 PYTHON: python2 92 CONFIG_OPTS: < 93 --with-mpi-dir=/usr/local 94 --with-single-library=0 --with-shared-libraries=0 'CFLAGS=-std=c89 -pedantic -Wno-long-long -Wno-overlength-strings' 95 TEST_SEARCH: snes_tutorials-ex48% 96 97checksource: 98 extends: .test 99 image: jedbrown/mpich-ccache 100 stage: stage-1 101 script: 102 - python3 ./configure --with-mpi=0 --with-fc=0 --with-cxx=0 103 - make checkbadSource SHELL=bash 104 105# 106# This provides the basic order of operations and options template for stage-2,3 tests. 107# Not all stage-2,3 need to follow this template, but most will. 108# 109.stage-23: 110 extends: .test 111 script: 112 - ./config/examples/${TEST_ARCH}.py 113 - make 114 - make check 115 - make cleantest allgtests-tap TIMEOUT=300 116 artifacts: 117 reports: 118 junit: ${TEST_ARCH}/tests/testresults.xml 119 120.stage-2: 121 extends: .stage-23 122 stage: stage-2 123 only: 124 variables: 125 - $STAGE != "1" 126 - $STAGE != "3" 127 128.stage-3: 129 extends: .stage-23 130 stage: stage-3 131 only: 132 variables: 133 - $STAGE != "1" 134 - $STAGE != "2" 135 136# 137# The following provide templates for various OSes for pre/post info 138# 139 140.linux_test: 141 before_script: 142 - hostname 143 - grep PRETTY_NAME /etc/os-release 144 - echo $(nproc) 145 - ccache --zero-stats 146 after_script: 147 - ccache --show-stats 148 149.freebsd_test: 150 before_script: 151 - hostname 152 - freebsd-version 153 - echo $(sysctl -n hw.ncpu) 154 - ccache --zero-stats 155 after_script: 156 - ccache --show-stats 157 158.osx_test: 159 before_script: 160 - hostname 161 - sw_vers -productVersion 162 - echo $(sysctl -n hw.ncpu) 163 - ccache --zero-stats 164 after_script: 165 - ccache --show-stats 166 167.opensolaris_test: 168 before_script: 169 - hostname 170 - uname -a 171 - echo $(nproc) 172 173.mswin_test: 174 before_script: 175 - hostname 176 - uname -a 177 - echo $(nproc) 178 179# 180# The following tests run as part of stage-2. 181# 182# The tags variable used in the tests below connects the particular test with the runners 183# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd. 184# For example the test linux-gcc-complex-opt any runner that has the tag 'name:pj02' 185# (in a blue box beneath it) 186# 187 188linux-gcc-complex-opt: 189 extends: 190 - .stage-2 191 - .linux_test 192 tags: 193 - name:pj02 194 variables: 195 TEST_ARCH: arch-ci-linux-gcc-complex-opt 196 197linux-gcc-pkgs-opt: 198 extends: 199 - .stage-2 200 - .linux_test 201 tags: 202 - name:pj02 203 variables: 204 TEST_ARCH: arch-ci-linux-gcc-pkgs-opt 205 206linux-gcc-quad-64idx-dbg: 207 extends: 208 - .stage-2 209 - .linux_test 210 tags: 211 - name:pj02 212 variables: 213 TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg 214 215freebsd-c-single-opt: 216 extends: 217 - .stage-2 218 - .freebsd_test 219 tags: 220 - name:petsc-fbsd 221 variables: 222 TEST_ARCH: arch-ci-freebsd-c-single-opt 223 224freebsd-cxx-cmplx-64idx-dbg: 225 extends: 226 - .stage-2 227 - .freebsd_test 228 tags: 229 - name:petsc-fbsd 230 variables: 231 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg 232 233opensolaris-misc: 234 extends: 235 - .stage-2 236 - .opensolaris_test 237 tags: 238 - name:n-gage 239 variables: 240 TEST_ARCH: arch-ci-opensolaris-misc 241 242osx-cxx-pkgs-opt: 243 extends: 244 - .stage-2 245 - .osx_test 246 tags: 247 - name:jpro 248 variables: 249 PETSC_OPTIONS: < 250 -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 251 -saws_port_auto_select -saws_port_auto_select_silent -vecscatter_mpi1 false -options_left false 252 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt 253 254osx-barry: 255 extends: 256 - .stage-2 257 - .osx_test 258 tags: 259 - os:osx 260 variables: 261 TEST_ARCH: arch-ci-osx-prefix 262 263mswin-uni: 264 extends: 265 - .stage-2 266 - .mswin_test 267 tags: 268 - name:ps4 269 variables: 270 TEST_ARCH: arch-ci-mswin-uni 271 272# 273# The following tests run as part of stage-3. 274# 275 276mswin-intel-cxx-cmplx: 277 extends: 278 - .stage-3 279 - .mswin_test 280 tags: 281 - name:ps4 282 variables: 283 TEST_ARCH: arch-ci-mswin-intel-cxx-cmplx 284 285mswin-intel: 286 extends: 287 - .stage-3 288 - .mswin_test 289 tags: 290 - name:ps4 291 variables: 292 TEST_ARCH: arch-ci-mswin-intel 293 294arch-ci-mswin-opt-impi: 295 extends: 296 - .stage-3 297 - .mswin_test 298 tags: 299 - name:ps4 300 variables: 301 TEST_ARCH: arch-ci-mswin-opt-impi 302 303 304opensolaris-cmplx-pkgs-dbg: 305 extends: 306 - .stage-3 307 - .opensolaris_test 308 tags: 309 - name:n-gage 310 variables: 311 TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg 312 313opensolaris-pkgs-opt: 314 extends: 315 - .stage-3 316 - .opensolaris_test 317 tags: 318 - name:n-gage 319 variables: 320 TEST_ARCH: arch-ci-opensolaris-pkgs-opt 321# 322# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 323# that fail produce a warning, but do not block execution of a pipeline. 324# 325 326.test-experimental: 327 extends: .test 328 allow_failure: true 329 330