Skip to content

Commit 7601964

Browse files
author
Jonathan Kliem
committed
simple github workflow for cypari2
1 parent 2138dc2 commit 7601964

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: cypari2
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
push:
7+
tags:
8+
- '*'
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest]
17+
python-version: [3.6, 3.7, 3.8, 3.9, 3.10]
18+
pari-version: ['pari-2.9.4', 'pari-2.9.5', 'pari-2.11.0', 'pari-2.11.0', 'pari-2.11.2', 'pari-2.11.3', 'pari-2.11.4', 'pari-2.13.0', 'snapshot']
19+
steps:
20+
- env:
21+
LC_ALL: C
22+
PATH: "/usr/lib/ccache:$PATH"
23+
PARI_VERSION: ${{ matrix.pari-version }}
24+
- name: Set up the repository
25+
uses: actions/checkout@v2
26+
with:
27+
submodules: recursive
28+
fetch-depth: 0
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
- name: Install pari
34+
run: |
35+
ccache -M 256M && ccache -s
36+
bash -x .travis-install-pari.sh
37+
- name: Local build
38+
run: |
39+
make check
40+
pip install sphinx
41+
(cd docs && make html)

.travis-install-pari.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,19 @@
33
# Exit on error
44
set -e
55

6+
if [ "$PARI_VERSION" = snapshot ]; then
7+
URLDIR=snapshots
8+
fi
9+
10+
if [ "$URLDIR" = "" ]; then
11+
PURE_VERSION=${PARI_VERSION/pari-}
12+
URLDIR=OLD/${PURE_VERSION%.*}
13+
fi
14+
615
PARI_URL="http://pari.math.u-bordeaux.fr/pub/pari/$URLDIR"
16+
PARI_URL1="http://pari.math.u-bordeaux.fr/pub/pari/unix"
17+
PARI_URL2="http://pari.math.u-bordeaux.fr/pub/pari/unstable"
18+
PARI_URL3="http://pari.math.u-bordeaux.fr/pub/pari/snapshot"
719

820
# Figure out PARI version and download location
921
# Note that we support giving a list of URLs
@@ -14,7 +26,7 @@ if [ "$PARI_VERSION" = snapshot ]; then
1426
fi
1527

1628
# Download PARI sources
17-
wget --no-verbose "$PARI_URL/$PARI_VERSION.tar.gz"
29+
wget --no-verbose "$PARI_URL/$PARI_VERSION.tar.gz" || wget --no-verbose "$PARI_URL1/$PARI_VERSION.tar.gz" || wget --no-verbose "$PARI_URL2/$PARI_VERSION.tar.gz" || wget --no-verbose "$PARI_URL3/$PARI_VERSION.tar.gz"
1830

1931
# Install
2032
tar xzf "$PARI_VERSION.tar.gz"

0 commit comments

Comments
 (0)