-
Notifications
You must be signed in to change notification settings - Fork 151
234 lines (209 loc) · 9.54 KB
/
test.yml
File metadata and controls
234 lines (209 loc) · 9.54 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
name: Test
on:
push:
pull_request:
workflow_dispatch:
env:
FORM_IGNORE_DEPRECATION: 1
OMPI_MCA_rmaps_base_oversubscribe: 1
jobs:
# Simple tests on Linux; except the ParFORM case, they probably pass unless
# the committer has forgotten running "make check".
check:
name: Test (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- {bin: form, test: default}
- {bin: tform, test: default}
- {bin: tform, test: default, nthreads: 2}
- {bin: form, test: default, flint: no}
- {bin: tform, test: default, flint: no}
- {bin: tform, test: default, nthreads: 2, flint: no}
- {bin: form, test: extra, timeout: 60}
- {bin: tform, test: extra, timeout: 60}
- {bin: tform, test: extra, timeout: 60, nthreads: 2}
- {bin: form, test: extra, timeout: 60, flint: no}
- {bin: tform, test: extra, timeout: 60, flint: no}
- {bin: tform, test: extra, timeout: 60, nthreads: 2, flint: no}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensures a reachable tag
- name: Set up build
uses: ./.github/actions/setup-build
with:
features: >-
${{ matrix.bin }}
${{ matrix.flint == 'no' && 'noflint' || '' }}
${{ matrix.test == 'extra' && 'formlib' || '' }}
- name: Build
run: make -C sources -j 4 ${{ matrix.bin }}
- name: Test
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.timeout && format('--timeout {0}', matrix.timeout) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }}
check-parform:
name: Test (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- {bin: parform, test: default, timeout: 15}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensures a reachable tag
- name: Set up build
uses: ./.github/actions/setup-build
with:
features: >-
${{ matrix.bin }}
${{ matrix.flint == 'no' && 'noflint' || '' }}
${{ matrix.test == 'extra' && 'formlib' || '' }}
- name: Build
run: make -C sources -j 4 ${{ matrix.bin }}
- name: Test
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.timeout && format('--timeout {0}', matrix.timeout) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }}
# Check memory errors (e.g., uninitialized values and memory leaks)
# thoroughly by using Valgrind on Linux. To maximize the use of concurrent
# jobs, we divide the tests into smaller parts.
valgrind-check:
name: Valgrind check (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }} (${{ matrix.group }})
needs: [check, check-i386]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- {bin: vorm, test: default, group: 1/5}
- {bin: vorm, test: default, group: 2/5}
- {bin: vorm, test: default, group: 3/5}
- {bin: vorm, test: default, group: 4/5}
- {bin: vorm, test: default, group: 5/5}
- {bin: tvorm, test: default, group: 1/10}
- {bin: tvorm, test: default, group: 2/10}
- {bin: tvorm, test: default, group: 3/10}
- {bin: tvorm, test: default, group: 4/10}
- {bin: tvorm, test: default, group: 5/10}
- {bin: tvorm, test: default, group: 6/10}
- {bin: tvorm, test: default, group: 7/10}
- {bin: tvorm, test: default, group: 8/10}
- {bin: tvorm, test: default, group: 9/10}
- {bin: tvorm, test: default, group: 10/10}
- {bin: tvorm, test: default, nthreads: 2, group: 1/10}
- {bin: tvorm, test: default, nthreads: 2, group: 2/10}
- {bin: tvorm, test: default, nthreads: 2, group: 3/10}
- {bin: tvorm, test: default, nthreads: 2, group: 4/10}
- {bin: tvorm, test: default, nthreads: 2, group: 5/10}
- {bin: tvorm, test: default, nthreads: 2, group: 6/10}
- {bin: tvorm, test: default, nthreads: 2, group: 7/10}
- {bin: tvorm, test: default, nthreads: 2, group: 8/10}
- {bin: tvorm, test: default, nthreads: 2, group: 9/10}
- {bin: tvorm, test: default, nthreads: 2, group: 10/10}
- {bin: vorm, test: extra, group: 1/1}
- {bin: tvorm, test: extra, group: 1/1}
- {bin: tvorm, test: extra, nthreads: 2, group: 1/1}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensures a reachable tag
- name: Set up build
uses: ./.github/actions/setup-build
with:
features: >-
${{ matrix.bin }}
${{ matrix.flint == 'no' && 'noflint' || '' }}
${{ matrix.test == 'extra' && 'formlib' || '' }}
valgrind
- name: Build
run: make -C sources -j 4 ${{ matrix.bin }}
- name: Test
run: ./check/check.rb valgrind ./sources/${{ matrix.bin }} --stat -g ${{ matrix.group }} --retries 5 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }}
# Generate LCOV coverage data to be posted to coveralls.io. Note that
# we measure code coverage only for tests checked with Valgrind.
coverage:
name: Code coverage (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }}
needs: [check, check-i386]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- {bin: vorm, test: default}
- {bin: tvorm, test: default}
- {bin: tvorm, test: default, nthreads: 2}
- {bin: vorm, test: extra, timeout: 60}
- {bin: tvorm, test: extra, timeout: 60}
- {bin: tvorm, test: extra, timeout: 60, nthreads: 2}
- {bin: vorm, test: default, flint: no}
- {bin: tvorm, test: default, flint: no}
- {bin: tvorm, test: default, nthreads: 2, flint: no}
- {bin: vorm, test: extra, timeout: 60, flint: no}
- {bin: tvorm, test: extra, timeout: 60, flint: no}
- {bin: tvorm, test: extra, timeout: 60, nthreads: 2, flint: no}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensures a reachable tag
- name: Set up build
uses: ./.github/actions/setup-build
with:
features: >-
${{ matrix.bin }}
${{ matrix.flint == 'no' && 'noflint' || '' }}
${{ matrix.test == 'extra' && 'formlib' || '' }}
coverage
- name: Build
run: make -C sources -j 4 ${{ matrix.bin }}
- name: Test
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout ${{ matrix.timeout && format('{0}', matrix.timeout) || '30' }} ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }} --fake-valgrind
- name: Generate LCOV coverage data
run: |
lcov -d . -c -o coverage.lcov
lcov -r coverage.lcov '*/usr/include/*' '*/extern/*'${{ matrix.flint != 'no' && ' ''*/lib/*''' || '' }} -o coverage.lcov
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }} (${{ matrix.test }})${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }}
parallel: true
# Post LCOV coverage data to coveralls.io.
coverage-finish:
needs: [check, valgrind-check, coverage]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
# Tests with a 32-bit container.
check-i386:
name: 32-bit container check for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
runs-on: ubuntu-latest
container:
image: i386/debian:11.5
strategy:
fail-fast: false
matrix:
include:
- {bin: form}
- {bin: tform}
- {bin: tform, nthreads: 2}
steps:
# We have to use v1.
# See https://github.com/actions/checkout/issues/334
- name: Checkout repository
uses: actions/checkout@v1
- name: Set up build
uses: ./.github/actions/setup-build
with:
features: ${{ matrix.bin }} noflint # actions/cache@v4 doesn't work
- name: Build
run: make -C sources -j 4 ${{ matrix.bin }}
- name: Test
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --wordsize 2 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }}