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