forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 152
245 lines (209 loc) · 7.18 KB
/
test.yml
File metadata and controls
245 lines (209 loc) · 7.18 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
name: Integration Test and Unit Test
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: X64
if: github.repository_owner == 'deepmodeling'
container:
image: ghcr.io/deepmodeling/abacus-gnu
volumes:
- /tmp/ccache:/github/home/.ccache
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
# We will handle submodules manually after fixing ownership
submodules: 'false'
- name: Take ownership of the workspace and update submodules
run: |
sudo chown -R $(whoami) .
git submodule update --init --recursive
- name: Install CI tools
run: |
sudo apt-get update
sudo apt-get install -y ccache ca-certificates python-is-python3 python3-pip
sudo pip install clang-format clang-tidy
- name: Configure
run: |
cmake -B build -DBUILD_TESTING=ON -DENABLE_MLALGO=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DENABLE_FLOAT_FFTW=ON
# Temporarily removed because no one maintains this now.
# And it will break the CI test workflow.
# - uses: pre-commit/action@v3.0.1
# with:
# extra_args:
# --from-ref ${{ github.event.pull_request.base.sha }}
# --to-ref ${{ github.event.pull_request.head.sha }}
# continue-on-error: true
# - uses: pre-commit-ci/lite-action@v1.0.3
- name: Build
run: |
cmake --build build -j8
cmake --install build
- name: Integrated Tests Preparation
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R integrated_test
- name: Module_Base Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_BASE
- name: Module_IO Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_IO
- name: Module_HSolver Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_HSOLVER -E PERF_MODULE_HSOLVER_KERNELS
- name: Module_Cell Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_CELL
- name: Module_MD Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_MD
- name: Module_Psi Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_PSI
- name: Module_RI Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_RI
- name: Module_Estate Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_ESTATE
- name: Module_Hamilt Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_HAMILT
- name: Module_PW Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_PW
- name: Module_LCAO Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_LCAO
- name: Module_AO Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_AO
- name: Module_NAO Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_NAO
- name: Module_RELAX Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_RELAX
- name: Module_LR Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R MODULE_LR
- name: 01_PW Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 01_PW
- name: 02_NAO_Gamma Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 02_NAO_Gamma
- name: 03_NAO_multik Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 03_NAO_multik
- name: 04_FF Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 04_FF
- name: 05_rtTDDFT Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 05_rtTDDFT
- name: 06_SDFT Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 06_SDFT
- name: 07_OFDFT Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 07_OFDFT
- name: 08_EXX Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 08_EXX
- name: 09_DeePKS Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 09_DeePKS
- name: 10_others Test
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -R 10_others
- name: Other Unittests
env:
GTEST_COLOR: 'yes'
OMP_NUM_THREADS: '2'
run: |
ctest --test-dir build -V --timeout 1700 -E 'integrate_test|01_PW|02_NAO_Gamma|03_NAO_multik|04_FF|05_rtTDDFT|06_SDFT|07_OFDFT|08_EXX|09_DeePKS|10_others|11_PW_GPU|12_NAO_Gamma_GPU|13_NAO_multik_GPU|15_rtTDDFT_GPU|16_SDFT_GPU|MODULE_BASE|MODULE_IO|MODULE_HSOLVER|MODULE_CELL|MODULE_MD|MODULE_PSI|MODULE_ESTATE|MODULE_RI|MODULE_HAMILT|MODULE_PW|MODULE_LCAO|MODULE_AO|MODULE_NAO|MODULE_RELAX|MODULE_LR'