-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
167 lines (156 loc) · 5.16 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
variables:
pacman_deps: cmake ninja gcc yaml-cpp
pacman_deps_makepkg: rsync fakeroot git namcap
pacman_deps_py: python python-pip
pacman_deps_test: gtest gcovr
pacman_deps_pytest: python-pytest python-numpy nanobind
pacman_deps_clang: clang
stages:
- build
- test
.amd64:
image: archlinux:latest
tags: [amd64]
.aarch64:
image: lopsided/archlinux-arm64v8:latest
tags: [aarch64]
test_devel_coverage-amd64:
extends: [.test_devel_coverage, .amd64]
test_devel_coverage-aarch64:
extends: [.test_devel_coverage, .aarch64]
.test_devel_coverage:
stage: test
needs: []
artifacts:
expire_in: 2 days
paths:
- build/coverage.xml
- build/coverage_details
reports:
coverage_report:
coverage_format: cobertura
path: build/coverage.xml
coverage: "/^lines: \\d+.\\d+%/"
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py} ${pacman_deps_test}
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c "BUILD_WITH_COVERAGE=ON ./scripts/devel_setup.sh"
- su nobody -s /bin/bash -c "cmake --build build"
- su nobody -s /bin/bash -c "./scripts/devel_test.sh"
test_devel_sanitize-amd64:
extends: [.test_devel_sanitize, .amd64]
allow_failure: true # numpy >=2.1 on Python >=3.13 fails with address sanitizer
test_devel_sanitize-aarch64:
extends: [.test_devel_sanitize, .aarch64]
.test_devel_sanitize:
stage: test
needs: []
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py} ${pacman_deps_test}
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c "BUILD_WITH_SANITIZER=ON ./scripts/devel_setup.sh"
- su nobody -s /bin/bash -c "cmake --build build"
- su nobody -s /bin/bash -c "./scripts/devel_test.sh"
test_devel_clang-amd64:
extends: [.test_devel_clang, .amd64]
test_devel_clang-aarch64:
extends: [.test_devel_clang, .aarch64]
.test_devel_clang:
stage: test
needs: []
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py} ${pacman_deps_test} ${pacman_deps_clang}
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c "CC=clang CXX=clang++ ./scripts/devel_setup.sh"
- su nobody -s /bin/bash -c "cmake --build build"
- su nobody -s /bin/bash -c "./scripts/devel_test.sh"
build_archlinux-amd64:
extends: [.build_archlinux, .amd64]
build_archlinux-aarch64:
extends: [.build_archlinux, .aarch64]
.build_archlinux:
stage: build
needs: []
artifacts:
paths:
- structstore{,_py}-*.pkg.tar.zst
expire_in: 1 hour
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py} ${pacman_deps_makepkg}
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c ./scripts/makepkg.sh
- cp /tmp/structstore_build/structstore{,_py}-*.pkg.tar.zst ./
test_archlinux_cpp-amd64:
extends: [.test_archlinux_cpp, .amd64]
needs: [build_archlinux-amd64]
test_archlinux_cpp-aarch64:
extends: [.test_archlinux_cpp, .aarch64]
needs: [build_archlinux-aarch64]
.test_archlinux_cpp:
stage: test
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_test}
- pacman -U --noconfirm ./structstore-*.pkg.tar.zst
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c ./scripts/test.sh
test_archlinux_py-amd64:
extends: [.test_archlinux_py, .amd64]
needs: [build_archlinux-amd64]
test_archlinux_py-aarch64:
extends: [.test_archlinux_py, .aarch64]
needs: [build_archlinux-aarch64]
.test_archlinux_py:
stage: test
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py} ${pacman_deps_test} ${pacman_deps_pytest}
- pacman -U --noconfirm ./structstore{,_py}-*.pkg.tar.zst
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c "BUILD_WITH_PYTHON=1 ./scripts/test.sh"
build_pyproj-amd64:
extends: [.build_pyproj, .amd64]
build_pyproj-aarch64:
extends: [.build_pyproj, .aarch64]
.build_pyproj:
stage: build
needs: []
artifacts:
paths:
- dist/structstore-*.{tar.gz,whl}
expire_in: 1 hour
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py}
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c ./scripts/build_pyproj.sh
test_py_tarball-amd64:
extends: [.test_py_tarball, .amd64]
needs: [build_pyproj-amd64]
test_py_tarball-aarch64:
extends: [.test_py_tarball, .aarch64]
needs: [build_pyproj-aarch64]
.test_py_tarball:
stage: test
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py} ${pacman_deps_test}
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c "BUILD_WITH_PYTHON=1 BUILD_WITH_VENV=1 INSTALL_PY_TARBALL=1 ./scripts/test.sh"
test_py_wheel-amd64:
extends: [.test_py_wheel, .amd64]
needs: [build_pyproj-amd64]
test_py_wheel-aarch64:
extends: [.test_py_wheel, .aarch64]
needs: [build_pyproj-aarch64]
.test_py_wheel:
stage: test
script:
- pacman -Syu --noconfirm --needed ${pacman_deps} ${pacman_deps_py} ${pacman_deps_test}
- chmod a+rX -R .
- usermod -e -1 nobody
- su nobody -s /bin/bash -c "BUILD_WITH_PYTHON=1 BUILD_WITH_VENV=1 INSTALL_PY_WHEEL=1 ./scripts/test.sh"