Skip to content

Commit 8bb97a7

Browse files
committed
Test multiple PARI versions in Travis CI
1 parent 27cfb5b commit 8bb97a7

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

.travis-install-pari.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Helper script to install PARI for Travis CI
2+
3+
# Exit on error
4+
set -e
5+
6+
# Figure out PARI version and download location
7+
# Note that we support giving a list of URLs
8+
if [ "$PARI_VERSION" = snapshot ]; then
9+
PARI_VERSION=$(wget -qO- "http://pari.math.u-bordeaux.fr/pub/pari/snapshots" | sed -n 's/.*href="\(pari-.*-g.*\)[.]tar[.]gz".*/\1/p')
10+
URL="http://pari.math.u-bordeaux.fr/pub/pari/snapshots"
11+
else
12+
URL="http://pari.math.u-bordeaux.fr/pub/pari/unix http://pari.math.u-bordeaux.fr/pub/pari/unstable"
13+
fi
14+
15+
# Download PARI sources
16+
for url in $URL; do
17+
if wget --no-verbose "$url/$PARI_VERSION.tar.gz"; then
18+
# Success
19+
break
20+
fi
21+
done
22+
23+
# Install
24+
tar xzf "$PARI_VERSION.tar.gz"
25+
cd "$PARI_VERSION"
26+
./Configure --prefix=/usr
27+
make gp
28+
sudo make install

.travis.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,21 @@ python:
1010
- "3.4"
1111
- "3.5"
1212
- "3.6"
13-
# non python dependencies
13+
env:
14+
- PARI_VERSION=pari-2.8.1.beta
15+
- PARI_VERSION=pari-2.9.3
16+
- PARI_VERSION=snapshot
1417
before_install:
15-
- sudo apt-get -qq update
16-
- wget http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-2.9.3.tar.gz
17-
- tar xf pari-2.9.3.tar.gz
18-
- cd pari-2.9.3/
19-
- ./Configure --prefix=/usr/
20-
- make gp
21-
- sudo make install
22-
- cd ..
23-
# command to install dependencies
24-
install:
25-
- pip install --verbose Cython
26-
- pip install --verbose cysignals
27-
- pip install --verbose Sphinx
18+
- export PATH="/usr/lib/ccache:$PATH"
19+
- ccache -M 256M && ccache -s
20+
install:
21+
- bash -x .travis-install-pari.sh
22+
- pip install --build=/tmp/pip --verbose -r requirements.txt
2823
- pip install --verbose .
2924
# command to run tests
3025
script:
3126
- python tests/rundoctest.py
3227
- (cd docs && make html)
28+
cache:
29+
directories:
30+
- $HOME/.ccache

0 commit comments

Comments
 (0)