aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yml14
-rw-r--r--.github/workflows/test.yml18
-rw-r--r--src/gen/gens.c3
-rw-r--r--src/misc/compat.h4
4 files changed, 21 insertions, 18 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index eed2d1f..734b9f3 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,9 +7,9 @@ on:
jobs:
release:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
submodules: true
- name: Setup gcc
@@ -18,13 +18,13 @@ jobs:
sudo apt-get install -y gcc dpkg apt
- name: Setup pari
run: |
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-gmp-tls7_2.13.1-1_amd64.deb
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-dev_2.13.1-1_amd64.deb
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/pari-gp_2.13.1-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-gmp-tls8_2.15.1-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-dev_2.15.1-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/pari-gp_2.15.1-1_amd64.deb
wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/r/readline/libreadline8_8.0-4_amd64.deb
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/n/ncurses/libtinfo6_6.2-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/n/ncurses/libtinfo6_6.3-2_amd64.deb
wget -q https://pari.math.u-bordeaux.fr/pub/pari/packages/seadata.tgz
- sudo dpkg --force-all -i libtinfo6_6.2-1_amd64.deb libreadline8_8.0-4_amd64.deb libpari-gmp-tls7_2.13.1-1_amd64.deb libpari-dev_2.13.1-1_amd64.deb pari-gp_2.13.1-1_amd64.deb
+ sudo dpkg --force-all -i libtinfo6_6.3-2_amd64.deb libreadline8_8.0-4_amd64.deb libpari-gmp-tls8_2.15.1-1_amd64.deb libpari-dev_2.15.1-1_amd64.deb pari-gp_2.15.1-1_amd64.deb
DATADIR=$(echo "default(datadir)" | gp -q | cut -d\" -f2)
sudo tar --strip-components=1 -C ${DATADIR} -xzf seadata.tgz data/
- name: Build
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 29e7823..98663b4 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -4,14 +4,14 @@ on: [push, pull_request]
jobs:
test:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
strategy:
matrix:
CC: [gcc, clang]
env:
CC: ${{ matrix.CC }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
submodules: true
- name: Setup ${{ matrix.CC }}
@@ -20,13 +20,13 @@ jobs:
sudo apt-get install -y $CC dpkg apt
- name: Setup pari
run: |
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-gmp-tls7_2.13.1-1_amd64.deb
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-dev_2.13.1-1_amd64.deb
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/pari-gp_2.13.1-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-gmp-tls8_2.15.1-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/libpari-dev_2.15.1-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/universe/p/pari/pari-gp_2.15.1-1_amd64.deb
wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/r/readline/libreadline8_8.0-4_amd64.deb
- wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/n/ncurses/libtinfo6_6.2-1_amd64.deb
+ wget -q https://mirrors.edge.kernel.org/ubuntu/pool/main/n/ncurses/libtinfo6_6.3-2_amd64.deb
wget -q https://pari.math.u-bordeaux.fr/pub/pari/packages/seadata.tgz
- sudo dpkg --force-all -i libtinfo6_6.2-1_amd64.deb libreadline8_8.0-4_amd64.deb libpari-gmp-tls7_2.13.1-1_amd64.deb libpari-dev_2.13.1-1_amd64.deb pari-gp_2.13.1-1_amd64.deb
+ sudo dpkg --force-all -i libtinfo6_6.3-2_amd64.deb libreadline8_8.0-4_amd64.deb libpari-gmp-tls8_2.15.1-1_amd64.deb libpari-dev_2.15.1-1_amd64.deb pari-gp_2.15.1-1_amd64.deb
DATADIR=$(echo "default(datadir)" | gp -q | cut -d\" -f2)
sudo tar --strip-components=1 -C ${DATADIR} -xzf seadata.tgz data/
- name: Test
@@ -37,8 +37,8 @@ jobs:
run: |
cd src && find . -name "*.gcda" -exec gcov -pb "{}" +;
- name: Code coverage upload
- uses: codecov/codecov-action@v1
+ uses: codecov/codecov-action@v3
if: ${{ matrix.CC == 'gcc' }}
with:
env_vars: CC
- functionalities: gcov
+ gcov: true
diff --git a/src/gen/gens.c b/src/gen/gens.c
index 6e93f64..965a19e 100644
--- a/src/gen/gens.c
+++ b/src/gen/gens.c
@@ -7,6 +7,7 @@
#include "math/subgroup.h"
#include "obj/point.h"
#include "obj/subgroup.h"
+#include "misc/compat.h"
static subgroup_t *gens_point(GEN point, const curve_t *curve) {
subgroup_t *sub = subgroup_new();
@@ -103,7 +104,7 @@ CHECK(gens_check_anomalous) {
}
GEN gens_get_embedding(GEN prime, GEN generator_order) {
- return order(mkintmod(prime, generator_order));
+ return znorder(mkintmod(prime, generator_order), NULL);
}
CHECK(gens_check_embedding) {
diff --git a/src/misc/compat.h b/src/misc/compat.h
index ba4a107..7e3d4e8 100644
--- a/src/misc/compat.h
+++ b/src/misc/compat.h
@@ -18,10 +18,12 @@
#define PARI_VERSION_LT(a,b,c) !(PARI_VERSION_GE(a,b,c))
#define PARI_VERSION_LE(a,b,c) !(PARI_VERSION_GT(a,b,c))
-
#if PARI_VERSION_LT(2,12,1)
#define polisirreducible isirreducible
#endif
+#if PARI_VERSION_LT(2,15,0)
+#define znorder(x, o) order(x);
+#endif
#endif // ECGEN_MISC_COMPAT_H