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 test-short. 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 97# 98# This provides the basic order of operations and options template for stage-2 tests. 99# Not all stage-2 need to follow this template, but most will. 100# 101.stage-2: 102 extends: .test 103 stage: stage-2 104 only: 105 variables: 106 - $STAGE != "1" 107 script: 108 - ./config/examples/${TEST_ARCH}.py 109 - make 110 - make check 111 - make cleantest allgtests-tap TIMEOUT=300 112 artifacts: 113 reports: 114 junit: ${TEST_ARCH}/tests/testresults.xml 115 116# 117# The following tests run on MCS systems as part of stage-2. 118# 119# The tags variable used in the tests below connects the particular test with the runners 120# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd. 121# For example the test linux-gcc-complex-opt which extends .linux_mcs_test will run on 122# any runner that has the tag (in a blue box beneath it) of mcs-linux. 123# 124 125.mcs_test: 126 extends: .stage-2 127 128.linux_mcs_test: 129 extends: .mcs_test 130 tags: 131 - mcs-linux 132 before_script: 133 - hostname 134 - grep PRETTY_NAME /etc/os-release 135 - echo $(nproc) 136 - ccache --zero-stats 137 after_script: 138 - ccache --show-stats 139 140.freebsd_mcs_test: 141 extends: .mcs_test 142 tags: 143 - mcs-freebsd 144 before_script: 145 - hostname 146 - freebsd-version 147 - echo $(sysctl -n hw.ncpu) 148 - ccache --zero-stats 149 after_script: 150 - ccache --show-stats 151 152.osx_mcs_test: 153 extends: .mcs_test 154 tags: 155 - mcs-osx 156 variables: 157# the stages definition defines the first line of PETSC_OPTIONS below. Do they have to be repeated here or can one use 158# $PETSC_OPTIONS or another option so that they do not need to be repeated? 159 PETSC_OPTIONS: < 160 -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 161 -saws_port_auto_select -saws_port_auto_select_silent -vecscatter_mpi1 false -options_left false 162 before_script: 163 - hostname 164 - sw_vers -productVersion 165 - echo $(sysctl -n hw.ncpu) 166 - ccache --zero-stats 167 after_script: 168 - ccache --show-stats 169 170.opensolaris_mcs_test: 171 extends: .mcs_test 172 tags: 173 - mcs-opensolaris 174 before_script: 175 - hostname 176 - uname -a 177 - echo $(nproc) 178 179linux-gcc-complex-opt: 180 extends: .linux_mcs_test 181 variables: 182 TEST_ARCH: arch-ci-linux-gcc-complex-opt 183 184linux-gcc-pkgs-opt: 185 extends: .linux_mcs_test 186 variables: 187 TEST_ARCH: arch-ci-linux-gcc-pkgs-opt 188 189linux-gcc-quad-64idx-dbg: 190 extends: .linux_mcs_test 191 variables: 192 TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg 193 194freebsd-c-single-opt: 195 extends: .freebsd_mcs_test 196 variables: 197 TEST_ARCH: arch-ci-freebsd-c-single-opt 198 199freebsd-cxx-cmplx-64idx-dbg: 200 extends: .freebsd_mcs_test 201 variables: 202 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg 203 204osx-cxx-pkgs-opt: 205 extends: .osx_mcs_test 206 variables: 207 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt 208 209opensolaris-cmplx-pkgs-dbg: 210 extends: .opensolaris_mcs_test 211 variables: 212 TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg 213 214# 215# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 216# that fail produce a warning, but do not block execution of a pipeline. 217# 218 219.test-experimental: 220 extends: .test 221 allow_failure: true 222 223barry-checksource: 224 extends: .test-experimental 225 stage: stage-1 226 variables: 227# the blank GIT_CLEAN_FLAGS below indicates that the CI should NOT clean the git directory before running the next test 228 GIT_CLEAN_FLAGS: -qn 229 tags: 230 - barry 231 script: 232 - PETSC_ARCH=arch-barry PETSC_DIR=`pwd` ./configure --with-mpi=0 --with-fc=0 233 - PETSC_ARCH=arch-barry PETSC_DIR=`pwd` make checkbadSource 234 235barry-arch-hash: 236 extends: .test-experimental 237 stage: stage-1 238 variables: 239# the blank GIT_CLEAN_FLAGS below indicates that the CI should NOT clean the git directory before running the next test 240 GIT_CLEAN_FLAGS: -qn 241 tags: 242 - barry 243 script: 244 - PETSC_DIR=`pwd` ./configure --with-mpi=0 --with-fc=0 --arch-hash 245 - PETSC_DIR=`pwd` make checkbadSource 246