Skip to content

Commit e2c9824

Browse files
author
Jonathan Kliem
authored
Merge pull request #110 from kliem/github_workflow
GitHub workflow
2 parents 2138dc2 + 0bf0a67 commit e2c9824

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

.github/workflows/main.yml

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