-
Notifications
You must be signed in to change notification settings - Fork 292
338 lines (326 loc) · 13.2 KB
/
CI.yml
File metadata and controls
338 lines (326 loc) · 13.2 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
name: CI
on:
pull_request:
paths:
- '.github/workflows/CI.yml'
- 'src/**'
- 'examples/**'
- 'acinclude.m4'
- 'bootstrap.sh'
- 'CMakeLists.txt'
- 'config/**'
- 'configure.ac'
- 'Makefile.in'
push:
paths:
- '.github/workflows/CI.yml'
- 'src/**'
- 'examples/**'
- 'acinclude.m4'
- 'bootstrap.sh'
- 'CMakeLists.txt'
- 'config/**'
- 'configure.ac'
- 'Makefile.in'
env:
GLOBAL_MULTIPLIER: 1
concurrency:
# Group by workflow and ref, and to limit to 1 concurrent job except for main
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
# Cancel intermediate builds for pull requests
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
assert-ntl-msolve-nemo:
name: NTL, msolve and Nemo.jl
runs-on: ubuntu-24.04
env:
CC: "gcc"
TESTCOEFF: "0.1"
steps:
- uses: actions/checkout@v5
- name: "Setup"
run: |
sudo apt-get install -y libgmp-dev libmpfr-dev libntl-dev autoconf libtool-bin
$CC --version
make --version
autoconf --version
libtool --version
julia --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Build FLINT for msolve"
run: |
./bootstrap.sh && ./configure CC=${CC} --with-ntl --enable-assert
$MAKE && sudo make install && sudo ldconfig
- name: "Test FLINT for msolve"
run: |
$MAKE tests
$MAKE check
- name: "Test msolve"
run: |
git clone --depth=1 https://github.com/algebraic-solving/msolve
cd msolve/ && ./autogen.sh && ./configure && $MAKE && make check
- name: "Build FLINT for Nemo"
run: |
gmp_path=$(julia -e 'include("dev/find_gmp_mpfr.jl"); print(gmp_artifact_dir())')
mpfr_path=$(julia -e 'include("dev/find_gmp_mpfr.jl"); print(mpfr_artifact_dir())')
echo "Path to GMP and MPFR: ${gmp_path}, ${mpfr_path}"
./bootstrap.sh && ./configure CC=${CC} --with-gmp=$gmp_path --with-mpfr=$mpfr_path && $MAKE
mkdir lib
cp libflint.so* lib/
- name: "Test Nemo.jl"
run: |
git clone --depth 1 https://github.com/Nemocas/Nemo.jl.git
mkdir -p ~/.julia/artifacts
echo -e "[e134572f-a0d5-539d-bddf-3cad8db41a82]\nFLINT = \"$(pwd)\"" > ~/.julia/artifacts/Overrides.toml
julia -e "import Pkg; Pkg.develop(path=\"./Nemo.jl\"); Pkg.test(\"Nemo\")"
ubuntu-codecov:
name: codecov (x10)
runs-on: ubuntu-24.04
env:
CC: "gcc"
TESTCOEFF: "10"
steps:
- name: "Rescale multiplier"
run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV
- uses: actions/checkout@v5
- name: "Setup"
run: |
sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin lcov
$CC --version
make --version
autoconf --version
libtool --version
lcov --version
python3 --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: ./bootstrap.sh && ./configure CC=${CC} --enable-avx2 --enable-coverage
- name: "Compile library"
run: $MAKE && ldd libflint.so
- name: "Compile tests"
run: $MAKE tests
- name: "Check"
run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check
- name: "Check Python"
run: $MAKE check PYTHON=1
- name: "Gather coverage data"
run: $MAKE coverage
- name: "Upload coverage data"
uses: codecov/codecov-action@v5
if: github.repository == 'flintlib/flint'
with:
files: build/coverage/coverage.info
token: ${{ secrets.CODECOV_TOKEN }}
regression-check:
name: Regression check
runs-on: ubuntu-24.04
env:
CC: "gcc"
CFLAGS: "-march=native -std=c11 -Wall -Wextra -Werror"
MODULES: "build/thread_pool_merged.lo build/thread_support_merged.lo build/ulong_extras_merged.lo build/long_extras_merged.lo build/perm_merged.lo build/double_extras_merged.lo build/d_vec_merged.lo build/d_mat_merged.lo build/mpn_extras_merged.lo build/nmod_merged.lo build/nmod_vec_merged.lo build/nmod_mat_merged.lo build/nmod_poly_merged.lo build/mpn_mod_merged.lo build/fmpz_merged.lo build/fmpz_vec_merged.lo build/fmpz_mat_merged.lo build/fmpz_poly_merged.lo build/fmpz_mod_merged.lo build/fmpz_mod_vec_merged.lo build/fmpz_mod_mat_merged.lo build/fmpz_mod_poly_merged.lo build/fmpq_merged.lo build/fmpq_vec_merged.lo build/fmpq_mat_merged.lo build/fmpq_poly_merged.lo build/fq_merged.lo build/fq_vec_merged.lo build/fq_mat_merged.lo build/fq_poly_merged.lo build/fq_nmod_merged.lo build/fq_nmod_vec_merged.lo build/fq_nmod_mat_merged.lo build/fq_nmod_poly_merged.lo build/fq_zech_merged.lo build/fq_zech_mat_merged.lo build/fq_zech_poly_merged.lo build/fq_default_merged.lo build/fq_default_mat_merged.lo build/fq_default_poly_merged.lo build/fq_embed_merged.lo build/fq_nmod_embed_merged.lo build/fq_zech_embed_merged.lo build/padic_merged.lo build/padic_mat_merged.lo build/padic_poly_merged.lo build/qadic_merged.lo build/nmod_poly_factor_merged.lo build/fmpz_factor_merged.lo build/fmpz_poly_factor_merged.lo build/fmpz_mod_poly_factor_merged.lo build/fq_poly_factor_merged.lo build/fq_nmod_poly_factor_merged.lo build/fq_zech_poly_factor_merged.lo build/fq_default_poly_factor_merged.lo build/nmod_poly_mat_merged.lo build/fmpz_poly_mat_merged.lo build/mpoly_merged.lo build/nmod_mpoly_merged.lo build/fmpz_mpoly_merged.lo build/fmpz_mod_mpoly_merged.lo build/fmpq_mpoly_merged.lo build/fq_nmod_mpoly_merged.lo build/fq_zech_mpoly_merged.lo build/nmod_mpoly_factor_merged.lo build/fmpz_mpoly_factor_merged.lo build/fmpz_mod_mpoly_factor_merged.lo build/fmpq_mpoly_factor_merged.lo build/fq_nmod_mpoly_factor_merged.lo build/fq_zech_mpoly_factor_merged.lo build/fft_merged.lo build/fft_small_merged.lo"
# Everything until fmpz_poly_q
steps:
- uses: actions/checkout@v5
- name: "Setup"
run: |
sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin
$CC --version
make --version
autoconf --version
libtool --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: ./bootstrap.sh && ./configure CC=${CC} CFLAGS="${CFLAGS}" --disable-debug
- name: "Check regression in a subset of modules"
run: $MAKE $MODULES
ubuntu-arm:
name: ARM (x0.5)
runs-on: ubuntu-24.04-arm
env:
CC: "gcc"
TESTCOEFF: "0.5"
steps:
- name: "Rescale multiplier"
run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV
- uses: actions/checkout@v5
- name: "Setup"
run: |
sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin
$CC --version
make --version
autoconf --version
libtool --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: ./bootstrap.sh && ./configure CC=${CC} --disable-debug
- name: "Compile library"
run: $MAKE && ldd libflint.so
- name: "Compile tests"
run: $MAKE tests
- name: "Check"
run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check
macos-m1:
name: M1 (x0.5)
runs-on: macos-26
env:
TESTCOEFF: "0.5"
steps:
- name: "Rescale multiplier"
run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV
- uses: actions/checkout@v5
- name: "Setup"
run: |
brew install make autoconf libtool automake llvm
$(brew --prefix llvm)/bin/clang --version
gmake --version
autoconf --version
echo "MAKE=gmake -j$(expr $(nproc) + 1) -l 10 --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: ./bootstrap.sh && ./configure CC=$(brew --prefix llvm)/bin/clang --with-gmp=$(brew --prefix) --with-mpfr=$(brew --prefix) --disable-debug
- name: "Compile library"
run: $MAKE
- name: "Compile tests"
run: $MAKE tests
- name: "Compile profiles"
run: $MAKE profile
- name: "Check"
run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check
ubuntu-clang:
name: ASan, BLAS, examples (x1)
runs-on: ubuntu-24.04
env:
CC: "clang"
TESTCOEFF: "1"
steps:
- name: "Rescale multiplier"
run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV
- uses: actions/checkout@v5
- name: "Setup"
run: |
sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin perl libopenblas-dev
clang --version
make --version
autoconf --version
libtool --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: ./bootstrap.sh && ./configure CC=${CC} --with-blas --disable-debug --enable-asan
- name: "Compile library"
run: $MAKE && ldd libflint.so
- name: "Compile tests"
run: $MAKE tests
- name: "Check"
run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check
- name: "Compile examples"
run: $MAKE examples
- name: "Check examples"
run: $MAKE checkexamples
mingw64-gcc:
name: MinGW (x0.5)
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
CC: "gcc"
TESTCOEFF: "0.5"
steps:
- uses: actions/checkout@v5
- name: "Setup MinGW"
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: bc mingw-w64-x86_64-gcc mingw-w64-x86_64-autotools
- name: "Rescale multiplier"
run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV
- name: "Setup"
run: |
gcc --version
make --version
autoconf --version
libtool --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: ./bootstrap.sh && ./configure CC=${CC} --enable-fast-build --disable-debug
- name: "Compile library"
run: $MAKE
- name: "Compile tests"
run: $MAKE tests
- name: "Check"
run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check
msvc:
name: MSVC (x0.5)
runs-on: windows-latest
env:
TESTCOEFF: "0.5"
steps:
- name: "Rescale multiplier"
run: |
$TESTCOEFF = $env:TESTCOEFF * $env:GLOBAL_MULTIPLIER
echo "FLINT_TEST_MULTIPLIER=$TESTCOEFF" | Out-File -Append -FilePath $env:GITHUB_ENV
- uses: actions/checkout@v5
- name: "Cache vcpkg packages"
uses: actions/cache@v4
with:
path: ${{ runner.temp }}\vcpkg\archives
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: "Install vcpkg packages"
run: vcpkg install gmp mpfr pthreads --binarysource="clear;files,${{ runner.temp }}\vcpkg\archives,readwrite"
- name: "Setup MSVC"
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: x86_64
- name: "Configure"
run: |
mkdir build; cd build
cmake `
-G "Ninja" `
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake `
-DCMAKE_C_FLAGS="/wd4018 /wd4146 /wd4244 /wd4267 /wd4305 /wd4996" `
-DBUILD_TESTING=ON `
-DCMAKE_BUILD_TYPE=Release `
..
- name: "Build"
run: cd build; cmake --build . -j5
- name: "Check"
run: |
cd build
set "FLINT_TEST_MULTIPLIER=$env:FLINT_TEST_MULTIPLIER"
ctest -j5 --output-on-failure
alpine-32bit:
name: 32-bit, musl, assert (x2.5)
runs-on: ubuntu-24.04
env:
CC: "gcc"
TESTCOEFF: "2.5"
defaults:
run:
shell: alpine.sh {0}
steps:
- uses: actions/checkout@v5
- name: "Setup latest Alpine Linux"
uses: jirutka/setup-alpine@v1
with:
arch: x86
branch: edge
packages: gmp-dev mpfr-dev gcc musl-dev make autoconf automake libtool
- name: "Rescale multiplier"
run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV
- name: "Setup"
run: |
gcc --version
make --version
autoconf --version
libtool --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: ./bootstrap.sh && ./configure CC=${CC} --enable-assert --disable-debug
- name: "Compile library"
run: $MAKE
- name: "Compile tests"
run: $MAKE tests
- name: "Check"
run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check