1 2# test-short take only a few minutes and generally run on the cloud; they do not run the full test suite or external packages. 3# 4# test-long often runs on MCS systems and may take an hour or more. They run the full test suite and may test external packages. 5# 6# The test-long tests are only started if all of the test-short tests run without error and if the merge request has 7# been labeled with "fulltest". You must do a commit/push on the branch to force the testing after you have added the label. 8# To provide an empty commit that forces a new pipeline you can use 9# git commit --amend --no-edit # updates CommitDate field 10# git push origin +my/branch # force push amended commit 11# 12# You can also trigger a fulltest by using the Run Pipeline button and providing the variable CI_MERGE_REQUEST_LABELS with 13# the value fulltest. Using the Run Pipeline button with no variable will trigger a test-short 14# 15# Note that using the Run Pipeline or a WIP does NOT merge the branch into master before testing 16# https://docs.gitlab.com/ee/ci/merge_request_pipelines/ It is only merged to master after the WIP is removed and it becomes a 17# real MR. I am inclined to say we should manually do the merge to master in the scripts below 18# before running the tests. Or maybe have a label mergetomaster Barry Smith 19# 20 21stages: 22 - test-short 23 - test-long 24variables: 25 GIT_STRATEGY: fetch 26 GIT_CLEAN_FLAGS: -ffdxq 27 PETSC_OPTIONS: -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 28 29# 30# The most basic template that most tests will expand upon. It ensures that the tests are run only for merge requests. 31# 32 33.test: 34 only: 35 refs: 36 - merge_requests 37 - web 38 39# 40# This provides the basic order of operations and options template for cloud based test-short tests. 41# Not all test-short need to follow this template but most will. 42# 43 44.test-short: 45 extends: .test 46 stage: test-short 47 image: jedbrown/mpich-ccache 48 before_script: 49 - echo nproc=$(nproc) 50 - cat /proc/cpuinfo 51 - export CCACHE_COMPILERCHECK=content 52 - export CCACHE_DIR=$(pwd)/.ccache 53 - ccache --show-stats 54 - ccache --zero-stats 55 script: 56 - ${PYTHON} ./configure --with-debugging=0 COPTFLAGS='-O -march=native' CXXOPTFLAGS='-O -march=native' FOPTFLAGS='-O -march=native' ${CONFIG_OPTS} 57 - make CFLAGS=-Werror 58 - make allgtests-tap search="${TEST_SEARCH}" TIMEOUT=300 59 after_script: 60 - CCACHE_DIR=$(pwd)/.ccache ccache --show-stats 61 artifacts: 62 reports: 63 junit: arch-*/tests/testresults.xml 64 cache: 65 paths: 66 - .ccache/ 67 key: "${CI_JOB_NAME}" 68 69# 70# The following tests run on the cloud as part of test-short. 71# 72 73mpich-cxx-py3: 74 extends: .test-short 75 variables: 76 PYTHON: python3 77 CONFIG_OPTS: --with-mpi-dir=/usr/local --with-clanguage=cxx --with-fc=0 78 TEST_SEARCH: snes_tutorials-ex48% 79 80uni-complex-float-int64: 81 extends: .test-short 82 variables: 83 PYTHON: python3 84 CONFIG_OPTS: < 85 --with-mpi=0 86 --with-scalar-type=complex --with-precision=single --with-64-bit-indices 87 TEST_SEARCH: ts_tutorials-ex11_adv_2d_quad_% 88 89c89-mlib-static-py2: 90 extends: .test-short 91 image: jedbrown/mpich-ccache:python2 92 variables: 93 PYTHON: python2 94 CONFIG_OPTS: < 95 --with-mpi-dir=/usr/local 96 --with-single-library=0 --with-shared-libraries=0 'CFLAGS=-std=c89 -pedantic -Wno-long-long -Wno-overlength-strings' 97 TEST_SEARCH: snes_tutorials-ex48% 98 99# 100# This provides the basic order of operations and options template for test-long tests. 101# Not all test-long need to follow this template, but most will. 102# 103.test-long: 104 extends: .test 105 stage: test-long 106 only: 107 variables: 108 - $CI_MERGE_REQUEST_LABELS =~ /fulltest/ 109 script: 110 - ./config/examples/${TEST_ARCH}.py 111 - make 112 - make check 113 - make cleantest allgtests-tap TIMEOUT=300 114 artifacts: 115 reports: 116 junit: ${TEST_ARCH}/tests/testresults.xml 117 118# 119# The following tests run on MCS systems as part of test-long. 120# 121# The tags variable used in the tests below connects the particular test with the runners 122# listed on the left hand side of https://gitlab.com/petsc/petsc/-/settings/ci_cd. 123# For example the test linux-gcc-complex-opt which extends .linux_mcs_test will run on 124# any runner that has the tag (in a blue box beneath it) of mcs-linux. 125# 126 127.mcs_test: 128 extends: .test-long 129 130.linux_mcs_test: 131 extends: .mcs_test 132 tags: 133 - mcs-linux 134 before_script: 135 - hostname 136 - grep PRETTY_NAME /etc/os-release 137 - echo $(nproc) 138 - ccache --zero-stats 139 after_script: 140 - ccache --show-stats 141 142.freebsd_mcs_test: 143 extends: .mcs_test 144 tags: 145 - mcs-freebsd 146 before_script: 147 - hostname 148 - freebsd-version 149 - echo $(sysctl -n hw.ncpu) 150 - ccache --zero-stats 151 after_script: 152 - ccache --show-stats 153 154.osx_mcs_test: 155 extends: .mcs_test 156 tags: 157 - mcs-osx 158 variables: 159# the stages definition defines the first line of PETSC_OPTIONS below. Do they have to be repeated here or can one use 160# $PETSC_OPTIONS or another option so that they do not need to be repeated? 161 PETSC_OPTIONS: < 162 -check_pointer_intensity 0 -error_output_stdout -nox -nox_warning -malloc_dump 163 -saws_port_auto_select -saws_port_auto_select_silent -vecscatter_mpi1 false -options_left false 164 before_script: 165 - hostname 166 - sw_vers -productVersion 167 - echo $(sysctl -n hw.ncpu) 168 - ccache --zero-stats 169 after_script: 170 - ccache --show-stats 171 172.opensolaris_mcs_test: 173 extends: .mcs_test 174 tags: 175 - mcs-opensolaris 176 before_script: 177 - hostname 178 - uname -a 179 - echo $(nproc) 180 181linux-gcc-complex-opt: 182 extends: .linux_mcs_test 183 variables: 184 TEST_ARCH: arch-ci-linux-gcc-complex-opt 185 186linux-gcc-pkgs-opt: 187 extends: .linux_mcs_test 188 variables: 189 TEST_ARCH: arch-ci-linux-gcc-pkgs-opt 190 191linux-gcc-quad-64idx-dbg: 192 extends: .linux_mcs_test 193 variables: 194 TEST_ARCH: arch-ci-linux-gcc-quad-64idx-dbg 195 196freebsd-c-single-opt: 197 extends: .freebsd_mcs_test 198 variables: 199 TEST_ARCH: arch-ci-freebsd-c-single-opt 200 201freebsd-cxx-cmplx-64idx-dbg: 202 extends: .freebsd_mcs_test 203 variables: 204 TEST_ARCH: arch-ci-freebsd-cxx-cmplx-64idx-dbg 205 206osx-cxx-pkgs-opt: 207 extends: .osx_mcs_test 208 variables: 209 TEST_ARCH: arch-ci-osx-cxx-pkgs-opt 210 211opensolaris-cmplx-pkgs-dbg: 212 extends: .opensolaris_mcs_test 213 variables: 214 TEST_ARCH: arch-ci-opensolaris-cmplx-pkgs-dbg 215 216# 217# The following tests are experimental; more tests by users at other sites may be added below this. Experimental test 218# that fail produce a warning, but do not block execution of a pipeline. 219# 220 221.test-experimental: 222 extends: .test 223 allow_failure: true 224 225barry-checksource: 226 extends: .test-experimental 227 stage: test-short 228 variables: 229# the blank GIT_CLEAN_FLAGS below indicates that the CI should NOT clean the git directory before running the next test 230 GIT_CLEAN_FLAGS: -qn 231 tags: 232 - barry 233 script: 234 - PETSC_ARCH=arch-barry PETSC_DIR=`pwd` ./configure --with-mpi=0 --with-fc=0 235 - PETSC_ARCH=arch-barry PETSC_DIR=`pwd` make checkbadSource 236 237barry-arch-hash: 238 extends: .test-experimental 239 stage: test-short 240 variables: 241# the blank GIT_CLEAN_FLAGS below indicates that the CI should NOT clean the git directory before running the next test 242 GIT_CLEAN_FLAGS: -qn 243 tags: 244 - barry 245 script: 246 - PETSC_DIR=`pwd` ./configure --with-mpi=0 --with-fc=0 --arch-hash 247 - PETSC_DIR=`pwd` make checkbadSource 248