Skip to content

Commit b996311

Browse files
authored
Merge pull request #587 from libtom/update-ci
Update CI
2 parents 5938524 + b59524c commit b996311

File tree

4 files changed

+33
-30
lines changed

4 files changed

+33
-30
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
os: [ ubuntu-20.04, ubuntu-22.04 ]
18+
os: [ ubuntu-22.04, ubuntu-24.04 ]
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: set Ubuntu codename

.github/workflows/main.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ on:
2424
- /^support\/.*$/
2525
- /^ci\/.*$/
2626

27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
29+
cancel-in-progress: true
30+
2731
jobs:
2832
Docs:
29-
runs-on: ubuntu-20.04
33+
runs-on: ubuntu-22.04
3034
container: texlive/texlive:latest-full
3135
steps:
32-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3337
- name: generate PDF
3438
run: |
3539
make docs V=1
@@ -43,7 +47,7 @@ jobs:
4347
runs-on: ${{ matrix.os }}
4448
strategy:
4549
matrix:
46-
os: [ ubuntu-20.04 ]
50+
os: [ ubuntu-22.04 ]
4751
# The environment given to the programs in the build
4852
# We have only one program and the variable $BUILDOPTIONS
4953
# has only the options to that program: testme.sh
@@ -66,23 +70,23 @@ jobs:
6670
# Alternative big-int version of mp_log(_n) for the 32-bit architecture (no valgrind)
6771
- { BUILDOPTIONS: '--with-cc=gcc --with-m32 --cflags=-DS_MP_WORD_TOO_SMALL_C="" ', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-i386 gcc-multilib' }
6872
# clang for the 32-bit architecture (no valgrind)
69-
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m32', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 gcc-multilib' }
73+
- { BUILDOPTIONS: '--with-cc=clang-14 --with-m32', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-14 llvm-14 gcc-multilib' }
7074
# RSA superclass with tests (no sanitizer, but debug info)
7175
- { BUILDOPTIONS: '--with-cc=gcc --with-m64 --cflags=-DLTM_NOTHING --cflags=-DSC_RSA_1_WITH_TESTS --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '1', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' }
7276

7377
# Build with small stack-size
7478
- { BUILDOPTIONS: '--with-cc=gcc --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-multilib' }
75-
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 libc6-dev-i386 gcc-multilib' }
79+
- { BUILDOPTIONS: '--with-cc=clang-14 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-14 llvm-14 libc6-dev-i386 gcc-multilib' }
7680
- { BUILDOPTIONS: '--with-cc=gcc --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --multithread --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-i386 gcc-multilib' }
77-
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --multithread', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 gcc-multilib' }
81+
- { BUILDOPTIONS: '--with-cc=clang-14 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --multithread', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-14 llvm-14 gcc-multilib' }
7882

7983
# Test "autotuning", the automatic evaluation and setting of the Toom-Cook cut-offs.
8084
#- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_16BIT --limit-valgrind --make-option=tune'
8185
#- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_32BIT --limit-valgrind --make-option=tune'
8286
#- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --limit-valgrind --make-option=tune'
8387
#- env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_16BIT --limit-valgrind --make-option=tune'
8488
#- env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_32BIT --limit-valgrind --make-option=tune'
85-
- { BUILDOPTIONS: '--with-cc=clang-10 --limit-valgrind --make-option=tune', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' }
89+
- { BUILDOPTIONS: '--with-cc=clang-14 --limit-valgrind --make-option=tune', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-14 llvm-14' }
8690

8791
# GCC for the x86-64 architecture testing against a different Bigint-implementation
8892
# with 333333 different inputs.
@@ -92,32 +96,31 @@ jobs:
9296

9397
# clang for the x86-64 architecture testing against a different Bigint-implementation
9498
# with 333333 different inputs
95-
- { BUILDOPTIONS: '--with-cc=clang-10 --test-vs-mtest=333333 --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' }
99+
- { BUILDOPTIONS: '--with-cc=clang-14 --test-vs-mtest=333333 --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-14 llvm-14' }
96100
# ... and a better random source.
97-
- { BUILDOPTIONS: '--with-cc=clang-10 --test-vs-mtest=333333 --mtest-real-rand --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' }
101+
- { BUILDOPTIONS: '--with-cc=clang-14 --test-vs-mtest=333333 --mtest-real-rand --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-14 llvm-14' }
98102

99103
# GCC for the x64_32 architecture (32-bit longs and 32-bit pointers)
100104
# TODO: Probably not possible to run anything in x32 in GH actions
101105
# but needs to be checked to be sure.
102-
- { BUILDOPTIONS: '--with-cc=gcc --with-mx32', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-x32 gcc-multilib' }
106+
# - { BUILDOPTIONS: '--with-cc=gcc --with-mx32', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-x32 gcc-multilib' }
103107

104108
# GCC for the x86-64 architecture (64-bit longs and 64-bit pointers)
105109
- { BUILDOPTIONS: '--with-cc=gcc --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' }
110+
- { BUILDOPTIONS: '--with-cc=gcc-9 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-9' }
106111
- { BUILDOPTIONS: '--with-cc=gcc-10 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-10' }
107-
- { BUILDOPTIONS: '--with-cc=gcc-8 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-8' }
108-
- { BUILDOPTIONS: '--with-cc=gcc-7 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-7' }
112+
- { BUILDOPTIONS: '--with-cc=gcc-12 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-12' }
109113

110114
# clang for x86-64 architecture (64-bit longs and 64-bit pointers)
111-
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'relaxed', OTHERDEPS: 'clang-10 llvm-10' }
112-
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang-10 llvm-10' }
113-
- { BUILDOPTIONS: '--with-cc=clang-10 --cflags=-DMP_USE_MEMOPS --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang-10 llvm-10' }
114-
- { BUILDOPTIONS: '--with-cc=clang-10 --c89 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang-10 llvm-10' }
115-
- { BUILDOPTIONS: '--with-cc=clang-10 --with-m64 --limit-valgrind --cflags=-DMP_PREC=MP_MIN_PREC', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' }
115+
- { BUILDOPTIONS: '--with-cc=clang --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'relaxed', OTHERDEPS: 'clang llvm' }
116+
- { BUILDOPTIONS: '--with-cc=clang --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang llvm' }
117+
- { BUILDOPTIONS: '--with-cc=clang --cflags=-DMP_USE_MEMOPS --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang llvm' }
118+
- { BUILDOPTIONS: '--with-cc=clang --c89 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang llvm' }
119+
- { BUILDOPTIONS: '--with-cc=clang --with-m64 --limit-valgrind --cflags=-DMP_PREC=MP_MIN_PREC', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang llvm' }
120+
# - { BUILDOPTIONS: '--with-cc=clang-11 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-11 llvm-11' }
116121
- { BUILDOPTIONS: '--with-cc=clang-12 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-12 llvm-12' }
117-
- { BUILDOPTIONS: '--with-cc=clang-9 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-9 llvm-9' }
118-
- { BUILDOPTIONS: '--with-cc=clang-8 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-8 llvm-8' }
119-
- { BUILDOPTIONS: '--with-cc=clang-7 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-7 llvm-7' }
120-
- { BUILDOPTIONS: '--with-cc=clang-6.0 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-6.0 llvm-6.0' }
122+
- { BUILDOPTIONS: '--with-cc=clang-13 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-13 llvm-13' }
123+
- { BUILDOPTIONS: '--with-cc=clang-15 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-15 llvm-15' }
121124
# Link time optimization
122125
- { BUILDOPTIONS: '--with-cc=gcc --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '1', CONV_WARNINGS: '', OTHERDEPS: '' }
123126
#- { BUILDOPTIONS: '--with-cc=clang-7 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '1', CONV_WARNINGS: '', OTHERDEPS: '' }
@@ -135,7 +138,7 @@ jobs:
135138
- { BUILDOPTIONS: '--with-cc=clang --cflags=-DMP_16BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang llvm' }
136139
- { BUILDOPTIONS: '--with-cc=clang --cflags=-DMP_32BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang llvm' }
137140
steps:
138-
- uses: actions/checkout@v3
141+
- uses: actions/checkout@v4
139142
- name: install dependencies
140143
run: |
141144
sudo apt-get update -qq
@@ -176,9 +179,9 @@ jobs:
176179
cat gcc_errors_*.log || true
177180
178181
amalgam:
179-
runs-on: ubuntu-22.04
182+
runs-on: ubuntu-24.04
180183
steps:
181-
- uses: actions/checkout@v3
184+
- uses: actions/checkout@v4
182185
- name: install dependencies
183186
run: |
184187
make amalgamated_timing
@@ -187,7 +190,7 @@ jobs:
187190
runs-on: ${{ matrix.os }}
188191
strategy:
189192
matrix:
190-
os: [ ubuntu-20.04, ubuntu-22.04 ]
193+
os: [ ubuntu-22.04, ubuntu-24.04 ]
191194
build_type: [ '', -DCMAKE_BUILD_TYPE=Debug, -DCMAKE_BUILD_TYPE=Release, -DCMAKE_BUILD_TYPE=RelWithDebInfo, -DCMAKE_BUILD_TYPE=MinSizeRel ]
192195
cc: [ clang, gcc ]
193196
config:
@@ -196,7 +199,7 @@ jobs:
196199
# Shared library build
197200
- { CMAKEOPTIONS: '-DBUILD_SHARED_LIBS=On' }
198201
steps:
199-
- uses: actions/checkout@v3
202+
- uses: actions/checkout@v4
200203
- name: install dependencies
201204
run: |
202205
sudo apt-get update -qq

mp_gcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ mp_err mp_gcd(const mp_int *a, const mp_int *b, mp_int *c)
8484
c->sign = MP_ZPOS;
8585
err = MP_OKAY;
8686
LBL_V:
87-
mp_clear(&u);
88-
LBL_U:
8987
mp_clear(&v);
88+
LBL_U:
89+
mp_clear(&u);
9090
return err;
9191
}
9292
#endif

s_mp_exptmod_fast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
mp_err s_mp_exptmod_fast(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode)
2323
{
2424
mp_int M[TAB_SIZE], res;
25-
mp_digit buf, mp;
25+
mp_digit buf, mp = 0;
2626
int bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize;
2727
mp_err err;
2828

0 commit comments

Comments
 (0)